------- Comment #7 from dominiq at lps dot ens dot fr 2010-02-26 19:27 ------- > Change attr.is_main_program to sym->ns->proc_name->attr.is_main_program
This change fixes most of the failures I have seen. Is if (TREE_STATIC (decl) && !sym->attr.use_assoc && (sym->attr.save || sym->attr.is_main_program)) the only place where this change should be done? The following test still fails: implicit none CALL data_init_scalar() CONTAINS SUBROUTINE data_init_scalar() integer :: a data a / 1 / IF (a /= 1) CALL abort() END SUBROUTINE END and some ICEs related to overlapping intializations (with DATA statements?) are gone. also the test in comment#2 of pr40440 (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17996&action=view ) abort at run time with Starting to load ifile a.out(29469) malloc: *** error for object 0xffffff0000000000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort I am now starting a gfortran regtest. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43178