http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60283
Bug ID: 60283 Summary: Wrong code: decode_omp_directive: implicit_pure not correctly unset Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org decode_omp_directive (void) { ... if (gfc_implicit_pure (NULL)) gfc_current_ns->proc_name->attr.implicit_pure = 0; That code probably fails if one has BLOCK, which starts a new namespace. Cf. discussion for OpenACC at http://gcc.gnu.org/ml/gcc-patches/2014-02/msg01194.html Patch r168600 of 2011-01-08 added this assignment and possibly others; I wonder whether those also have problems with BLOCKS.