]>
Commit | Line | Data |
---|---|---|
6de9cd9a DN |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-O1 -fdump-tree-dom3" } */ | |
3 | ||
4 | struct rtx_def; | |
5 | typedef struct rtx_def *rtx; | |
6 | struct rtvec_def; | |
7 | typedef struct rtvec_def *rtvec; | |
8 | union tree_node; | |
9 | typedef union tree_node *tree; | |
10 | struct tree_common | |
11 | { | |
12 | int code; | |
13 | }; | |
14 | union tree_node | |
15 | { | |
16 | struct tree_common common; | |
17 | }; | |
18 | extern tree current_function_decl; | |
19 | struct cgraph_rtl_info | |
20 | { | |
21 | _Bool pure_function; | |
22 | }; | |
23 | struct cgraph_rtl_info *cgraph_rtl_info (tree); | |
24 | void | |
25 | mark_constant_function (void) | |
26 | { | |
27 | rtx insn; | |
28 | int nonlocal_memory_referenced; | |
29 | ||
30 | if (current_function_decl->common.code != 42) | |
31 | abort (); | |
32 | ||
33 | cgraph_rtl_info (current_function_decl)->pure_function = 1; | |
34 | } | |
35 | ||
36 | /* current_function_decl should be loaded once into a temporary | |
37 | and the temporary used as the argument to cgraph_rtl_info. | |
38 | This if we find current_function_decl used as an argument, then | |
39 | we have failed. */ | |
40 | /* { dg-final { scan-tree-dump-times "\\(current_function_decl\\)" 0 "dom3"} } */ |