]>
Commit | Line | Data |
---|---|---|
825293da MS |
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" } */ | |
5 | ||
6 | int __fmaf (void) | |
7 | { | |
8 | int a = 0; | |
9 | int b, c, d, e, f; | |
10 | ||
11 | int r = 0; | |
12 | ||
13 | switch (b) // { dg-warning "-Wuninitialized" } | |
14 | { | |
15 | default: | |
16 | c |= 1; | |
17 | ||
18 | case 0: | |
19 | if (c == 0) | |
20 | a = 1; | |
21 | ||
22 | switch (d) { | |
23 | case 15: | |
24 | f = c; | |
25 | break; | |
26 | ||
27 | case 11: | |
28 | case 6: | |
29 | case 4: | |
30 | f = c; | |
31 | case 10: | |
32 | e = a; | |
33 | } | |
34 | ||
35 | if (e == 0) // { dg-warning "-Wmaybe-uninitialized" } | |
36 | f = 0; | |
37 | ||
38 | r = f; | |
39 | } | |
40 | ||
41 | // The return statement below gets the unhelpful warning: | |
42 | // 'f' may be used uninitialized in this function [-Wmaybe-uninitialized] | |
43 | return r; | |
44 | } | |
45 | ||
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" } */ |