------- Comment #3 from hjl at lucon dot org 2006-01-31 23:34 ------- The problem is in gfc_resolve:
void gfc_resolve (gfc_namespace * ns) { ... gfc_traverse_ns (ns, resolve_symbol); ... for (n = ns->contained; n; n = n->sibling) gfc_resolve (ns) ... resolve_code (ns->code, ns); ... } Depending on the order of the code, resolve_code may be called before symbols are resolved. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26041