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/ChangeLog | 7 +++++++ gcc/fortran/resolve.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6a6b05c..b54ad3d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,12 @@ 2012-01-27 Tobias Burnus + PR fortran/52016 + * resolve.c (resolve_formal_arglist): Fix elemental + constraint checks for polymorphic dummies also for + pointers. + +2012-01-27 Tobias Burnus + PR fortran/51970 PR fortran/51977 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set 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