145
|
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-warning "may be used uninitialized" } */
|
|
8 unsigned int _2;
|
|
9 unsigned int _9;
|
|
10 unsigned int _10;
|
|
11 unsigned pred;
|
|
12
|
|
13 __BB(2):
|
|
14 pred = v_4(D) & 3u;
|
|
15 if (pred != 0u)
|
|
16 goto __BB3;
|
|
17 else
|
|
18 goto __BB4;
|
|
19
|
|
20 /* 'undef' is defined conditionally (under 'v & 3' predicate) */
|
|
21 __BB(3):
|
|
22 undef_8 = 8u;
|
|
23 goto __BB4;
|
|
24
|
|
25 /* An undef value flows into a phi. */
|
|
26 __BB(4):
|
|
27 undef_1 = __PHI (__BB2: undef_5(D), __BB3: undef_8);
|
|
28 if (v_4(D) != 16u)
|
|
29 goto __BB5;
|
|
30 else
|
|
31 goto __BB6;
|
|
32
|
|
33 /* The phi value is used here (under 'v != 16' predicate). */
|
|
34 __BB(5):
|
|
35 _9 = undef_1;
|
|
36 goto __BB7;
|
|
37
|
|
38 __BB(6):
|
|
39 _10 = v_4(D);
|
|
40 goto __BB7;
|
|
41
|
|
42 __BB(7):
|
|
43 _2 = __PHI (__BB5: _9, __BB6: _10);
|
|
44 return _2;
|
|
45 }
|