[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 --- Comment #6 from janus at gcc dot gnu.org 2013-02-09 15:34:34 UTC --- The patch in comment 5 regtests cleanly!
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4 Target Milestone|--- |4.6.4
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 --- Comment #4 from janus at gcc dot gnu.org 2013-02-08 22:02:09 UTC --- The following, which is a partial revert of r183180, fixes the ICE: Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c(revision 195813) +++ gcc/fortran/resolve.c(working copy) @@ -10981,26 +10981,6 @@ build_default_init_expr (gfc_symbol *sym) gfc_free_expr (init_expr); init_expr = NULL; } - if (!init_expr gfc_option.flag_init_character == GFC_INIT_CHARACTER_ON - sym-ts.u.cl-length) -{ - gfc_actual_arglist *arg; - init_expr = gfc_get_expr (); - init_expr-where = sym-declared_at; - init_expr-ts = sym-ts; - init_expr-expr_type = EXPR_FUNCTION; - init_expr-value.function.isym = -gfc_intrinsic_function_by_id (GFC_ISYM_REPEAT); - init_expr-value.function.name = repeat; - arg = gfc_get_actual_arglist (); - arg-expr = gfc_get_character_expr (sym-ts.kind, sym-declared_at, - NULL, 1); - arg-expr-value.character.string[0] -= gfc_option.flag_init_character_value; - arg-next = gfc_get_actual_arglist (); - arg-next-expr = gfc_copy_expr (sym-ts.u.cl-length); - init_expr-value.function.actual = arg; -} break; default:
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 --- Comment #5 from janus at gcc dot gnu.org 2013-02-08 22:57:15 UTC --- (In reply to comment #4) The following, which is a partial revert of r183180, fixes the ICE: However, it fails on init_flag_9.f90, which the following version does not: Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c(revision 195813) +++ gcc/fortran/resolve.c(working copy) @@ -10982,7 +10982,7 @@ build_default_init_expr (gfc_symbol *sym) init_expr = NULL; } if (!init_expr gfc_option.flag_init_character == GFC_INIT_CHARACTER_ON - sym-ts.u.cl-length) + sym-ts.u.cl-length gfc_option.flag_max_stack_var_size != 0) { gfc_actual_arglist *arg; init_expr = gfc_get_expr ();
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 janus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords||ice-on-valid-code Last reconfirmed||2013-01-25 CC||janus at gcc dot gnu.org Ever Confirmed|0 |1 Summary|internal compiler error: in |[4.6/4.7/4.8 Regression] |gfc_get_symbol_decl, at |ICE with -fno-automatic |fortran/trans-decl.c:1418 |-finit-local-zero --- Comment #1 from janus at gcc dot gnu.org 2013-01-25 16:30:22 UTC --- Confirmed. Fails with 4.6, 4.7 and trunk, while it works at least with 4.3. Reduced/modified test case: subroutine cchaine (i) implicit none integer :: i character(len=i) :: chaine write(*,*) chaine end subroutine Backtrace on trunk: internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1441 subroutine cchaine (i) ^ 0x6500e4 gfc_get_symbol_decl(gfc_symbol*) /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:1441 0x65b9e6 generate_local_decl /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:4601 0x611b36 do_traverse_symtree /home/jweil/gcc48/trunk/gcc/fortran/symbol.c:3449 0x611c02 gfc_traverse_ns(gfc_namespace*, void (*)(gfc_symbol*)) /home/jweil/gcc48/trunk/gcc/fortran/symbol.c:3474 0x65c020 generate_local_vars /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:4760 0x65dad4 gfc_generate_function_code(gfc_namespace*) /home/jweil/gcc48/trunk/gcc/fortran/trans-decl.c:5334 0x62ea00 gfc_generate_code(gfc_namespace*) /home/jweil/gcc48/trunk/gcc/fortran/trans.c:1705 0x5cdff5 translate_all_program_units /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4463 0x5ce65b gfc_parse_file() /home/jweil/gcc48/trunk/gcc/fortran/parse.c:4677 0x61adad gfc_be_parse_file /home/jweil/gcc48/trunk/gcc/fortran/f95-lang.c:189
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 --- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-01-25 17:12:52 UTC --- Revision 183136 (2012-01-12) is OK; revision 183306 (2012-01-19) gives the ICE. This is due to a change made on 4.7 and backported to 4.6.
[Bug fortran/55907] [4.6/4.7/4.8 Regression] ICE with -fno-automatic -finit-local-zero
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55907 Dominique d'Humieres dominiq at lps dot ens.fr changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #3 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-01-25 17:21:14 UTC --- I'll bet on r183180 (pr51800). CCed Tobias.