From c696c6f311f1557e36b9b935ba9b0a732477438d Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Fri, 27 Jan 2012 14:59:04 +0100 Subject: re PR fortran/52016 ([OOP] Polymorphism and elemental: missing diagnostic) 2012-01-27 Tobias Burnus PR fortran/52016 * resolve.c (resolve_formal_arglist): Fix elemental constraint checks for polymorphic dummies also for pointers. From-SVN: r183625 --- gcc/fortran/resolve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 2e51004..2a96712 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -401,7 +401,9 @@ resolve_formal_arglist (gfc_symbol *proc) continue; } - if (sym->attr.pointer) + if (sym->attr.pointer + || (sym->ts.type == BT_CLASS && CLASS_DATA (sym) + && CLASS_DATA (sym)->attr.class_pointer)) { gfc_error ("Argument '%s' of elemental procedure at %L cannot " "have the POINTER attribute", sym->name, -- cgit v1.1