This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix miscompilation of gnat1 in LTO bootstrap


On Mon, Oct 6, 2014 at 12:16 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this is a regression from GCC 4.8.x: gnat1 (uintp.adb:UI_Lt) is miscompiled
> during a LTO boostrap when Init_Operand is inlined into it.  A store is
> wrongly deleted by GIMPLE DSE because of a missed aliasing relationship
> between 2 array types with TYPE_NONALIASED_COMPONENT set, one being a derived
> of the other in Ada, hence the latter being allowed to alias the former.
>
> Tested on x86_64-suse-linux, OK for the mainline and 4.9 branch?

Testcase?  I think it would be better to handle this in the canonical type
merging code in lto.c - or how does it end up working without LTO?  That is,
what does the Ada frontend do to make sure get_alias_set handles this
correctly?

Thanks,
Richard.

>
> 2014-10-06  Eric Botcazou  <ebotcazou@adacore.com>
>
>         * gimple.c (gimple_get_alias_set): Return 0 for array types with non-
>         aliased component and that contain PLACEHOLDER_EXPRs.
>
>
> --
> Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]