------- Comment #2 from burnus at gcc dot gnu dot org 2010-02-01 22:16 ------- The problem is somehow that for the second parsing using decl.c's gfc_match_decl_type_spec one has in:
else if (ts->kind == -1) { int iface = gfc_state_stack->previous->state != COMP_INTERFACE || gfc_current_ns->has_import_set; if (gfc_find_symbol (name, NULL, iface, &sym)) { gfc_error ("Type name '%s' at %C is ambiguous", name); return MATCH_ERROR; } the result sym == NULL with RESULT() but not without RESULT(); while "iface==1" and name == "t" for both cases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42650