PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030711-2.c
blob7fce5ab4b66b6e15c9af0c7e083b09c4d78ccfd6
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-dom2" } */
5 struct rtx_def;
6 typedef struct rtx_def *rtx;
7 struct rtvec_def;
8 typedef struct rtvec_def *rtvec;
9 union tree_node;
10 typedef union tree_node *tree;
11 typedef struct mem_attrs
13 long alias;
15 mem_attrs;
16 union rtunion_def
18 mem_attrs *rtmem;
20 typedef union rtunion_def rtunion;
21 struct rtx_def
23 int code;
24 rtunion fld[1];
26 struct tree_decl
28 rtx rtl;
30 union tree_node
32 struct tree_decl decl;
34 void make_decl_rtl (tree, int);
35 long
36 get_alias_set (t,z)
37 tree t;
38 rtx z;
40 if (t->decl.rtl && (((t->decl.rtl ? z
41 : (make_decl_rtl (t, 0), t->decl.rtl)))->code))
42 return (((((t->decl.rtl ? z : (make_decl_rtl (t, 0), t->decl.rtl)))->
43 fld[1]).rtmem) == 0 ? 0 : (((((
45 t;}
46 )->decl.
47 rtl ? z : (make_decl_rtl (t, 0),
48 t->decl.rtl)))->
49 fld[1]).rtmem)->alias);
52 /* The calls to make_decl_rtl should be eliminated
53 /* { dg-final { scan-tree-dump-not "make_decl_rtl \\(\\)" "dom2" } } */
55 /* There should be three IF conditionals. */
56 /* { dg-final { scan-tree-dump-times "if " 3 "dom2"} } */
58 /* There should be one loads of decl.rtl. */
59 /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "dom2"} } */
61 /* There should be one load of code. */
62 /* { dg-final { scan-tree-dump-times "code" 1 "dom2"} } */
64 /* There should be one load of rtmem. */
65 /* { dg-final { scan-tree-dump-times "rtmem" 1 "dom2"} } */
67 /* There should be one load of alias. */
68 /* { dg-final { scan-tree-dump-times "->alias" 1 "dom2"} } */