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

Janus Weil janus@gcc.gnu.org
Sun May 21 16:14:00 GMT 2017


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.
-------------- next part --------------
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;
 	}
     }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typebound_call_28.f90
Type: text/x-fortran
Size: 539 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170521/de0b5347/attachment.bin>


More information about the Fortran mailing list