This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/20813] [4.1 Regression] ICE in gen_reg_rtx for 3 spec tests


------- Additional Comments From geoffk at gcc dot gnu dot org  2005-04-28 18:58 -------
OK, the problem is definitely a latent bug.

The problem is that in fix_truncdfsi2, it creates a stack temporary, with

 operands[3] = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);                                                      

which just happens to be something like

(mem/i:DI (plus:SI (reg/f:SI 114 virtual-stack-vars)
        (const_int 32768 [0x8000])) [0 S8 A64])

Uh-oh!  That's not an address!  So when instantiate_virtual_regs_1 notices this, it rewrites it to:

            (clobber (mem/i:DI (plus:SI (reg/f:SI 30 r30)
                        (reg:SI 128)) [0 S8 A64]))
 
but fix_truncdfsi2_internal needs an offsettable operand,

   (clobber (match_operand:DI 3 "memory_operand" "=o"))]

because it plans to use plus_constant on it.

For me, the testcase fails even if I just say "-mcpu=rs64a", there's no need for actual 64-bit pointers.

I guess the right fix is to use adjust_address rather than plus_constant.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]