aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-09-06 16:48:41 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-09-06 16:48:41 +0000
commit3c45b96b27d5be00740b13ad80ae6c6be9c96dbc (patch)
tree3b69d2381f9a7b5a6631e297a5dc73a9055dc763 /gcc/tree-ssa-alias.c
parentf7d601a5bd4fddecedc87ac0a4a57921dac8da60 (diff)
downloadgcc-3c45b96b27d5be00740b13ad80ae6c6be9c96dbc.zip
gcc-3c45b96b27d5be00740b13ad80ae6c6be9c96dbc.tar.gz
gcc-3c45b96b27d5be00740b13ad80ae6c6be9c96dbc.tar.bz2
re PR middle-end/41261 (ice with -O2 -fprofile-arcs when compiling Linux kernel)
2009-09-06 Richard Guenther <rguenther@suse.de> PR middle-end/41261 * tree-ssa-alias.c (refs_may_alias_p_1): Bail out for function decls. * gcc.dg/torture/pr41261.c: New testcase. From-SVN: r151460
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r--gcc/tree-ssa-alias.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 7e83a84..89804a9 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -784,6 +784,12 @@ refs_may_alias_p_1 (ao_ref *ref1, ao_ref *ref2, bool tbaa_p)
|| is_gimple_min_invariant (base2))
return false;
+ /* We can end up refering to code via function decls. As we likely
+ do not properly track code aliases conservatively bail out. */
+ if (TREE_CODE (base1) == FUNCTION_DECL
+ || TREE_CODE (base2) == FUNCTION_DECL)
+ return true;
+
/* Defer to simple offset based disambiguation if we have
references based on two decls. Do this before defering to
TBAA to handle must-alias cases in conformance with the