summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 08:06:03 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 08:06:03 +0000
commita2389d4a8fc06dbb8c7870ca81d2433d5b411e10 (patch)
tree23ea3926bf705306c1527d09670ca40e467760b8 /gcc/tree-ssa-structalias.c
parent6f9d2771448d72c62f96cff96c7aa1480455ec97 (diff)
2016-03-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/70128 * tree-ssa-structalias.c (set_uids_in_ptset): Set vars_contains_nonlocal for any FUNCTION_DECL or LABEL_DECL. * gcc.dg/tree-ssa/alias-34.c: New testcase. * gcc.dg/tree-ssa/alias-35.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index de123800f0b3..bad1ea12a7f9 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -6280,6 +6280,16 @@ set_uids_in_ptset (bitmap into, bitmap from, struct pt_solution *pt,
&& ! auto_var_in_fn_p (vi->decl, fndecl)))
pt->vars_contains_nonlocal = true;
}
+
+ else if (TREE_CODE (vi->decl) == FUNCTION_DECL
+ || TREE_CODE (vi->decl) == LABEL_DECL)
+ {
+ /* Nothing should read/write from/to code so we can
+ save bits by not including them in the points-to bitmaps.
+ Still mark the points-to set as containing global memory
+ to make code-patching possible - see PR70128. */
+ pt->vars_contains_nonlocal = true;
+ }
}
}