This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77296] [F03] Compiler Error with allocatable string and associate
- 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: Wed, 04 Oct 2017 10:44:16 +0000
- Subject: [Bug fortran/77296] [F03] Compiler Error with allocatable string and associate
- Auto-submitted: auto-generated
- References: <bug-77296-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77296
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Wed Oct 4 10:43:45 2017
New Revision: 253400
URL: https://gcc.gnu.org/viewcvs?rev=253400&root=gcc&view=rev
Log:
2017-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/60458
PR fortran/77296
* resolve.c (resolve_assoc_var): Deferred character type
associate names must not receive an integer conatant length.
* symbol.c (gfc_is_associate_pointer): Deferred character
length functions also require an associate pointer.
* trans-decl.c (gfc_get_symbol_decl): Deferred character
length functions or derived type components require the assoc
name to have variable string length.
* trans-stmt.c (trans_associate_var): Set the string length of
deferred string length associate names. The address expression
is not needed for allocatable, pointer or dummy targets. Change
the comment about defered string length targets.
2017-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77296
* gfortran.dg/associate_32.f03 : New test.
Added:
trunk/gcc/testsuite/gfortran.dg/associate_32.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog