This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran] patch for PR fortran/25681 : ICE with len of array of derived type
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: GFortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 27 Apr 2006 13:49:25 +0200
- Subject: [gfortran] patch for PR fortran/25681 : ICE with len of array of derived type
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=iXaxRccGEZMZAJKoj8Wqvr6ViBnk/C8LTN4B2UA329jBK84iiDEldFtD/6RWyM3VElQ1ubbV/1LfpvLKIKMFNTaQ2Yq7u5gooVe/yHfxlLxwprBLmtZNgm8RfGpxltqwfGjBKsjOYw9Xer6mI1vWUpM3NsOzfuWnTRVjVV5Qxcc=
: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