diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/pr80436.C')
-rw-r--r-- | gcc/testsuite/g++.dg/opt/pr80436.C | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/pr80436.C b/gcc/testsuite/g++.dg/opt/pr80436.C new file mode 100644 index 00000000000..b5879bf813d --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr80436.C @@ -0,0 +1,42 @@ +// PR debug/80436 +// { dg-do compile { target c++11 } } +// { dg-options "-O3 -fcompare-debug" } + +void fn (...); +void foo (int, int, int); +struct { int elt1; int bits; } *a; +int b, d; + +int +bar (unsigned *x) +{ + if (0) + next_bit: + return 1; + while (1) + { + if (b) + if (a->bits) + goto next_bit; + *x = b; + if (a->elt1) + return 0; + a = 0; + } +} + +enum { C0, C1 } *c; + +void +baz () +{ + int e, m = d; + for (; e < m; e++) + { + if (e < 0) + foo (0, 0, c[e]); + unsigned f; + for (; bar (&f);) + fn (f); + } +} |