annotate gcc/testsuite/gcc.dg/tree-ssa/20030814-5.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 -fdump-tree-optimized" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 extern void abort (void);
kono
parents:
diff changeset
5 union tree_node;
kono
parents:
diff changeset
6 typedef union tree_node *tree;
kono
parents:
diff changeset
7 extern const char tree_code_type[];
kono
parents:
diff changeset
8 struct tree_common
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 int code;
kono
parents:
diff changeset
11 };
kono
parents:
diff changeset
12 struct tree_decl
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 long pointer_alias_set;
kono
parents:
diff changeset
15 };
kono
parents:
diff changeset
16 union tree_node
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 struct tree_common common;
kono
parents:
diff changeset
19 struct tree_decl decl;
kono
parents:
diff changeset
20 };
kono
parents:
diff changeset
21 long oof (void);
kono
parents:
diff changeset
22 void record_alias_subset (long);
kono
parents:
diff changeset
23 long
kono
parents:
diff changeset
24 blah (decl, set)
kono
parents:
diff changeset
25 tree decl;
kono
parents:
diff changeset
26 long set;
kono
parents:
diff changeset
27 {
kono
parents:
diff changeset
28 decl->decl.pointer_alias_set = oof();
kono
parents:
diff changeset
29 if (tree_code_type[decl->common.code] != 'd')
kono
parents:
diff changeset
30 abort ();
kono
parents:
diff changeset
31 record_alias_subset (decl->decl.pointer_alias_set);
kono
parents:
diff changeset
32 if (set != -1)
kono
parents:
diff changeset
33 set = 0;
kono
parents:
diff changeset
34 return set;
kono
parents:
diff changeset
35 }
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 /* There should be precisely one reference to pointer_alias_set. If there is
kono
parents:
diff changeset
38 more than one, then the dominator optimizations failed. */
kono
parents:
diff changeset
39 /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "dom2"} } */
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 /* The assignment set = -1 in the ELSE clause of the last IF
kono
parents:
diff changeset
42 statement should be removed by the final cleanup phase. */
kono
parents:
diff changeset
43 /* { dg-final { scan-tree-dump-times "set = -1" 0 "optimized"} } */