http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58099
--- Comment #17 from janus at gcc dot gnu.org --- (In reply to janus from comment #16) > TODO: Fix also the issue with PURE/ELEMENTAL reported in comment 14. Here is a small patch which does it: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 202765) +++ gcc/fortran/resolve.c (working copy) @@ -1679,6 +1679,11 @@ gfc_resolve_intrinsic (gfc_symbol *sym, locus *loc gfc_copy_formal_args_intr (sym, isym); + if (isym->pure && !gfc_add_pure (&sym->attr, &sym->declared_at)) + return false; + if (isym->elemental && !gfc_add_elemental (&sym->attr, &sym->declared_at)) + return false; + /* Check it is actually available in the standard settings. */ if (!gfc_check_intrinsic_standard (isym, &symstd, false, sym->declared_at)) { The PURE and ELEMENTAL properties of the intrinsic procedures were just not properly propagated during symbol resolution.