http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55197
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2012-11-03 CC| |burnus at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-03 23:28:00 UTC --- Confirmed. The problem is that we do in module.c's gfc_use_modules: gfc_use_module (module_list); if (module_list->intrinsic) free_rename (module_list->rename); But then in trans-decl.c's gfc_trans_use_stmts: for (rent = use_stmt->rename; rent; rent = rent->next) While freeing the memory is probably fine for build-in intrinsic modules like ISO_Fortran_env and ISO_C_Binding; however, doing so for intrinsic modules which are loaded for a file is wrong. (Side note: We should free the rename list in trans-decl.c to avoid mem leaks.)