diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr59386.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr59386.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr59386.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr59386.c new file mode 100644 index 000000000..b014f707c --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr59386.c @@ -0,0 +1,24 @@ +/* PR tree-optimization/59386 */ + +struct S { int s; }; +struct T { int t; struct S u; } c; +int b; + +struct S +foo () +{ + struct T d; + if (b) + while (c.t) + ; + else + return d.u; +} + +struct S +bar () +{ + struct T a; + a.u = foo (); + return a.u; +} |