From 4b5553a3a115a1822c78b95caa6bf9e3836be017 Mon Sep 17 00:00:00 2001 From: bstarynk Date: Thu, 29 Oct 2009 09:21:19 +0000 Subject: 2009-10-29 Basile Starynkevitch MELT branch merged with trunk rev 153696 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@153697 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/alias.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/alias.c') diff --git a/gcc/alias.c b/gcc/alias.c index 40226f26b17..1d4290f7848 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); -- cgit v1.2.1