On Fri, Aug 21, 2015 at 07:22:24PM +0200, Richard Biener wrote:
> On August 21, 2015 6:42:15 PM GMT+02:00, Marek Polacek <pola...@redhat.com> 
> wrote:
> >On Fri, Aug 21, 2015 at 06:23:09PM +0200, Richard Biener wrote:
> >> >> Yes, but gimple_call_noreturn_p is false on __builtin_trap. 
> >That's
> >> >quite
> >> >> confusing... but flags_from_decl_or_type really returns 0 for
> >> >__builtin_trap.
> >> >Well, if that's intentional (and offhand I have no idea if it is),
> >then
> >> >
> >> >you could emit a __builtin_trap followed by a __builtin_unreachable.
> >> 
> >> But maybe go is non-call-exceptions  and that makes a difference?
> >
> >I suppose that's the case.  In Makefile.am I see
> >AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions
> >But I'm not clear on how this could make a difference wrt whether
> >__builtin_trap is volatile (thus ECF_NORETURN).
> 
> Not sure either. Needs to be investigated. BTW, built-in trap is also nothrow 
> AFAIR.

I think the bug is in the Go FE which incorrectly doesn't set
TREE_THIS_VOLATILE on the __builtin_trap decl.

        Jakub

Reply via email to