PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr68320.c
blob7060af8993eb7b128dd4886462213e48d8566bcf
1 /* PR c/68320 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 void
6 fn1 (void)
8 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
9 if (1)
11 T x; /* { dg-error "unknown type name" } */
14 void
15 fn2 (int i)
17 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
18 if (1)
19 i = 5;
20 T x; /* { dg-error "unknown type name" } */
23 void
24 fn3 (void)
26 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
27 if (1)
30 T *x; /* { dg-error "unknown type name" } */
33 void
34 fn4 (void)
36 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
37 if (1)
39 T, T; /* { dg-error "undeclared" } */
42 void
43 fn5 (void)
45 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
46 if (1)
48 T = 10; /* { dg-error "undeclared" } */
51 void
52 fn6 (void)
54 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
55 if (1)
57 T[0]; /* { dg-error "undeclared" } */
60 void
61 fn7 (void)
63 for (typedef int T;;) /* { dg-error "declaration of non-variable" } */
64 if (1)
66 T (); /* { dg-warning "implicit declaration" } */