diff options
author | Richard Guenther <rguenther@suse.de> | 2009-10-28 13:28:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-10-28 13:28:32 +0000 |
commit | 1307c758a3aad3df3e7af66f6ec68b4cb599b054 (patch) | |
tree | c6cbdb47b276ee46a1baf832ef5152d54c71249e /gcc/alias.c | |
parent | de5b9f12c55af9a6f48a2febe7cf345fe0bd9163 (diff) | |
download | gcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.zip gcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.tar.gz gcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.tar.bz2 |
re PR middle-end/41855 (ICE in refs_may_alias_p_1, at tree-ssa-alias.c:855)
2009-10-28 Richard Guenther <rguenther@suse.de>
PR middle-end/41855
* tree-ssa-alias.c (refs_may_alias_p_1): Deal with CONST_DECLs
(ref_maybe_used_by_call_p_1): Fix bcopy handling.
(call_may_clobber_ref_p_1): Likewise.
* tree-ssa-structalias.c (find_func_aliases): Likewise.
* alias.c (nonoverlapping_memrefs_p): Deal with CONST_DECLs.
* gfortran.dg/lto/20091028-1_0.f90: New testcase.
* gfortran.dg/lto/20091028-1_1.c: Likewise.
* gfortran.dg/lto/20091028-2_0.f90: Likewise.
* gfortran.dg/lto/20091028-2_1.c: Likewise.
From-SVN: r153655
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 40226f2..1d4290f 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2200,6 +2200,13 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y) if (! DECL_P (exprx) || ! DECL_P (expry)) return 0; + /* With invalid code we can end up storing into the constant pool. + Bail out to avoid ICEing when creating RTL for this. + See gfortran.dg/lto/20091028-2_0.f90. */ + if (TREE_CODE (exprx) == CONST_DECL + || TREE_CODE (expry) == CONST_DECL) + return 1; + rtlx = DECL_RTL (exprx); rtly = DECL_RTL (expry); |