On 01/27/2012 01:24 PM, Paul Richard Thomas wrote:
This is 'obvious' - OK for trunk.
Thanks for the review.
I realized that the following chunk was not in the submitted patch. I
have no idea why it got lost, but after committal of the original patch
and update of by devel tree it showed up with "svn diff". That case is
already tested for in the previously committed patch.
Follow up committed as Rev. 183625.
Tobias
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog (revision 183624)
+++ gcc/fortran/ChangeLog (working copy)
@@ -1,5 +1,12 @@
2012-01-27 Tobias Burnus <bur...@net-b.de>
+ PR fortran/52016
+ * resolve.c (resolve_formal_arglist): Fix elemental
+ constraint checks for polymorphic dummies also for
+ pointers.
+
+2012-01-27 Tobias Burnus <bur...@net-b.de>
+
PR fortran/51970
PR fortran/51977
* primary.c (gfc_match_varspec. gfc_match_rvalue): Set
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c (revision 183624)
+++ gcc/fortran/resolve.c (working copy)
@@ -401,7 +401,9 @@
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,