segfault in match_case_eos
Martin Tee
aovb94@dsl.pipex.com
Tue Mar 21 19:08:00 GMT 2006
I believe only the CASE name can appear on a line containing the CASE
statement. The case block should occur on subsequent lines following
each case statement. I suppose it should fail gracefully but the
developers may know different :-)
Cheers,
Martin
Bernhard Fischer wrote:
>Hi,
>
>Does this one sound familiar to someone or should i file a bug?
>
>if i put the r(4) = 0 in it's own line, the ICE goes away, fwiw.
>
>$ cat loop_var_ICE.f
>! { dg-do compile }
>! { dg-options "-std=gnu" }
>! PR fortran
> implicit none
> integer(kind=1) :: i
> real :: r(3)
> select case (i)
> case (129) r(4) = 0
> end select
> end
>cow@s37:~/obj.ia32/gcc$ gfortran-4.1-HEAD -c loop_var_ICE.f
>loop_var_ICE.f:0: internal compiler error: Segmentation fault
>
>backtrace with trunk:
>
>(gdb) run loop_var_ICE.f -ffixed-form -quiet -dumpbase loop_var_ICE.f
>-mtune=generic -auxbase loop_var_ICE -version -I
>/opt/gcc-4.2/bin/../lib/gcc/i686-linux-gnu/4.2.0/finclude -o
>/tmp/ccUtvDVv.s
>Starting program: /opt/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.0/f951
>loop_var_ICE.f -ffixed-form -quiet -dumpbase loop_var_ICE.f
>-mtune=generic -auxbase loop_var_ICE -version -I
>/opt/gcc-4.2/bin/../lib/gcc/i686-linux-gnu/4.2.0/finclude -o
>/tmp/ccUtvDVv.s
>GNU F95 version 4.2.0 20060319 (experimental) (i686-linux-gnu)
> compiled by GNU C version 4.2.0 20060319 (experimental).
>GGC heuristics: --param ggc-min-expand=94 --param
>ggc-min-heapsize=121309
>
>Program received signal SIGSEGV, Segmentation fault.
>0x08074e86 in match_case_eos () at
>../../../src/gcc-4.2/gcc/fortran/match.c:3033
>3033 if (strcmp (name, gfc_current_block ()->name) != 0)
>(gdb) bt
>#0 0x08074e86 in match_case_eos () at
>../../../src/gcc-4.2/gcc/fortran/match.c:3033
>#1 0x08075d47 in gfc_match_case () at
>../../../src/gcc-4.2/gcc/fortran/match.c:3119
>#2 0x0807fb4f in match_word (str=0x0, subr=0x8075b8f <gfc_match_case>,
>old_locus=0xbf8c43a4) at ../../../src/gcc-4.2/gcc/fortran/parse.c:65
>#3 0x080806ca in decode_statement () at
>../../../src/gcc-4.2/gcc/fortran/parse.c:192
>#4 0x08080a44 in next_statement () at
>../../../src/gcc-4.2/gcc/fortran/parse.c:476
>#5 0x08081b22 in parse_executable (st=<value optimized out>) at
>../../../src/gcc-4.2/gcc/fortran/parse.c:2116
>#6 0x08082955 in parse_progunit (st=ST_ARITHMETIC_IF) at
>../../../src/gcc-4.2/gcc/fortran/parse.c:2866
>#7 0x08082d7d in gfc_parse_file () at
>../../../src/gcc-4.2/gcc/fortran/parse.c:3182
>#8 0x0809fff4 in gfc_be_parse_file (set_yydebug=0) at
>../../../src/gcc-4.2/gcc/fortran/f95-lang.c:298
>#9 0x082d9d18 in toplev_main (argc=14, argv=0xbf8c45e4) at
>../../../src/gcc-4.2/gcc/toplev.c:999
>#10 0x080c64c2 in main (argc=Cannot access memory at address 0x0
>) at ../../../src/gcc-4.2/gcc/main.c:35
>
>
More information about the Fortran
mailing list