gcc/testsuite/g++.dg/pr78088.C
raw| 1 | // PR tree-optimization/78088 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O3 -fsplit-loops" } |
| 4 | class A { |
| 5 | public: |
| 6 | int m_fn1(); |
| 7 | }; |
| 8 | struct B : A { |
| 9 | void m_fn2(); |
| 10 | }; |
| 11 | void B::m_fn2() { |
| 12 | long a; |
| 13 | int b, c; |
| 14 | for (;;) { |
| 15 | c = 0; |
| 16 | for (; c < a; ++c, ++b) |
| 17 | b > 0 ? m_fn1() : 0; |
| 18 | } |
| 19 | } |