diff mbox

[Committed] S/390: Remove assertion in s390_init_frame_layout

Message ID 20150708110018.GA3174@maggie
State New
Headers show

Commit Message

Andreas Krebbel July 8, 2015, 11 a.m. UTC
Hi,

since r225260 the backend register elimination hooks also get invoked
after reload is completed e.g. from sched2. During register
elimination we call s390_init_frame_layout which is not supposed to be
invoked after reload.  We had an assertion here to make sure this does
not happen.  This got triggered and currently breaks bootstrap on
S/390.  With the attached patch s390_init_frame_layout just becomes a
NOP when invoked after reload is completed.

Committed to mainline.

Bye,

-Andreas-


gcc/ChangeLog:

2015-07-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_init_frame_layout): Replace assertion
	with early exit.
diff mbox

Patch

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 4ef8e42..5715d89 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -9351,7 +9351,10 @@  s390_init_frame_layout (void)
   HOST_WIDE_INT frame_size;
   int base_used;
 
-  gcc_assert (!reload_completed);
+  /* After LRA the frame layout is supposed to be read-only and should
+     not be re-computed.  */
+  if (reload_completed)
+    return;
 
   /* On S/390 machines, we may need to perform branch splitting, which
      will require both base and return address register.  We have no