This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR24311 - MERGE with character arguments causing ICE in IO statements.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]