This is the mail archive of the
mailing list for the GCC project.
Re: Patch to gfortran PR13433
- From: Paul Brook <paul at codesourcery dot com>
- To: Victor Leikehman <LEI at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 15 Feb 2004 16:49:41 +0000
- Subject: Re: Patch to gfortran PR13433
- Organization: CodeSourcery
- References: <OF73D5FDFF.772B81B6-ON42256E3B.003C2278-42256E3B.004025F8@il.ibm.com>
On Sunday 15 February 2004 11:40 am, Victor Leikehman wrote:
> This patch fixes gfortran/13433 aka "ICE in assumed-length
> character function".
Applied, thanks. Something seems to have mangled the whitespace in the patch,
so I made the changes by hand.
In future please put ChangeLog entries in plain test in the body of the email,
not as part of the patch. Patches to gfortran should also be copied to
> For functions returning CHARACTER, calling conventions
> changed to comply with g77.
> Follows an example that used to trigger the ICE;
> now prints HELLO WORLD as expected.
> CHARACTER*11 FUNCTION G()
> G = "HELLO"
> CHARACTER*(*) FUNCTION F()
> F = "WORLD"
> PROGRAM MAIN
> CHARACTER*5 F,G
> PRINT*, G(), ' ', F()
The above gode is illegal. It can (and does) cause memory corruption. The
dummy result for G() is larger then the actual result.
2004-02-15 Victor Leikehman <email@example.com>
* trans-decl.c (gfc_build_function_decl) For functions
returning CHARACTER*(*) pass an extra length argument,
following g77 calling conventions.
* trans-types.c (gfc_get_function_type) Ditto.
* trans-expr.c (gfc_conv_function_call) Ditto.
2004-02-15 Paul Brook <firstname.lastname@example.org>
* gfortran.fortran-torture/execute/straret.f90: New test.