------- Comment #3 from burnus at gcc dot gnu dot org  2009-07-22 08:38 -------
Found it: In "resolve_function" one has:

      switch (procedure_kind (sym))
        {
        case PTYPE_GENERIC: ...
        case PTYPE_SPECIFIC: ...
        case PTYPE_UNKNOWN: ...

The correct branch would be "PTYPE_UNKNOWN", which correctly give the error.
But "procedure_kind" calls "generic_sym", which in turns calls:

  if (sym->attr.generic ||
      (sym->attr.intrinsic && gfc_generic_intrinsic (sym->name)))
    return 1;

The gfc_generic_intrinsic justs checks:
  sym = gfc_find_function (name);
  return (sym == NULL) ? 0 : sym->generic;

Expected: In the latter, one needs to add a
  gfc_check_intrinsic_standard (sym, NULL, true, 

Analogously for: gfc_specific_intrinsic.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40728

Reply via email to