Fortran: Allow pure final procs contained in pure proc. [PR109684]
2023-08-09 Steve Kargl <sgk@troutmask.apl.washington.edu> gcc/fortran PR fortran/109684 * resolve.cc (resolve_types): Exclude contained procedures with the artificial attribute from test for pureness.
This commit is contained in:
parent
e3476ed223
commit
b8ec3c9523
1 changed files with 4 additions and 1 deletions
|
@ -17966,7 +17966,10 @@ resolve_types (gfc_namespace *ns)
|
|||
|
||||
for (n = ns->contained; n; n = n->sibling)
|
||||
{
|
||||
if (gfc_pure (ns->proc_name) && !gfc_pure (n->proc_name))
|
||||
/* Exclude final wrappers with the test for the artificial attribute. */
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue