[Patch, fortran] PR27996 and PR29978 - warnings and errors on character lengths
Tobias Burnus
burnus@net-b.de
Thu Nov 30 10:26:00 GMT 2006
Hi,
Paul Thomas wrote:
> Index: gcc/fortran/resolve.c
> ===================================================================
> *************** resolve_code (gfc_code * code, gfc_names
> + else if (code->expr2->ts.cl->length
> + && code->expr2->ts.cl->length->expr_type == EXPR_CONSTANT)
> + rlen = mpz_get_si (code->expr2->ts.cl->length->value.integer);
> +
>
When I try to bootstrap with your patch, I get an ICE with
libgfortran/generated/misc_specifics.F90.
Reduced test case:
elemental function specific__char_1_i16 (parm)
integer (kind=16) , intent (in) :: parm
character (kind=1,len=1) :: specific__char_1_i16
specific__char_1_i16 = char (parm, kind=1)
end function
gfortran -c -Wall test.f90 # no error without -Wall
test.F90:0: internal compiler error: Segmentation fault
Program received signal SIGSEGV, Segmentation fault.
0x000000000044f02f in resolve_code (code=0xdeece0, ns=0xdedbc0) at
gcc/fortran/resolve.c:4943
4943 else if (code->expr2->ts.cl->length
Tobias
More information about the Gcc-patches
mailing list