This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix libgo breakage (PR tree-optimization/67284)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Marek Polacek <polacek at redhat dot com>, Jeff Law <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Aug 2015 11:07:41 +0200
- Subject: Re: [PATCH] Fix libgo breakage (PR tree-optimization/67284)
- Authentication-results: sourceware.org; auth=none
- References: <20150821105233 dot GJ2729 at redhat dot com> <CAFiYyc1F8Vr9DfPuVwhYje9S0DQ1fUxmeSROkUo8u_4_u1q04g at mail dot gmail dot com> <20150821124922 dot GK2729 at redhat dot com> <CAFiYyc0zUPg=xUGxMka-JY36UqXYEk=aWarnrWvHPL4y=PKe-w at mail dot gmail dot com> <20150821144122 dot GL2729 at redhat dot com> <55D73F3A dot 5080901 at redhat dot com> <E2BA4AB5-D96D-4218-AAB7-9B26755679E7 at suse dot de> <20150821164215 dot GM2729 at redhat dot com> <7C836746-260C-4767-B17F-CA2181E771A5 at suse dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <polacek@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