http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54556
--- Comment #11 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-09-13 12:31:03 UTC --- (In reply to comment #10) > Draft patch (replaces the one in comment 9): > > --- a/gcc/fortran/resolve.c > +++ b/gcc/fortran/resolve.c > @@ -13567,6 +13572,5 @@ gfc_impure_variable (gfc_symbol *sym) > proc = sym->ns->proc_name; > - if (sym->attr.dummy && gfc_pure (proc) > - && ((proc->attr.subroutine && sym->attr.intent == INTENT_IN) > - || > - proc->attr.function)) > + if (sym->attr.dummy > + && ((proc->attr.subroutine && sym->attr.intent == INTENT_IN) > + || proc->attr.function)) > return 1; this one fixes the error seen with CP2K.