This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR27996 and PR29978 - warnings and errors on character lengths


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]