Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030709-2.c
blob5009cd69cfe81fa41d56e14a74ee05bac9e90ff3
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-dce3" } */
4 struct rtx_def;
5 typedef struct rtx_def *rtx;
6 union tree_node;
7 typedef union tree_node *tree;
8 typedef struct mem_attrs
10 int foo;
12 } mem_attrs;
13 union rtunion_def
15 mem_attrs *rtmem;
17 typedef union rtunion_def rtunion;
18 struct rtx_def
20 rtunion fld[1];
22 struct tree_decl
24 rtx rtl;
26 union tree_node
28 struct tree_decl decl;
30 int make_decl_rtl (tree, int);
31 void *
32 get_alias_set (t)
33 tree t;
35 long set;
36 if (t->decl.rtl)
37 return (t->decl.rtl->fld[1].rtmem
38 ? 0
39 : (((t->decl.rtl ? t->decl.rtl: (make_decl_rtl (t, 0), t->decl.rtl)))->fld[1]).rtmem);
40 return (void*)-1;
43 /* There should be precisely one load of ->decl.rtl. If there is
44 more than, then the dominator optimizations failed. */
45 /* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "dce3"} } */
47 /* There should be no loads of .rtmem since the complex return statement
48 is just "return 0". */
49 /* { dg-final { scan-tree-dump-times ".rtmem" 0 "dce3"} } */
51 /* There should be one IF statement (the complex return statement should
52 collapse down to a simple return 0 without any conditionals). */
53 /* { dg-final { scan-tree-dump-times "if " 1 "dce3"} } */