2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / c-c++-common / Wunused-var-10.c
blob16d5171d0bfa8ebafe79764a0b76ea678ea39fd1
1 /* PR c++/44362 */
2 /* { dg-options "-Wunused" } */
3 /* { dg-do compile } */
5 int
6 f1 (int u, int v)
8 int a, b, c, d, e, f, g, h, i;
9 a = u;
10 b = v;
11 c = u;
12 d = v;
13 e = u;
14 f = v;
15 g = u == 6 ? a : b;
16 h = 0 ? c : d;
17 i = 1 ? e : f;
18 return g + h + i;
21 int
22 f2 (int u, int v)
24 int a, b, c, d, e, f, g, h, i;
25 a = u;
26 b = v;
27 c = u;
28 d = v;
29 e = u;
30 f = v;
31 g = u == 6 ? a + 1 : b;
32 h = 0 ? c + 1 : d;
33 i = 1 ? e + 1 : f;
34 return g + h + i;
37 int
38 f3 (int u, int v)
40 int a, b, c, d, e, f, g, h, i;
41 a = u;
42 b = v;
43 c = u;
44 d = v;
45 e = u;
46 f = v;
47 g = u == 6 ? a : b + 1;
48 h = 0 ? c : d + 1;
49 i = 1 ? e : f + 1;
50 return g + h + i;
53 int
54 f4 (int u, int v)
56 int a, c, e, g, h, i;
57 long b, d, f;
58 a = u;
59 b = v;
60 c = u;
61 d = v;
62 e = u;
63 f = v;
64 g = u == 6 ? a : b;
65 h = 0 ? c : d;
66 i = 1 ? e : f;
67 return g + h + i;