Merge reload-branch up to revision 101000
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / iftrap-1.c
bloba0adc78cf8286387c2beecd900162ad4d2e94e8a
1 /* Verify that ifcvt doesn't crash under a number of interesting conditions. */
3 void f1(int p)
5 if (p)
6 __builtin_trap();
9 void f2(int p)
11 if (p)
12 __builtin_trap();
13 else
14 bar();
17 void f3(int p)
19 if (p)
20 bar();
21 else
22 __builtin_trap();
25 void f4(int p, int q)
27 if (p)
29 bar();
30 if (q)
31 bar();
33 else
34 __builtin_trap();
37 void f5(int p)
39 if (p)
40 __builtin_trap();
41 else
42 abort();
45 void f6(int p)
47 if (p)
48 abort();
49 else
50 __builtin_trap();
53 void f7(int p)
55 if (p)
56 __builtin_trap();
57 else
58 __builtin_trap();
61 void f8(int p)
63 if (p)
64 __builtin_trap();
65 else
67 bar();
68 __builtin_trap();
72 void f9(int p)
74 if (p)
76 bar();
77 __builtin_trap();
79 else
80 __builtin_trap();
83 void f10(int p)
85 if (p)
86 __builtin_trap();
87 while (1)
88 bar();
91 void f11(int p)
93 if (p)
94 __builtin_trap();
95 else
96 bar();
97 while (1)
98 baz();