aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorAndre Vehreschild <vehre@gcc.gnu.org>2016-11-20 15:21:43 +0100
committerAndre Vehreschild <vehre@gcc.gnu.org>2016-11-20 15:21:43 +0100
commit8294f55513cd9f15b6ac729265c45a7a6837898f (patch)
tree58b4540d83d04271450ff7f8aceb277459f0a59f /gcc/fortran/resolve.c
parent5b7f6ed0b39936a0e29e76a54d94a85bc0787f18 (diff)
downloadgcc-8294f55513cd9f15b6ac729265c45a7a6837898f.zip
gcc-8294f55513cd9f15b6ac729265c45a7a6837898f.tar.gz
gcc-8294f55513cd9f15b6ac729265c45a7a6837898f.tar.bz2
re PR fortran/78395 ([OOP] error on polymorphic assignment)
gcc/testsuite/ChangeLog: 2016-11-20 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/78395 * gfortran.dg/typebound_operator_21.f03: New test. gcc/fortran/ChangeLog: 2016-11-20 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/78395 * resolve.c (resolve_typebound_function): Prevent stripping of refs, when the base-expression is a class' typed one. From-SVN: r242637
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 825bb12..589a673 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -6140,7 +6140,7 @@ resolve_typebound_function (gfc_expr* e)
gfc_free_ref_list (class_ref->next);
class_ref->next = NULL;
}
- else if (e->ref && !class_ref)
+ else if (e->ref && !class_ref && expr->ts.type != BT_CLASS)
{
gfc_free_ref_list (e->ref);
e->ref = NULL;