[Bug fortran/40728] Bogus error "Error: Can't convert UNKNOWN to REAL(8) at (1)"

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Jul 22 08:38:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list