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



Aldy Hernandez <aldyh at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |rsandifo at gcc dot gnu.org



--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-09 
18:45:34 UTC ---

I'm out of my depth here, but perhaps someone can give me a hint on how to

debug this further.



As alluded to earlier, this ICE only happens with sched-pressure scheduling.



The actual ICE happens in find_reloads_address_part(), where we have are

analyzing X=:



(const:DI (plus:DI (symbol_ref:DI ("glob_b"))

        (const_int 3 [0x3])))



prefer_reload_class() returns NO_REGS, because legitimate_reload_constant_p()

returns false for the X above.  So when we call force_const_mem() in

find_reloads_address_part...



  if (CONSTANT_P (x)

      && (!targetm.legitimate_constant_p (mode, x)

      || targetm.preferred_reload_class (x, rclass) == NO_REGS))

    {

      x = force_const_mem (mode, x);   <-- HERE



force_const_mem() returns NULL because s390_cannot_force_const_mem() returns

true for the SYMBOL_REF in -fPIC mode.



Bottom line-- force_const_mem() returns NULL for a (const (plus SYMBOL_REF

CONST)) with -fPIC, and then we dereference this NULL.



Is the RTL correct?



Any hints?

Reply via email to