diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr51245.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e920bf7..248b284 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-12-06 Richard Guenther <rguenther@suse.de> + + PR tree-optimization/51245 + * gcc.dg/torture/pr51245.c: New testcase. + 2011-12-06 Dodji Seketeli <dodji@redhat.com> PR c++/51427 diff --git a/gcc/testsuite/gcc.dg/torture/pr51245.c b/gcc/testsuite/gcc.dg/torture/pr51245.c new file mode 100644 index 0000000..e5e2ded --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr51245.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ + +struct S { int s; } a, *b, **c; +int d; + +struct S +foo (void) +{ + struct S s = { 0 }, *e = &a; + if (d) + **c = *b; + while (1) + { + *b = s; + *e = *b; + if (a.s) + break; + } + return **c; +} |