------- Comment #1 from bdavis at gcc dot gnu dot org 2009-12-03 19:16 ------- here is a patch against 4.4.1
diff --context --recursive gcc-4.4.1/gcc/fortran/gfortran.h gcc-4.4.1_bud/gcc/fortran/gfortran.h *** gcc-4.4.1/gcc/fortran/gfortran.h 2009-02-21 16:25:06.000000000 -0600 --- gcc-4.4.1_bud/gcc/fortran/gfortran.h 2009-12-03 09:24:11.000000000 -0600 *************** *** 2024,2029 **** --- 2024,2030 ---- int flag_init_character; char flag_init_character_value; int flag_align_commons; + int flag_no_automatic; int fpe; diff --context --recursive gcc-4.4.1/gcc/fortran/options.c gcc-4.4.1_bud/gcc/fortran/options.c *** gcc-4.4.1/gcc/fortran/options.c 2008-11-03 01:20:24.000000000 -0600 --- gcc-4.4.1_bud/gcc/fortran/options.c 2009-12-03 09:24:54.000000000 -0600 *************** *** 346,352 **** /* Implement -fno-automatic as -fmax-stack-var-size=0. */ if (!gfc_option.flag_automatic) ! gfc_option.flag_max_stack_var_size = 0; if (pedantic) { --- 346,355 ---- /* Implement -fno-automatic as -fmax-stack-var-size=0. */ if (!gfc_option.flag_automatic) ! { ! gfc_option.flag_no_automatic = 1; ! gfc_option.flag_max_stack_var_size = 0; ! } if (pedantic) { diff --context --recursive gcc-4.4.1/gcc/fortran/resolve.c gcc-4.4.1_bud/gcc/fortran/resolve.c *** gcc-4.4.1/gcc/fortran/resolve.c 2009-06-20 04:21:06.000000000 -0500 --- gcc-4.4.1_bud/gcc/fortran/resolve.c 2009-12-03 09:49:52.000000000 -0600 *************** *** 7486,7492 **** /* For saved variables, we don't want to add an initializer at function entry, so we just add a static initializer. */ ! if (sym->attr.save || sym->ns->save_all) { /* Don't clobber an existing initializer! */ gcc_assert (sym->value == NULL); --- 7486,7492 ---- /* For saved variables, we don't want to add an initializer at function entry, so we just add a static initializer. */ ! if (sym->attr.save || sym->ns->save_all || gfc_option.flag_no_automatic ) { /* Don't clobber an existing initializer! */ gcc_assert (sym->value == NULL); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42267