Fortran: Fixes for pointer function call as variable (PR96896)
authorTobias Burnus <tobias@codesourcery.com>
Mon, 7 Sep 2020 10:29:05 +0000 (12:29 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 7 Sep 2020 10:30:11 +0000 (12:30 +0200)
commit2b0df0a6ac79b34f5fac4f3d456e8e14db220e4a
treebfab26a04edec139916a27476b2d98fe079bf2e8
parentc9c87dc958a2ef3203cbdb88ed1b0575564a4279
Fortran: Fixes for pointer function call as variable (PR96896)

gcc/fortran/ChangeLog:

PR fortran/96896
* resolve.c (get_temp_from_expr): Also reset proc_pointer +
use_assoc attribute.
(resolve_ptr_fcn_assign): Use information from the LHS.

gcc/testsuite/ChangeLog:

PR fortran/96896
* gfortran.dg/ptr_func_assign_4.f08: Update dg-error.
* gfortran.dg/ptr-func-3.f90: New test.
gcc/fortran/resolve.c
gcc/testsuite/gfortran.dg/ptr-func-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/ptr_func_assign_4.f08