[Bug target/66906] [4.9/5/6] gcc.dg/torture/stackalign/nested-1.c fails on ICE with -O0 -m32 -mregparm=3 or -miamcu
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 17 13:54:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66906
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
This avoids ICE, but executable crashes:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0551a75..47b4f06 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11643,7 +11643,9 @@ ix86_expand_prologue (void)
/* For the purposes of frame and register save area addressing,
we've started over with a new frame. */
- m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
+ m->fs.sp_offset = (INCOMING_FRAME_SP_OFFSET
+ + (ix86_static_chain_on_stack
+ ? UNITS_PER_WORD : 0));
m->fs.realigned = true;
}
More information about the Gcc-bugs
mailing list