This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Enable pointer TBAA for LTO
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org, Bernd Schmidt <bschmidt at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Date: Mon, 23 Nov 2015 18:18:07 +0100
- Subject: Re: Enable pointer TBAA for LTO
- Authentication-results: sourceware.org; auth=none
- References: <20151108204618 dot GA68715 at kam dot mff dot cuni dot cz> <2674276 dot RkNxVPhA9u at polaris> <20151122233721 dot GB85269 at kam dot mff dot cuni dot cz> <2380329 dot HaujzAILy3 at polaris>
> > You are right, TYPE_NONALIASED_COMPONENT is the wrong way. I will fix it
> > and try to come up with a testcase (TYPE_NONALIASED_COMPONENT is quite
> > rarely used beast)
>
> It's only used in Ada as far as I know, but is quite sensitive and quickly
> leads to wrong code if not handled properly in my experience, so this could
> well be responsible for the gnat1 miscompilation.
Build fialed same way before my patch. Moreover the problem can only happen on
array of pointers that are type punned (i.e. using store like
(void *[r])array = [NULL, NULL, NULL]
and then accessing it as (int *[r]) array. I do not think C or Ada can produce
code like that.
I am re-testing with the fix to TYPE_NONALIASED_COMPONENT arrays I explained in
other email. Perhaps that helps, or perhaps it is one of those Ada/C type puning
glues getting miscompiled? Other Ada binaries (gnatbind) seems to work fine.
I will post backtrace once my testing gets to the ICE again.
Honza
>
> --
> Eric Botcazou