[gfortran] patch for PR fortran/25681 : ICE with len of array of derived type

François-Xavier Coudert fxcoudert@gmail.com
Thu Apr 27 11:49:00 GMT 2006


:ADDPATCH fortran:

Attached patch is a very simple fix for PR 25681 "ICE with len of
array of derived type". gfc_simplify_len was able to simplify LEN(s)
where s is a constant, but not LEN(s) where s is a variable with
constant length.

I'm not sure this is a complete fix of PR 25681: I tried to think of
examples where the length of the character variable inside the derived
type was not a constant, but couldn't devise one. If someone can
propose such an example, I will then leave PR 25681 open, waiting for
a complete fix.


Patch is regtested on i686-linux as well as all the PR testcases. It
also enables gfortran to compile CP2K, a very large chemistry
simulation code (it was the last bug preventing compilation).

OK for mainline and 4.1?

Thanks,
FX



More information about the Fortran mailing list