Commit 74b08343 by Janus Weil

fix PR 86484 and PR 84543

2018-09-16  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/86484
	PR fortran/84543
	* match.c (gfc_match_assignment): For a polymorphic assignment,
	make sure that the vtab for the rhs type is generated.

2018-09-16  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/86484
	PR fortran/84543
	* gfortran.dg/class_assign_2.f90: New test case.
	* gfortran.dg/class_assign_3.f90: New test case.

From-SVN: r264350
parent ed33417a
2018-09-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/86484
PR fortran/84543
* match.c (gfc_match_assignment): For a polymorphic assignment,
make sure that the vtab for the rhs type is generated.
2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/37802
......
......@@ -1366,6 +1366,9 @@ gfc_match_assignment (void)
gfc_check_do_variable (lvalue->symtree);
if (lvalue->ts.type == BT_CLASS)
gfc_find_vtab (&rvalue->ts);
return MATCH_YES;
}
......
2018-09-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/86484
PR fortran/84543
* gfortran.dg/class_assign_2.f90: New test case.
* gfortran.dg/class_assign_3.f90: New test case.
2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/37802
......
! { dg-do link }
!
! PR 86484:[OOP] Undefined symbol when using polymorphic intrinsic assignment
!
! Contributed by Rich Townsend <townsend@astro.wisc.edu>
program test_assign
implicit none
type :: foo_t
end type
type, extends (foo_t) :: bar_t
end type
class(foo_t), allocatable :: f
type(bar_t) :: b
f = b
end
! { dg-do link }
!
! PR 84543: undefined reference to __copy_INTEGER_4_.3788
!
! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
class(*), allocatable :: x
x = 42
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment