diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr36508.c | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71de4be63ce..1eaff577cc7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-23 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/36508 + * gcc.dg/pr36508.c: New test. + 2008-06-20 Joseph Myers <joseph@codesourcery.com> * gcc.dg/inline-31.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr36508.c b/gcc/testsuite/gcc.dg/pr36508.c new file mode 100644 index 00000000000..30489923642 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr36508.c @@ -0,0 +1,29 @@ +/* PR tree-optimization/36508 */ +/* { dg-do compile } */ +/* { dg-options "-O -ftree-pre" } */ + +void +foo (short *sp) +{ + int k; + k = 1; +#define SP0 *sp++ = 1; + while (1) + { + if (k > 6) + break; + SP0 + k++; + } + k = 1; + while (1) + { + if (k > 6) + break; + SP0 + k++; + } +#define SP1 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 +#define SP2 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 + SP2 +} |