This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR27996 and PR29978 - warnings and errors on character lengths
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Thu, 30 Nov 2006 10:31:45 +0100
- Subject: Re: [Patch, fortran] PR27996 and PR29978 - warnings and errors on character lengths
- References: <456DE684.1030000@wanadoo.fr>
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