This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Fixing 13433


My apologies if I reply to this twice. I remember starting a reply, but can't 
find it.

On Monday 09 February 2004 8:06 am, Victor Leikehman wrote:
> I looked at PR 13433 (ICE in assumed-length character function).
> This is an unimplemented feature, rather than a bug.

Correct.

<snip>
> The problem is that returned strings have no way to pass their
> length.  So, if the string length is not known in compile time,
> ICE is triggered.
>
> A possible solution is to generalize the calling conventions
> for passing strings so that string length of the result is
> passed first, as if the result was the first hidden formal
> argument.  This effectively compiles
<snip>
> I prototyped this solution (only the callee side) and
> it seems to work.
>
> Please send any comments before I start annoying the
> maintainers with patches :-)

This looks like the right approach.

We already return string variables via an implicit parameter, so it should be 
fairly easy to add an extra length parameter. The implementation should be 
made compatible with g77.

I was initaly worried about the caller side of the implementation. I've since 
re-read the f77 standard and the problematic cases are illegal.

Paul


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