summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-27 13:59:04 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-27 13:59:04 +0000
commit4289983ab1b23688664b926962a3652169662cbb (patch)
treef725e8f29706eddabada7f9d20a5220aeae751c0
parentc7af8ae71c5450921a79b29f1cec9d427cd3c975 (diff)
downloadgcc-4289983ab1b23688664b926962a3652169662cbb.tar.gz
2012-01-27 Tobias Burnus <burnus@net-b.de>
PR fortran/52016 * resolve.c (resolve_formal_arglist): Fix elemental constraint checks for polymorphic dummies also for pointers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183625 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/resolve.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6a6b05cbedc..b54ad3d6a1a 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,12 @@
2012-01-27 Tobias Burnus <burnus@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 <burnus@net-b.de>
+
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 2e510047143..2a967120d29 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,