This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36450] [IRA] ICE in insert_restore with GET_MODE_ALIGNMENT mem
- From: "vmakarov at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2008 17:22:27 -0000
- Subject: [Bug target/36450] [IRA] ICE in insert_restore with GET_MODE_ALIGNMENT mem
- References: <bug-36450-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from vmakarov at redhat dot com 2008-06-09 17:22 -------
The test is ok. Thanks.
The problem is very simple. The assertion causing abort is simply wrong. I
reproduced the same bug for the old register allocator. I just used wetstone
for this.
The assertion is wrong because alignment can not be bigger the preferred stack
boundary (please see function.c::assign_stack_slot). It is a very old code.
Instead of
gcc_assert (GET_MODE_ALIGNMENT (GET_MODE (mem) <= MEM_ALIGN (mem))
in caller_save.c::insert_save/insert_restore, the assertion should be
gcc_assert (MIN (PREFERRED_STACK_BOUNDARY, GET_MODE_ALIGNMENT (GET_MODE (mem))
<= MEM_ALIGN (mem))
I'll submit the patch to the branch today or tomorrow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36450