]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/tree-ssa/20030814-7.c
Merge tree-ssa-20020619-branch into mainline.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / 20030814-7.c
CommitLineData
6de9cd9a
DN
1/* { dg-do compile } */
2/* { dg-options "-O1 -fdump-tree-dom3" } */
3
4struct rtx_def;
5typedef struct rtx_def *rtx;
6struct rtvec_def;
7typedef struct rtvec_def *rtvec;
8union tree_node;
9typedef union tree_node *tree;
10struct tree_common
11{
12 int code;
13};
14union tree_node
15{
16 struct tree_common common;
17};
18extern tree current_function_decl;
19struct cgraph_rtl_info
20{
21 _Bool pure_function;
22};
23struct cgraph_rtl_info *cgraph_rtl_info (tree);
24void
25mark_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"} } */