comparison gcc/testsuite/gcc.dg/pr67784-4.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR c/67784 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wno-switch-unreachable" } */
4
5 typedef int T;
6
7 void
8 fn1 (void)
9 {
10 switch (sizeof (enum { T }))
11 if (1)
12 ;
13 T x;
14 }
15
16 void
17 fn2 (void)
18 {
19 int i = 0;
20 switch (sizeof (enum { T }))
21 if (1)
22 i++;
23 T x;
24 }
25
26 void
27 fn3 (void)
28 {
29 switch (sizeof (enum { T }))
30 if (1)
31 {
32 }
33 T x;
34 }
35
36 void
37 fn4 (void)
38 {
39 switch (sizeof (enum { T }))
40 if (1)
41 L:
42 ;
43 T x;
44 }
45
46 void
47 fn5 (void)
48 {
49 switch (sizeof (enum { T }))
50 if (1)
51 ;
52 else
53 ;
54 T x;
55 }