[Patch, fortran] PR18082 - gfortran gets stuck in loop with automatic length characters
Paul Thomas
paulthomas2@wanadoo.fr
Sat Oct 8 08:59:00 GMT 2005
:ADDPATCH fortran:
This gets stuck in a loop whilst trying to treat the assignments:
subroutine snafu (i)
character*(i) :: c1, c2
c1 = ""
c2 = ""
end subroutine snafu
Declaring c1 and c2 in separate statements clears the problem.
The reason for the problem is that both symbols get assigned the same
typespec in decl.c(variable_decl) and so the same character length and
corresponding backend declaration. This is not good for automatic
character lengths. The attached patch fixes this by doling out a new
typespec for all except constant expressions.
Bubblestrapped and regtested on Cygwin_NT/Athlon.
OK for mainline and 4.0?
Paul T
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: submit.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20051008/e6a54220/attachment.txt>
More information about the Fortran
mailing list