[Patch, Fortran] Fix PR37400 - wrong char len with implicit types

Tobias Burnus burnus@net-b.de
Sun Sep 7 10:56:00 GMT 2008


Hi all,

For
   implicit character(len=*,kind=kind('A')) (Q)
the character length gets set with the first parameter statement:
   parameter(Q1 = 'Test Me!') ! len=8
afterwards, every implicitly typed variable has the length 8.

The fix is to copy the charlen parameter to the symbol instead of
using a common one.

I have no idea why it worked before, but the fix seems to be the
proper one. Do you think one should try to figure out why it was
working in older gfortrans?

Build & regtested on x86-64-Linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implicit-charlen.diff
Type: text/x-patch
Size: 1668 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080907/19c30151/attachment.bin>


More information about the Fortran mailing list