On 13/09/2012 14:35, Tobias Burnus wrote: > gfortran wrongly marks some procedures as implicit_pure which aren't > pure. implicit_pure exists since 2011-01-08 (= GCC 4.6), but was only > used internally (FE optimization and trans*.c to avoid temporaries). > Since 2012-08-28, implicit_pure also implies DECL_PURE_P. The later > change exposes a bug and miscompiles CP2K. > > The reason for the the bug is that gfc_impure_variable() checks at some > point whether it is invoked in a PURE procedure. For implicit_pure > procedures, the answer is no - thus that check never triggered. I have > now removed the check - the callee already takes care of that. (Which is > also implied by the function name.) > > I additionally allow VALUE for implicit_pure. That's in line with PURE > where VALUE is allowed since Fortran 2008. (I think since F2008's first > technical corriendum.) > > Build and regtested on x86-64-gnu-linux. > OK for the trunk and for the 4.6/4.7 branches? > > Tobias, > who hopes that no additional implicit_pure bugs exist.
OK, thanks.