]>
Commit | Line | Data |
---|---|---|
5c1b3334 VI |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-fgimple -O -Wmaybe-uninitialized" } */ | |
3 | ||
4 | unsigned int __GIMPLE (ssa,startwith("uninit1")) | |
5 | foo (unsigned int v) | |
6 | { | |
7 | unsigned int undef; /* { dg-bogus "may be used uninitialized" } */ | |
8 | unsigned int _2; | |
9 | unsigned int _9; | |
10 | unsigned int _10; | |
11 | ||
12 | __BB(2): | |
13 | if (v_4(D) != 100u) | |
14 | goto __BB3; | |
15 | else | |
16 | goto __BB4; | |
17 | ||
18 | __BB(3): | |
19 | undef_8 = 8u; // 'undef' is defined conditionally (under 'v != 100' predicate) | |
20 | goto __BB4; | |
21 | ||
22 | __BB(4): | |
23 | // An undef value flows into a phi. | |
24 | undef_1 = __PHI (__BB2: undef_5(D), __BB3: undef_8); | |
25 | if (v_4(D) < 100u) | |
26 | goto __BB5; | |
27 | else | |
28 | goto __BB6; | |
29 | ||
30 | __BB(5): | |
31 | _9 = undef_1; // The phi value is used here (under 'v < 100' predicate). | |
32 | goto __BB7; | |
33 | ||
34 | __BB(6): | |
35 | _10 = v_4(D); | |
36 | goto __BB7; | |
37 | ||
38 | __BB(7): | |
39 | _2 = __PHI (__BB5: _9, __BB6: _10); | |
40 | return _2; | |
41 | } |