http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51218
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.7.0 |4.6.3 --- Comment #19 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-21 20:36:03 UTC --- (In reply to comment #18) > > @@ -3257,6 +3255,7 @@ pure_subroutine (gfc_code *c, gfc_symbol *sym) > > + gfc_current_ns->proc_name->attr.implicit_pure = 0; > > Harald's example has function calls not subroutines. I would > expect that you need to set this in pure_function as well. Hmm, I had the feeling that such a check is already there, but I have not really audited resolve.c > Also, does this type of change inhibit reason why > implicit_pure was added in the first place? One probably should add a check whether the called procedure has attr.implicit_pure has set - and only is not mark the current namespace as impure. Then, I don't think it will inhibit the reason for the initial change. And even if it does, having correct code is more important. We might be able to mark more code as implicit none - but first we need to make sure that code which is effectively not pure is also not marked as implicit_pure.