This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array
- 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: Sun, 18 Jan 2015 12:22:11 +0000
- Subject: [Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array
- Auto-submitted: auto-generated
- References: <bug-55901-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
--- Comment #13 from Paul Thomas <pault at gcc dot gnu.org> ---
Author: pault
Date: Sun Jan 18 12:21:38 2015
New Revision: 219814
URL: https://gcc.gnu.org/viewcvs?rev=219814&root=gcc&view=rev
Log:
2015-01-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55901
* primary.c (gfc_match_varspec): Exclude dangling associate-
names with dimension 0 from being counted as arrays.
* resolve.c (resolve_assoc_var): Sub-strings are permissible
for associate-names, so exclude characters from the test for
misuse as arrays.
* trans-decl.c (gfc_get_symbol_decl): Associate-names can use
the hidden string length variable of their associated target.
Signal this by setting 'length' to a constant, if the decl for
the string length is a variable.
2015-01-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/55901
* gfortran.dg/associate_1.f03: Allow test for character with
automatic length.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/associate_1.f03