This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IPA: Devirtualization versus placement new
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Andrew Haley <aph at redhat dot com>, Volker Simonis <volker dot simonis at gmail dot com>, jwakely dot gcc at gmail dot com, richard dot guenther at gmail dot com, gcc at gcc dot gnu dot org
- Date: Fri, 25 Apr 2014 21:05:14 +0200
- Subject: Re: IPA: Devirtualization versus placement new
- Authentication-results: sourceware.org; auth=none
- References: <CA+3eh12AS96AwAdVnas944ZCUWmCuuNYc6ZTF2Pq+Orp1Yuuzw at mail dot gmail dot com> <535A6EB1 dot 80700 at redhat dot com> <20140425182322 dot GA10553 at kam dot mff dot cuni dot cz> <20140425184846 dot GU1817 at tucnak dot redhat dot com>
> On Fri, Apr 25, 2014 at 08:23:22PM +0200, Jan Hubicka wrote:
> > > On 04/25/2014 03:14 PM, Volker Simonis wrote:
> > > > Could you therefore please re-categorize this as devirt bug.
> > >
> > > It is an IPA bug. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60965
> >
> > Now when I have interest from ubsan direction, I wanted to ask. Would it make sense to turn
> > those unreachables into traps with ubsan enabled? (similarly in the loop stuff)
>
> With -fsanitize=undefined __builtin_unreachable is folded right away into a
> library call that will emit a message and then die.
I see, that sounds good. Who will ensure that all calls to builtin_unreachable we introduce
late will get folded?
The testcase dies with -fsanitize=undefined -fdump-ipa-all, I will look into it.
W/o it I get:
.$ ./a.out
t.C:19:41: runtime error: load of null pointer of type '<unknown> *'
I would certainly not really parse this message. It goes away with -fno-devirtualize
Honza