strcat (buf, name);
next_sym->lib_name = gfc_get_string (buf);
- /* There are no IMPURE ELEMENTAL intrinsics, thus the ELEMENTAL class
- also implies PURE. Additionally, there's the PURE class itself. */
- next_sym->pure = (cl == CLASS_ELEMENTAL || cl == CLASS_PURE);
-
+ next_sym->pure = (cl != CLASS_IMPURE);
next_sym->elemental = (cl == CLASS_ELEMENTAL);
next_sym->inquiry = (cl == CLASS_INQUIRY);
next_sym->transformational = (cl == CLASS_TRANSFORMATIONAL);
void
gfc_intrinsic_init_1 (void)
{
- int i;
-
nargs = nfunc = nsub = nconv = 0;
/* Create a namespace to hold the resolved intrinsic symbols. */
/* Character conversion intrinsics need to be treated separately. */
add_char_conversions ();
-
- /* Set the pure flag. All intrinsic functions are pure, and
- intrinsic subroutines are pure if they are elemental. */
-
- for (i = 0; i < nfunc; i++)
- functions[i].pure = 1;
-
- for (i = 0; i < nsub; i++)
- subroutines[i].pure = subroutines[i].elemental;
}
c->resolved_sym->attr.elemental = isym->elemental;
}
- if (gfc_pure (NULL) && !isym->elemental)
+ if (gfc_pure (NULL) && !isym->pure)
{
gfc_error ("Subroutine call to intrinsic '%s' at %L is not PURE", name,
&c->loc);