1 /* { dg-do compile } */
2 /* { dg-options "-O2 -funswitch-loops -g -fdump-tree-unswitch-details" } */
3 /* { dg-additional-options "-fcompare-debug" { target { ! powerpc-ibm-aix* } } } */
4
5 short a, d;
6 int b, c;
7 static int e() {
8 int f = -2L, g = 9, h = 0;
9 for (; h < 2; h++)
10 if (a <= 5) {
11 g = 0;
12 if (c && a)
13 break;
14 if (c - 1)
15 goto i;
16 }
17 if (b) {
18 int *j[] = {&f};
19 if (d)
20 for (; f < 9; f++)
21 if (g)
22 for (; f; f++)
23 ;
24 i:
25 while (f) {
26 a--;
27 break;
28 }
29 }
30 }
31 int main() { e(); }
32
33 /* { dg-final { scan-tree-dump-times "Guard hoisted" 1 "unswitch" } } */