This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR24311 - MERGE with character arguments causing ICE in IO statements.
- From: Janne Blomqvist <jblomqvi at cc dot hut dot fi>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, patch <gcc-patches at gcc dot gnu dot org>, Tobias dot Schlueter at Physik dot Uni-Muenchen dot DE
- Date: Wed, 12 Oct 2005 11:34:45 +0300
- Subject: Re: [Patch, fortran] PR24311 - MERGE with character arguments causing ICE in IO statements.
- References: <20051008234615.5F7331DC0BB@bromo.msbb.uc.edu> <1128860483.43490b43db2e4@www.cip.physik.uni-muenchen.de> <43493C51.2000000@wanadoo.fr> <434BE8EF.1080306@wanadoo.fr> <434C4505.9090400@wanadoo.fr>
On Wed, Oct 12, 2005 at 01:04:37AM +0200, Paul Thomas wrote:
> :ADDPATCH fortran:
>
> This problem was caused by a patch to trans-io.c(gfc_trans_transfer),
> which changed from transferring arrays element by element to passing the
> array descriptor to the library. This failed because
> gfc_conv_expr_descriptor was unable to handle the unusual(unique?)
> phenomenon of a character array that has no charlen in the typespec.
> This has been fixed by the direct method of writing a charlen in
> iresolve.c(gfc_resolve_merge). This seems like the right place to do
> this, on the grounds that, no matter what, the output from MERGE will be
> correctly loaded with a character length.
I think this is the correct solution. In the long run array
descriptors should be changed to store the kind instead of the size,
so for characters we need to pass around the length in some other way.
> Bubblestrapped and regtested on FC3/i686. OK for mainline and 4.0?
Is it needed for 4.0, considering that the descriptor-based IO is only
on mainline?
--
Janne Blomqvist