Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pr90394-1-gimple.c
blobf8feb6b8967906f44ab4d7d49984d2785dc9a875
1 /* { dg-do compile } */
2 /* { dg-options "-fgimple -O -Wmaybe-uninitialized" } */
4 unsigned int __GIMPLE (ssa,startwith("uninit1"))
5 foo (unsigned int v)
7 /* The warning is not bogus, because (5 & 3) != 0 and therefore if v == 5,
8 the value of undef is used without being initialized. */
9 unsigned int undef; /* { dg-warning "may be used uninitialized" } */
10 unsigned int _2;
11 unsigned int _9;
12 unsigned int _10;
13 unsigned pred;
15 __BB(2):
16 if (v_4(D) != 5u)
17 goto __BB3;
18 else
19 goto __BB4;
21 /* 'undef' is defined conditionally (under 'v != 5' predicate) */
22 __BB(3):
23 undef_8 = 8u;
24 goto __BB4;
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;
35 /* The phi value is used here (under 'v & 3' predicate). */
36 __BB(5):
37 _9 = undef_1;
38 goto __BB7;
40 __BB(6):
41 _10 = v_4(D);
42 goto __BB7;
44 __BB(7):
45 _2 = __PHI (__BB5: _9, __BB6: _10);
46 return _2;