http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51218

--- Comment #20 from Harald Anlauf <anlauf at gmx dot de> 2011-11-22 21:56:32 
UTC ---
(In reply to comment #17)
> Untested patch:
> 
> --- a/gcc/fortran/resolve.c
> +++ b/gcc/fortran/resolve.c
> @@ -3257,6 +3255,7 @@ pure_subroutine (gfc_code *c, gfc_symbol *sym)
>    else if (gfc_pure (NULL))
>      gfc_error ("Subroutine call to '%s' at %L is not PURE", sym->name,
>                &c->loc);
> +  gfc_current_ns->proc_name->attr.implicit_pure = 0;
>  }

The patch works for the testcase in comment #16.
It did not produce any regressions in my tests.

(It also solves my original problem, which is a nice by-product.)

Thanks,
Harald

Reply via email to