Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / gcc.dg / tree-ssa / 20030814-7.c
blob711bab25168c39eceac3228c62c202fe73670513
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-dom2" } */
4 extern void abort (void);
5 struct rtx_def;
6 typedef struct rtx_def *rtx;
7 struct rtvec_def;
8 typedef struct rtvec_def *rtvec;
9 union tree_node;
10 typedef union tree_node *tree;
11 struct tree_common
13 int code;
15 union tree_node
17 struct tree_common common;
19 extern tree current_function_decl;
20 struct cgraph_rtl_info
22 _Bool pure_function;
24 struct cgraph_rtl_info *cgraph_rtl_info (tree);
25 void
26 mark_constant_function (void)
28 rtx insn;
29 int nonlocal_memory_referenced;
31 if (current_function_decl->common.code != 42)
32 abort ();
34 cgraph_rtl_info (current_function_decl)->pure_function = 1;
37 /* current_function_decl should be loaded once into a temporary
38 and the temporary used as the argument to cgraph_rtl_info.
39 This if we find current_function_decl used as an argument, then
40 we have failed. */
41 /* { dg-final { scan-tree-dump-times "\\(current_function_decl\\)" 0 "dom2"} } */
42 /* { dg-final { cleanup-tree-dump "dom2" } } */