[patch] Fix gnat.dg/aliasing2.adb regression

Richard Guenther richard.guenther@gmail.com
Thu Dec 2 13:37:00 GMT 2010


On Thu, Dec 2, 2010 at 12:25 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> So your original patch is ok.
>
> I missed that this original patch also breaks C++, because TYPE_MIN/MAX_VALUE
> for C++ types can contain C++-specific tree nodes that CONTAINS_PLACEHOLDER_P
> isn't prepared to handle.  So we would need to teach the latter about them
> and this would slow down both the C++ and the Ada compilers.
>
> I'm proposing the following trick instead: do not fiddle with TYPE_CANONICAL
> if a non-shared type is requested.  The Ada compiler doesn't want these types
> to be merged, so having different TYPE_CANONICALs is just fine I think.
>
> Only LTO-bootstrapped (for C/Ada) on x86_64-suse-linux for now, I'll do a full
> regular bootstrap if accepted.  OK for mainline?

Yes.

Thanks,
Richard.

>
> 2010-12-02  Eric Botcazou  <ebotcazou@adacore.com>
>
>        * tree.c (build_range_type_1): Do not SET_TYPE_STRUCTURAL_EQUALITY
>        for a non-shared type.
>
>
> --
> Eric Botcazou
>



More information about the Gcc-patches mailing list