2017-09-21 Paul Thomas <pault@gcc.gnu.org>
commitd5ba01157001e990e1779acbc5c2e26e0b8810cd
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 18:40:21 +0000 (21 18:40 +0000)
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Sep 2017 18:40:21 +0000 (21 18:40 +0000)
tree3c511b271a1280d31765510df2c68660e8f25fa7
parentf2740d9193cf667f1f24481dd3675c86dafc625e
2017-09-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/52832
* match.c (gfc_match_associate): Before failing the association
try again, allowing a proc pointer selector.

PR fortran/80120
PR fortran/81903
PR fortran/82121
* primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
points to the associate selector, if any. Go through selector
references, after resolution for variables, to catch any full
or section array references. If a class associate name does
not have the same declared type as the selector, resolve the
selector and copy the declared type to the associate name.
Before throwing a no implicit type error, resolve all allowed
selector expressions, and copy the resulting typespec.

PR fortran/67543
* resolve.c (resolve_assoc_var): Selector must cannot be the
NULL expression and it must have a type.

PR fortran/78152
* resolve.c (resolve_symbol): Allow associate names to be
coarrays.

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

PR fortran/78512
* gfortran.dg/associate_26.f90 : New test.

PR fortran/80120
* gfortran.dg/associate_27.f90 : New test.

PR fortran/81903
* gfortran.dg/associate_28.f90 : New test.

PR fortran/82121
* gfortran.dg/associate_29.f90 : New test.

PR fortran/67543
* gfortran.dg/associate_30.f90 : New test.

PR fortran/52832
* gfortran.dg/associate_31.f90 : New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253077 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/associate_26.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/associate_27.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/associate_28.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/associate_29.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/associate_30.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/associate_31.f90 [new file with mode: 0644]