From d646bbce3459647a1e6c426ca5ec637970fec842 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Thu, 24 Jun 2010 09:51:22 +0200 Subject: re PR fortran/44614 ([OOP] Wrongly importing a symbol into an interface without IMPORT) 2010-06-24 Tobias Burnus PR fortran/44614 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS. 2010-06-24 Tobias Burnus PR fortran/44614 * gfortran.dg/import8.f90: New. From-SVN: r161310 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/decl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 07a5825123b..e887e6f7491 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2010-06-24 Tobias Burnus + + PR fortran/44614 + * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS. + 2010-06-22 Janus Weil PR fortran/44616 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index f7f48002d3f..aa7a2668fce 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1764,7 +1764,7 @@ variable_decl (int elem) specified in the procedure definition, except that the interface may specify a procedure that is not pure if the procedure is defined to be pure(12.3.2). */ - if (current_ts.type == BT_DERIVED + if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS) && gfc_current_ns->proc_name && gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY && current_ts.u.derived->ns != gfc_current_ns) -- cgit v1.2.1