OSDN Git Service

* c-decl.c (grokfield): Allow typedefs for anonymous structs and
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr40172-1.c
1 /* PR middle-end/40172 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wall -W -Werror -Wlogical-op" } */
4
5 struct rtx_def;
6 typedef struct rtx_def *rtx; 
7
8 extern int foo;
9 extern int bar;
10 extern int xxx;
11
12 int
13 test (void)
14 {
15   if (((rtx) 0 != (rtx) 0) && xxx ? foo : bar)
16     return 1;
17   else if ((foo & 0) && xxx)
18     return 2;
19   else if (foo & 0)
20     return 3;
21   else if (0 && xxx)
22     return 4;
23   else if (0)
24     return 5;
25   if (((int) 0 != (int) 0) && bar ? foo : xxx)
26     return 6;
27   else if (0 != 0 && foo ? xxx : bar)
28     return 7;
29   else
30     return 0;
31 }