------- Comment #17 from hjl at lucon dot org 2006-08-31 18:28 ------- The previous gfc_get_derived_type tries to reuse the same TREE_TYPE:
/* In a module, if an equal derived type is already available in the specification block, use its backend declaration and those of its components, rather than building anew so that potential dummy and actual arguments use the same TREE_TYPE. Non-module structures, need to be built, if found, because the order of visits to the namespaces is different. */ for (ns = derived->ns->parent; ns; ns = ns->parent) { for (dt = ns->derived_types; dt; dt = dt->next) { if (derived->module == NULL && dt->derived->backend_decl == NULL && gfc_compare_derived_types (dt->derived, derived)) gfc_get_derived_type (dt->derived); if (copy_dt_decls_ifequal (dt->derived, derived)) break; } if (derived->backend_decl) goto other_equal_dts; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28908