Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pr102403.c
blob1e62e988fd64c2daf62c5a440ea846b69f1febb9
1 /* PR middle-end/102403 - ICE in init_from_control_deps, at
2 gimple-predicate-analysis.cc:2364
3 { dg-do compile }
4 { dg-options "-O2 -Wall" } */
6 int __fmaf (void)
8 int a = 0;
9 int b, c, d, e, f;
11 int r = 0;
13 switch (b) // { dg-warning "-Wuninitialized" }
15 default:
16 c |= 1;
18 case 0:
19 if (c == 0)
20 a = 1;
22 switch (d) {
23 case 15:
24 f = c;
25 break;
27 case 11:
28 case 6:
29 case 4:
30 f = c;
31 case 10:
32 e = a;
35 if (e == 0) // { dg-warning "-Wmaybe-uninitialized" }
36 f = 0;
38 r = f;
41 // The return statement below gets the unhelpful warning:
42 // 'f' may be used uninitialized in this function [-Wmaybe-uninitialized]
43 return r;
46 /* Prune out warnings issued on the wrong lines, such as:
47 uninit-pr102403.c:9:13: warning: ā€˜dā€™ is used uninitialized [-Wuninitialized]
48 { dg-prune-output "-Wuninitialized" }
49 { dg-prune-output "-Wmaybe-uninitialized" } */