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



Oleg Endo <olegendo at gcc dot gnu.org> changed:



           What    |Removed                     |Added

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

             Status|UNCONFIRMED                 |NEW

   Last reconfirmed|                            |2012-10-09

     Ever Confirmed|0                           |1



--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-10-09 10:41:23 
UTC ---

(In reply to comment #3)

> Doing this...

> 

> Index: gcc/config/sh/sh.c

> ===================================================================

> --- gcc/config/sh/sh.c    (revision 191865)

> +++ gcc/config/sh/sh.c    (working copy)

> @@ -10079,6 +10079,9 @@

>  static bool

>  sh_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)

>  {

> +  if (reload_completed)

> +    return true;

> +

>    if (MAYBE_BASE_REGISTER_RTX_P (x, strict))

>      return true;

>    else if ((GET_CODE (x) == POST_INC || GET_CODE (x) == PRE_DEC)

> 

> 

> makes the ICE go away.  However, I have not tested this for any other

> consequences.

> 



I'm wondering whether there is anything after reload that actually needs

address validation.  I guess that after the reload pass pretty much everything

should have been fixed up which could generate invalid addresses that need to

be transformed.  Of course, in one of the split passes after reload or the

peephole2 pass somebody could write a pattern that would result in an invalid

address.  But even now with the address checking after reload, if there is an

invalid address left after reload, which pass would legitimize it?

Reply via email to