------- Comment #13 from burnus at gcc dot gnu dot org 2010-07-16 12:08 ------- Patch for -fwhole-file (not regtested).
Paul, do you know why derived types where excluded? Index: trans-decl.c =================================================================== --- trans-decl.c (revision 162255) +++ trans-decl.c (working copy) @@ -1149,11 +1149,9 @@ gfc_get_symbol_decl (gfc_symbol * sym) return sym->backend_decl; /* If use associated and whole file compilation, use the module - declaration. This is only needed for intrinsic types because - they are substituted for one another during optimization. */ + declaration. */ if (gfc_option.flag_whole_file && sym->attr.flavor == FL_VARIABLE - && sym->ts.type != BT_DERIVED && sym->attr.use_assoc && sym->module) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945