diff options
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 13ecf1c..84db3dd 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -269,18 +269,21 @@ resolve_formal_arglist (gfc_symbol *proc) if (sym->attr.if_source != IFSRC_UNKNOWN) resolve_formal_arglist (sym); + /* F08:C1279. */ + if (gfc_pure (proc) + && sym->attr.flavor == FL_PROCEDURE && !gfc_pure (sym)) + { + gfc_error ("Dummy procedure '%s' of PURE procedure at %L must " + "also be PURE", sym->name, &sym->declared_at); + continue; + } + if (sym->attr.subroutine || sym->attr.external || sym->attr.intrinsic) { - if (gfc_pure (proc) && !gfc_pure (sym)) - { - gfc_error ("Dummy procedure '%s' of PURE procedure at %L must " - "also be PURE", sym->name, &sym->declared_at); - continue; - } - if (proc->attr.implicit_pure && !gfc_pure(sym)) proc->attr.implicit_pure = 0; + /* F08:C1289. */ if (gfc_elemental (proc)) { gfc_error ("Dummy procedure at %L not allowed in ELEMENTAL " @@ -382,7 +385,7 @@ resolve_formal_arglist (gfc_symbol *proc) if (gfc_elemental (proc)) { - /* F2008, C1289. */ + /* F08:C1289. */ if (sym->attr.codimension) { gfc_error ("Coarray dummy argument '%s' at %L to elemental " |