]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/uninit-28-gimple.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / uninit-28-gimple.c
CommitLineData
0f8e84c6
VI
1/* { dg-do compile } */
2/* { dg-options "-fgimple -O -Wmaybe-uninitialized" } */
3
4unsigned int __GIMPLE (ssa,startwith("uninit1"))
5foo (unsigned int v)
6{
7 /* Uninit warning here would be bogus, because (16 & 3) == 0 and therefore
8 if v == 16, the uninit value is not used (the use is properly guarded). */
9 unsigned int undef; /* { dg-bogus "may be used uninitialized" } */
10 unsigned int _2;
11 unsigned int _9;
12 unsigned int _10;
13 unsigned pred;
14
15 __BB(2):
16 if (v_4(D) != 16u)
17 goto __BB3;
18 else
19 goto __BB4;
20
21 /* 'undef' is defined conditionally (under 'v != 16' predicate) */
22 __BB(3):
23 undef_8 = 8u;
24 goto __BB4;
25
26 /* An undef value flows into a phi. */
27 __BB(4):
28 undef_1 = __PHI (__BB2: undef_5(D), __BB3: undef_8);
29 pred = v_4(D) & 3u;
30 if (pred != 0u)
31 goto __BB5;
32 else
33 goto __BB6;
34
35 /* The phi value is used here (under 'v & 3' predicate). */
36 __BB(5):
37 _9 = undef_1;
38 goto __BB7;
39
40 __BB(6):
41 _10 = v_4(D);
42 goto __BB7;
43
44 __BB(7):
45 _2 = __PHI (__BB5: _9, __BB6: _10);
46 return _2;
47}