diff options
author | Tobias Burnus <burnus@net-b.de> | 2012-01-27 14:59:04 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-01-27 14:59:04 +0100 |
commit | c696c6f311f1557e36b9b935ba9b0a732477438d (patch) | |
tree | f725e8f29706eddabada7f9d20a5220aeae751c0 | |
parent | 3881dee9f01e9de110260ca5ee2be0a50d4e361b (diff) | |
download | gcc-c696c6f311f1557e36b9b935ba9b0a732477438d.zip gcc-c696c6f311f1557e36b9b935ba9b0a732477438d.tar.gz gcc-c696c6f311f1557e36b9b935ba9b0a732477438d.tar.bz2 |
re PR fortran/52016 ([OOP] Polymorphism and elemental: missing diagnostic)
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.
From-SVN: r183625
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 4 |
2 files changed, 10 insertions, 1 deletions
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 <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 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, |