]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c
Merge tree-ssa-20020619-branch into mainline.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030709-3.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 enum tree_code
8 {
9 TREE_VEC = 20,
10 };
11 struct tree_common
12 {
13 int code;
14 };
15 struct tree_type
16 {
17 tree binfo;
18 };
19 union tree_node
20 {
21 struct tree_common common;
22 struct tree_type type;
23 };
24 void
25 record_component_aliases (type)
26 tree type;
27 {
28 const tree __z = type->type.binfo;
29 if (type->type.binfo->common.code != TREE_VEC)
30 abort ();
31
32 if (__z->common.code != TREE_VEC)
33 abort ();
34 }
35
36 /* There should be precisely one load of type.binfo. If there is
37 more than one, then the dominator optimizations failed. */
38 /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom3"} } */
39
40 /* There should be precisely one load of common.code. If there is
41 more than one, then the dominator optimizations failed. */
42 /* { dg-final { scan-tree-dump-times "common\\.code" 1 "dom3"} } */
43
44 /* There should be one IF conditional. */
45 /* { dg-final { scan-tree-dump-times "if " 1 "dom3"} } */