diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr50067-3.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/torture/pr50067-3.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr50067-3.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr50067-3.c new file mode 100644 index 000000000..b774ea3f8 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr50067-3.c @@ -0,0 +1,20 @@ +/* { dg-do run } */ +/* { dg-options "-fpredictive-commoning" } */ + +extern void abort (void); +int a[6] = { 0, 0, 0, 0, 7, 0 }; +static int *p = &a[4]; + +int +main () +{ + int i; + for (i = 0; i < 4; ++i) + { + a[i + 1] = a[i + 2] > i; + *p &= ~1; + } + if (a[4] != 0) + abort (); + return 0; +} |