This is with: gcc 42 r118474 *and* gcc-trunk r118474 on x86_64. gfortran.dg/constant_substring.f fails with: constant_substring.f:0: internal compiler error: Aborted
Minimal testcase: character*2 a character*4 b parameter (a="12") parameter (b = a(1:2)) end Backtrace (with trunk): Breakpoint 2, 0x00002ae861d6f880 in abort () from /lib64/libc.so.6 (gdb) bt #0 0x00002ae861d6f880 in abort () from /lib64/libc.so.6 #1 0x00002ae861daa920 in malloc_printerr () from /lib64/libc.so.6 #2 0x000000000041466f in gfc_set_constant_character_len (len=0, expr=0xdd46a0) at /home/tob/projects/gcc/gcc/fortran/decl.c:762 #3 0x0000000000414869 in gfc_match_parameter () at /home/tob/projects/gcc/gcc/fortran/decl.c:3825 #4 0x000000000043fdd3 in match_word (str=0xd97700 "12", subr=0x4146e0 <gfc_match_parameter>, old_locus=0x7fff493fd560) at /home/tob/projects/gcc/gcc/fortran/parse.c:65 #5 0x0000000000440529 in decode_statement () at /home/tob/projects/gcc/gcc/fortran/parse.c:254 #6 0x0000000000440d6b in next_statement () at /home/tob/projects/gcc/gcc/fortran/parse.c:493 #7 0x0000000000442b6c in parse_spec (st=ST_PARAMETER) at /home/tob/projects/gcc/gcc/fortran/parse.c:1869 #8 0x0000000000443036 in parse_progunit (st=14251776) at /home/tob/projects/gcc/gcc/fortran/parse.c:2870 #9 0x0000000000443560 in gfc_parse_file () at /home/tob/projects/gcc/gcc/fortran/parse.c:3206 #10 0x000000000046031e in gfc_be_parse_file (set_yydebug=<value optimized out>) at /home/tob/projects/gcc/gcc/fortran/f95-lang.c:305 #11 0x00000000007634f3 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at /home/tob/projects/gcc/gcc/toplev.c:1033 #12 0x00002ae861d5bae4 in __libc_start_main () from /lib64/libc.so.6 #13 0x0000000000404f59 in _start () -- Summary: ICE [regression, trunk, 4.2]: in gfc_set_constant_character_len decl.c:762 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobias dot burnus at physik dot fu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29713