OSDN Git Service

eba207a25e57eec903a5b55fdcb789f463ba8440
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030711-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom3" } */
3  
4
5 union tree_node;
6 typedef union tree_node *tree;
7 struct tree_vec
8 {
9           int length;
10             tree a[1];
11 };
12 struct tree_type
13 {
14           tree binfo;
15 };
16 union tree_node
17 {
18           struct tree_type type;
19             struct tree_vec vec;
20 };
21
22 void
23 record_component_aliases (type)
24      tree type;
25 {
26   int i;
27   if (4 >= type->type.binfo->vec.length)
28     abort ();
29   for (; i < ((
30                 {
31                 const tree __t = type->type.binfo;
32                 if (4 >= __t->vec.length)
33                 abort (); type->type.binfo->vec.a[4];}
34               )->vec.length);)
35     {
36       if (4 >= type->type.binfo->vec.length)
37         abort ();
38       blah ();
39     }
40 }
41
42 /* The call to blah can not be eliminated.  */
43 /* { dg-final { scan-tree-dump-times "blah \\(\\)" 1 "dom3" } } */
44    
45 /* There should be four IF conditionals.  */
46 /* { dg-final { scan-tree-dump-times "if " 4 "dom3"} } */
47                                                                                 
48 /* There should be two loads of type.binfo.  */
49 /* { dg-final { scan-tree-dump-times "type\\.binfo" 2 "dom3"} } */
50  
51 /* There should be four loads of vec.length.  */
52 /* { dg-final { scan-tree-dump-times "vec.length" 4 "dom3"} } */
53