aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2010-06-24 09:51:22 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2010-06-24 09:51:22 +0200
commitd646bbce3459647a1e6c426ca5ec637970fec842 (patch)
tree5b5effa32a7d05fa602650079fdc73f6c53c5274 /gcc/fortran/decl.c
parent5f4a67a500ca1a69baaa622fec1e3217f52ec3a2 (diff)
downloadgcc-d646bbce3459647a1e6c426ca5ec637970fec842.zip
gcc-d646bbce3459647a1e6c426ca5ec637970fec842.tar.gz
gcc-d646bbce3459647a1e6c426ca5ec637970fec842.tar.bz2
re PR fortran/44614 ([OOP] Wrongly importing a symbol into an interface without IMPORT)
2010-06-24 Tobias Burnus <burnus@net-b.de> PR fortran/44614 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS. 2010-06-24 Tobias Burnus <burnus@net-b.de> PR fortran/44614 * gfortran.dg/import8.f90: New. From-SVN: r161310
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index f7f4800..aa7a266 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)