diff mbox

[Fortran,OOP] PR 80766: [7/8 Regression] ICE with type-bound procedure returning an array

Message ID CAKwh3qjhnT_SSeagFuHq4+A9D=_nAks+KYeOV6fyJ6C+SPCJKw@mail.gmail.com
State New
Headers show

Commit Message

Janus Weil May 21, 2017, 4:14 p.m. UTC
Hi all,

the attached patch fixes an ICE-on-valid regression by making sure
that the relevant vtype symbol is resolved properly (for further
discussion see the PR).

The patch regtests cleanly on x86_64-linux-gnu. Ok for trunk and 7-branch?

Cheers,
Janus


2017-05-21  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/80766
    * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
    properly resolved.

2017-05-21  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/80766
    * gfortran.dg/typebound_call_28.f90: New test.

Comments

Jerry DeLisle May 21, 2017, 9:56 p.m. UTC | #1
On 05/21/2017 09:14 AM, Janus Weil wrote:
> Hi all,
> 
> the attached patch fixes an ICE-on-valid regression by making sure
> that the relevant vtype symbol is resolved properly (for further
> discussion see the PR).
> 
> The patch regtests cleanly on x86_64-linux-gnu. Ok for trunk and 7-branch?
> 
> Cheers,
> Janus
> 
> 
> 2017-05-21  Janus Weil  <janus@gcc.gnu.org>
> 
>      PR fortran/80766
>      * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
>      properly resolved.
> 
> 2017-05-21  Janus Weil  <janus@gcc.gnu.org>
> 
>      PR fortran/80766
>      * gfortran.dg/typebound_call_28.f90: New test.
> 

OK to commit. I have been unable to commit another patch today. Server down or 
internet connection gone.  I will try later. Hope its OK from your side of the pond.

Jerry
Janus Weil May 22, 2017, 5:10 p.m. UTC | #2
2017-05-21 23:56 GMT+02:00 Jerry DeLisle <jvdelisle@charter.net>:
> On 05/21/2017 09:14 AM, Janus Weil wrote:
>>
>> Hi all,
>>
>> the attached patch fixes an ICE-on-valid regression by making sure
>> that the relevant vtype symbol is resolved properly (for further
>> discussion see the PR).
>>
>> The patch regtests cleanly on x86_64-linux-gnu. Ok for trunk and 7-branch?
>>
>> Cheers,
>> Janus
>>
>>
>> 2017-05-21  Janus Weil  <janus@gcc.gnu.org>
>>
>>      PR fortran/80766
>>      * resolve.c (resolve_fl_derived): Make sure that vtype symbols are
>>      properly resolved.
>>
>> 2017-05-21  Janus Weil  <janus@gcc.gnu.org>
>>
>>      PR fortran/80766
>>      * gfortran.dg/typebound_call_28.f90: New test.
>>
>
> OK to commit. I have been unable to commit another patch today. Server down
> or internet connection gone.  I will try later. Hope its OK from your side
> of the pond.

Thanks, Jerry. Just committed as r248341 (without any problems). Will
backport to the 7-branch in about a week or so.

Cheers,
Janus
diff mbox

Patch

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 248308)
+++ gcc/fortran/resolve.c	(working copy)
@@ -13832,6 +13832,8 @@  resolve_fl_derived (gfc_symbol *sym)
 	  gfc_symbol *vtab = gfc_find_derived_vtab (data->ts.u.derived);
 	  gcc_assert (vtab);
 	  vptr->ts.u.derived = vtab->ts.u.derived;
+	  if (!resolve_fl_derived0 (vptr->ts.u.derived))
+	    return false;
 	}
     }