backport: re PR fortran/80766 ([OOP] ICE with type-bound procedure returning an array)
2017-06-05 Janus Weil <janus@gcc.gnu.org> Backport from trunk PR fortran/80766 * resolve.c (resolve_fl_derived): Make sure that vtype symbols are properly resolved. 2017-06-05 Janus Weil <janus@gcc.gnu.org> Backport from trunk PR fortran/80766 * gfortran.dg/typebound_call_28.f90: New test. From-SVN: r248873
This commit is contained in:
parent
9b364150d9
commit
7c74f817f5
@ -1,3 +1,10 @@
|
||||
2017-06-05 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
Backport from trunk
|
||||
PR fortran/80766
|
||||
* resolve.c (resolve_fl_derived): Make sure that vtype symbols are
|
||||
properly resolved.
|
||||
|
||||
2017-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/80904
|
||||
|
@ -13835,6 +13835,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2017-06-05 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
Backport from trunk
|
||||
PR fortran/80766
|
||||
* gfortran.dg/typebound_call_28.f90: New test.
|
||||
|
||||
2017-06-02 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/80904
|
||||
|
37
gcc/testsuite/gfortran.dg/typebound_call_28.f90
Normal file
37
gcc/testsuite/gfortran.dg/typebound_call_28.f90
Normal file
@ -0,0 +1,37 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 80766: [7/8 Regression] [OOP] ICE with type-bound procedure returning an array
|
||||
!
|
||||
! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
|
||||
|
||||
module m1
|
||||
|
||||
type :: base
|
||||
contains
|
||||
procedure :: fun
|
||||
end type
|
||||
|
||||
type, extends(base) :: child
|
||||
end type
|
||||
|
||||
contains
|
||||
|
||||
function fun(o) result(res)
|
||||
real :: res(3)
|
||||
class(base) :: o
|
||||
res = 0
|
||||
end function
|
||||
end module
|
||||
|
||||
|
||||
module m2
|
||||
contains
|
||||
|
||||
subroutine sub(o)
|
||||
use m1
|
||||
class(child) :: o
|
||||
real :: res(3)
|
||||
|
||||
res = o%fun()
|
||||
end subroutine
|
||||
end module
|
Loading…
Reference in New Issue
Block a user