diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-10 21:33:11 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-10 21:33:11 +0000 |
commit | c4e91ab356ee50247b2bf04ec791a01a5b2ad2c1 (patch) | |
tree | 5bd5f7053c0c0609d3643ee5d62d5626410a8069 /gcc/testsuite/gcc.dg/tree-ssa | |
parent | 0e3a3bdbc4fc91a1fdf5a7bca1a3907e91125800 (diff) | |
download | gcc-c4e91ab356ee50247b2bf04ec791a01a5b2ad2c1.tar.gz |
PR tree-optimization/31885
* tree-chrec.c (chrec_contains_undetermined): Do not consider NULL_TREE
to be undetermined.
(automatically_generated_chrec_p): Return false for NULL.
* gcc.dg/tree-ssa/loop-29.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124602 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa')
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/loop-29.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-29.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-29.c new file mode 100644 index 00000000000..13699aafd62 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-29.c @@ -0,0 +1,21 @@ +/* PR 31885 */ + +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-empty" } */ + +struct s { + int *blah; +}; + +static struct s array[] = { { 0 } }; + +void +foo (struct s *p) +{ + struct s *q = &array[1]; + while (p < q) + p++; +} + +/* { dg-final { scan-tree-dump-times "Removing empty loop" 1 "empty" } } */ +/* { dg-final { cleanup-tree-dump "empty" } } */ |