gcc/testsuite/g++.dg/torture/pr108647.C
raw| 1 | // PR tree-optimization/108647 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | bool a; |
| 5 | int b, c; |
| 6 | |
| 7 | inline const bool & |
| 8 | foo (bool &e, const bool &f) |
| 9 | { |
| 10 | return f < e ? f : e; |
| 11 | } |
| 12 | |
| 13 | void |
| 14 | bar (signed char e, bool *f, bool *h, bool *g) |
| 15 | { |
| 16 | for (;;) |
| 17 | if (g) |
| 18 | for (signed char j = 0; j < 6; |
| 19 | j += ((f[0] & c ? g[0] : int(0 >= e)) |
| 20 | ? 0 : foo (g[0], g[0] > h[0]) + 1)) |
| 21 | { |
| 22 | a = 0; |
| 23 | b = 0; |
| 24 | } |
| 25 | } |