annotate gcc/testsuite/gcc.dg/tree-ssa/20030711-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O1 -fdump-tree-dom2" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 extern void abort (void);
kono
parents:
diff changeset
5 extern void blah (void);
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 union tree_node;
kono
parents:
diff changeset
8 typedef union tree_node *tree;
kono
parents:
diff changeset
9 struct tree_vec
kono
parents:
diff changeset
10 {
kono
parents:
diff changeset
11 int length;
kono
parents:
diff changeset
12 tree a[1];
kono
parents:
diff changeset
13 };
kono
parents:
diff changeset
14 struct tree_type
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 tree binfo;
kono
parents:
diff changeset
17 };
kono
parents:
diff changeset
18 union tree_node
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 struct tree_type type;
kono
parents:
diff changeset
21 struct tree_vec vec;
kono
parents:
diff changeset
22 };
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 void
kono
parents:
diff changeset
25 record_component_aliases (type)
kono
parents:
diff changeset
26 tree type;
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 int i;
kono
parents:
diff changeset
29 if (4 >= type->type.binfo->vec.length)
kono
parents:
diff changeset
30 abort ();
kono
parents:
diff changeset
31 for (; i < ((
kono
parents:
diff changeset
32 {
kono
parents:
diff changeset
33 const tree __t = type->type.binfo;
kono
parents:
diff changeset
34 if (4 >= __t->vec.length)
kono
parents:
diff changeset
35 abort (); type->type.binfo->vec.a[4];}
kono
parents:
diff changeset
36 )->vec.length);)
kono
parents:
diff changeset
37 {
kono
parents:
diff changeset
38 if (4 >= type->type.binfo->vec.length)
kono
parents:
diff changeset
39 abort ();
kono
parents:
diff changeset
40 blah ();
kono
parents:
diff changeset
41 }
kono
parents:
diff changeset
42 }
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* The call to blah can not be eliminated. */
kono
parents:
diff changeset
45 /* { dg-final { scan-tree-dump-times "blah \\(\\)" 1 "dom2" } } */
kono
parents:
diff changeset
46
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
47 /* There should be three IF conditionals. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
48 /* { dg-final { scan-tree-dump-times "if " 3 "dom2"} } */
111
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 /* There should be two loads of type.binfo. */
kono
parents:
diff changeset
51 /* { dg-final { scan-tree-dump-times "type\\.binfo" 2 "dom2"} } */
kono
parents:
diff changeset
52
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
53 /* There should be three loads of vec.length. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
54 /* { dg-final { scan-tree-dump-times "vec.length" 3 "dom2"} } */
111
kono
parents:
diff changeset
55