This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 20 Feb 2016 18:27:31 +0000
- Subject: [Bug fortran/69423] [6 Regression] Invalid optimization with deferred-length character
- Auto-submitted: auto-generated
- References: <bug-69423-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69423
--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sat Feb 20 18:26:59 2016
New Revision: 233589
URL: https://gcc.gnu.org/viewcvs?rev=233589&root=gcc&view=rev
Log:
2016-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69423
* trans-decl.c (create_function_arglist): Deferred character
length functions, with and without declared results, address
the passed reference type as '.result' and the local string
length as '..result'.
(gfc_null_and_pass_deferred_len): Helper function to null and
return deferred string lengths, as needed.
(gfc_trans_deferred_vars): Call it, thereby reducing repeated
code, add call for deferred arrays and reroute pointer function
results. Avoid using 'tmp' for anything other that a temporary
tree by introducing 'type_of_array' for the arrayspec type.
2016-02-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69423
* gfortran.dg/deferred_character_15.f90 : New test.
Added:
trunk/gcc/testsuite/gfortran.dg/deferred_character_15.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog