merge with trunk @ 139506
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030710-1.c
blobc344d48e9198e6774be1dec3e6ce6bbb63fb77c4
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom2" } */
4 extern void abort (void);
5 union tree_node;
6 typedef union tree_node *tree;
7 struct tree_vec
9 int length;
10 tree a[1];
12 struct tree_type
14 tree binfo;
16 union tree_node
18 struct tree_type type;
19 struct tree_vec vec;
21 void
22 record_component_aliases (type)
23 tree type;
25 if (type->type.binfo->vec.length)
26 abort ();
27 for (; ((
29 const tree __z = type->type.binfo;
30 if (type->type.binfo->vec.length)
31 abort ();
32 type->type.binfo->vec.a[4];}
33 )->vec.length);)
35 if (4 >= type->type.binfo->vec.length)
36 abort ();
37 blah ();
41 /* The call to blah should have been eliminated. If the call is not
42 eliminated, then dominator optimizations failed and it'll be
43 impossible to delete other unnecessary code. */
44 /* { dg-final { scan-tree-dump-not "blah \\(\\)" "dom2" } } */
46 /* There should be two IF conditionals. */
47 /* { dg-final { scan-tree-dump-times "if " 2 "dom2"} } */
49 /* There should be a single load of type.binfo. */
50 /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom2"} } */
52 /* There should be two loads of vec.length. */
53 /* { dg-final { scan-tree-dump-times "vec.length" 2 "dom2"} } */
55 /* { dg-final { cleanup-tree-dump "dom2" } } */