gcc/testsuite/g++.dg/pr58438.C
raw| 1 | /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ |
| 2 | /* { dg-options "-march=amdfam10 -O3 -fprofile-generate -Wno-return-type" } */ |
| 3 | enum gimple_code {}; |
| 4 | struct A { |
| 5 | gimple_code code; |
| 6 | }; |
| 7 | struct B { |
| 8 | A gsbase; |
| 9 | }; |
| 10 | int **a; |
| 11 | int b, d, e, f, g, h, i, j, k, l, m, n, o; |
| 12 | gimple_code c, p; |
| 13 | class C { |
| 14 | virtual unsigned m_fn1(); |
| 15 | }; |
| 16 | B q; |
| 17 | static int fn1() { |
| 18 | int r; |
| 19 | if (k) |
| 20 | i = 0; |
| 21 | for (; i; j++) { |
| 22 | b = c <= 0; |
| 23 | if (b) |
| 24 | n = *a[0]; |
| 25 | b = p && c; |
| 26 | if (b) |
| 27 | r = *a[0]; |
| 28 | b = q.gsbase.code && c; |
| 29 | if (b) |
| 30 | o = *a[0]; |
| 31 | m = o; |
| 32 | if (e || 1 & r || d || l) |
| 33 | return 0; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | class D : C { |
| 38 | unsigned m_fn1() { |
| 39 | fn1(); |
| 40 | for (; h; g++) |
| 41 | for (;; f++) |
| 42 | ; |
| 43 | } |
| 44 | }; |
| 45 | void fn2() { new D; } |