aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2018-09-16 21:57:52 +0200
committerJanus Weil <janus@gcc.gnu.org>2018-09-16 21:57:52 +0200
commit74b08343dab5369d2229e52c7c2d2056378cbe4e (patch)
treecc9e71ec9710800de03ae5d6644b3f0977215365 /gcc/fortran
parented33417a64bfe3d5d8159e29751532c34cb54990 (diff)
downloadgcc-74b08343dab5369d2229e52c7c2d2056378cbe4e.zip
gcc-74b08343dab5369d2229e52c7c2d2056378cbe4e.tar.gz
gcc-74b08343dab5369d2229e52c7c2d2056378cbe4e.tar.bz2
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
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/match.c3
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6f4872e..4c6c244 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+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
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 85247dd8..badd3c4 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -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;
}