Debian Codegraph @

gcc/testsuite/gcc.dg/pr109732.c

raw
1 /* { dg-do run } */
2 /* We need to disable passes which might cause cfg cleanup */
3 /* { dg-options "-O1 -fgimple -fdisable-tree-ethread -fdisable-tree-fre1" } */
4
5 /* This code is done this way to have the false edge as 1st
6 successor edge of BB2. Normally the true edge would be
7 the first and you would not hit the bug. */
8 [[gnu::noipa]]
9 _Bool __GIMPLE (ssa, startwith("forwprop1"))
10 f3 (_Bool a)
11 {
12 _Bool i;
13 _Bool tt;
14
15 __BB(2):
16 tt_4 = a_1(D) == _Literal (_Bool)0;
17 if (tt_4 != _Literal (_Bool)0)
18 goto __BB3;
19 else
20 goto __BB4;
21
22 __BB(3):
23 goto __BB5;
24
25 __BB(4):
26 goto __BB5;
27
28 __BB(5):
29 i_2 = __PHI (__BB4: a_1(D), __BB3: _Literal (_Bool)0);
30
31 return i_2;
32 }
33
34 int main()
35 {
36 if (f3(0))
37 __builtin_abort();
38 if (!f3(1))
39 __builtin_abort();
40 }