https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109684
--- Comment #17 from Tomáš Trnka <trnka at scm dot com> --- (In reply to kargl from comment #10) > diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc > index 3cd470ddcca..b0bb8bc1471 100644 > --- a/gcc/fortran/resolve.cc > +++ b/gcc/fortran/resolve.cc > @@ -17966,7 +17966,9 @@ resolve_types (gfc_namespace *ns) > > for (n = ns->contained; n; n = n->sibling) > { > - if (gfc_pure (ns->proc_name) && !gfc_pure (n->proc_name)) > + if (gfc_pure (ns->proc_name) > + && !gfc_pure (n->proc_name) > + && !n->proc_name->attr.artificial) > gfc_error ("Contained procedure %qs at %L of a PURE procedure must " > "also be PURE", n->proc_name->name, > &n->proc_name->declared_at); > > pault, dos the above look correct? On our codebase, this patch behaves just like the patch in comment #5, in that it also triggers the issue described in comment #7 (assert in a warning about non-recursive procedures getting called recursively). Does either of you have any idea as to what that issue could be about? Or is isolating a testcase our only hope?