This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, fortran] PR77296 - [F03] Compiler Error with allocatable string and associate


The attached patch fixes the PR and most of the remaining, if not all,
problems associated with deferred string length targets in the
associate construct.

Bootstraps and regtests on FC23/x86_64 - OK for trunk?

Paul

2017-09-29  Paul Thomas  <pault@gcc.gnu.org>

    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-09-29  Paul Thomas  <pault@gcc.gnu.org>

    PR fortran/77296
    * gfortran.dg/associate_32.f03 : New test.

Attachment: check2709.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]