https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93808

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #20)
> (In reply to Andrew Pinski from comment #19)
> >     t = (const uintptr_t *)(e - (4 -1));
> > 
> > is problemantic though.  e is not known to be aligned to uintptr_t.
> 
> That's right.  But it makes me wonder, why this has been discovered only on
> SH with, seemingly caused by fcross-jumping optimization option.  There are
> other more popular strict-alignment targets like ARM ... something is
> smelly, I think.

I think it is more by accident.    strict-alginment here should not make a
difference really as it is undefined even on non-strict targets. 
fcross-jumping in this case causes the BB that contains __builtin_unreachable
to go to an invalid basic-block which is valid optimization which just happens
on sh and for some reason not arm or other targets.  I have not looked into the
code or even the RTL to double check this theory though.

Reply via email to