[Bug target/36450] [IRA] ICE in insert_restore with GET_MODE_ALIGNMENT mem

2008-06-09 Thread aldot at gcc dot gnu dot org


--- Comment #2 from aldot at gcc dot gnu dot org  2008-06-09 17:08 ---
Vladimir,

Is the testcase ok as is or do you need it reduced?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36450



[Bug target/36450] [IRA] ICE in insert_restore with GET_MODE_ALIGNMENT mem

2008-06-09 Thread vmakarov at redhat dot com


--- 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



[Bug target/36450] [IRA] ICE in insert_restore with GET_MODE_ALIGNMENT mem

2008-06-06 Thread aldot at gcc dot gnu dot org


--- Comment #1 from aldot at gcc dot gnu dot org  2008-06-06 14:40 ---
Created an attachment (id=15726)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15726action=view)
original testcase from uClibc

ira-branch revision 136341
Works with -fno-ira

works with -mpreferred-stack-boundary=4 (in i386)
fails with =2:

/there.pentium4/build_i686/staging_dir/usr/bin/i686-linux-uclibc-gcc -c
strtod.i -o bug.o -m32 -O2 -mpreferred-stack-boundary=2 -fira


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36450