This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Fortran] PR fortran/77782 - ICE in gfc_get_union_type
- From: Andre Vehreschild <vehre at gmx dot de>
- To: Fritz Reese <fritzoreese at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, fortran <fortran at gcc dot gnu dot org>
- Date: Fri, 30 Sep 2016 10:43:35 +0200
- Subject: Re: [PATCH, Fortran] PR fortran/77782 - ICE in gfc_get_union_type
- Authentication-results: sourceware.org; auth=none
- References: <CAE4aFAnv3yM=U+bZWdqT-TqH61wjd8bS8Dg0ienyOFVacqreLQ@mail.gmail.com>
Hi Fritz,
looks OK to me.
- Andre
On Thu, 29 Sep 2016 10:03:58 -0400
Fritz Reese <fritzoreese@gmail.com> wrote:
> ICE in [1] is due to an incomplete fix for PR fortran/77327 (r239819,
> see [2],[3]). Specifically in interface.c (gfc_compare_derived_types)
> I overlooked the case where FL_UNION type symbols could be compared as
> equal to FL_STRUCTURE type symbols, which is _never_ correct. The
> faulty logic causes a UNION to be considered equal to a STRUCTURE,
> thus the union receives the structure's backend declaration. Obviously
> everything goes haywire from there.
>
> Attached is the [obvious] fix. Will commit to trunk soon, barring any
> concerns from others.
>
> ---
> Fritz Reese
>
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77782
> [2] https://gcc.gnu.org/ml/fortran/2016-08/msg00144.html
> [3] https://gcc.gnu.org/ml/fortran/2016-08/msg00145.html
>
> 2016-09-29 Fritz Reese <fritzoreese@gmail.com>
>
> Fix ICE caused by union types comparing equal to structure types.
>
> PR fortran/77782
> * gcc/fortran/interface.c (gfc_compare_derived_types): Use
> gfc_compare_union_types to compare union types.
>
> PR fortran/77782
> * gcc/testsuite/gfortran.dg/dec_structure_16.f90: New testcase.
--
Andre Vehreschild * Email: vehre ad gmx dot de