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: [Fortran, Patch] PR36476 - Fix ICE with PARAMETER and len=* strings


Tobias Burnus wrote:
Without this patch, gfortran crashes (ICE) for:

     CHARACTER (len=*) MY_STRING(1:3)
     PARAMETER ( MY_STRING =  (/ "A" , "B", "C" /) )


as "my_string" has an initialization but cl.length is not set. If one changes the PARAMETER statement into a PARAMETER attribute or uses len=1 or uses a scalar, it works. I copied the cl.length==NULL (i.e. len=*) case from add_init_expr_to_sym, which is used in case of the PARAMETER attribute.


Bootstrapped and regtested on x86-64-linux. OK for the trunk?

Tobias

OK, thanks for patch.

Jerry


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