re PR fortran/55901 ([OOP] type is (character(len=*)) misinterpreted as array)
authorPaul Thomas <pault@gcc.gnu.org>
Sun, 18 Jan 2015 12:21:38 +0000 (12:21 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Sun, 18 Jan 2015 12:21:38 +0000 (12:21 +0000)
commite207c522623c3d3620416b5332b8a6d8644a1f06
treeb4a34c50935449f36aaace2f13d03cbaffac2ad3
parentd28701a2da0fbe188c551d9a698a4b72bf920246
re PR fortran/55901 ([OOP] type is (character(len=*)) misinterpreted as array)

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.

From-SVN: r219814
gcc/fortran/ChangeLog
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/fortran/trans-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/associate_1.f03