]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/69423 (Invalid optimization with deferred-length character)
authorPaul Thomas <pault@gcc.gnu.org>
Sat, 20 Feb 2016 18:26:59 +0000 (18:26 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 20 Feb 2016 18:26:59 +0000 (18:26 +0000)
commitce1ff48e577896b860546564459b4f2000af4985
tree5affc9fbd102413c5ceed1275a056bb5d8a342d6
parentbbf27208564cdf8fb583f958ec5d910c3a7d9718
re PR fortran/69423 (Invalid optimization with deferred-length character)

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.

From-SVN: r233589
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/deferred_character_15.f90 [new file with mode: 0644]