This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31867] function result with character LEN computed at run time
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 May 2007 12:13:13 -0000
- Subject: [Bug fortran/31867] function result with character LEN computed at run time
- References: <bug-31867-14444@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pault at gcc dot gnu dot org 2007-05-11 13:13 -------
(In reply to comment #6)
> So I suspect that the problem lies in the interfacing around
> gfc_conv_function_call but I just don't see it yet.
Indeed this is the case:
In Tobias' #5, changing the declaration for 'words' to -
character (len=5) :: words(0:1) = (/"two ","three"/)
produces a code that works correctly.
Looking at the code, the hidden calculation of len=sum(len_trim(words)), made
by the interface for the function call has an offset of 0, rather than -1.
Now to find out why!
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31867