summaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
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 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)