]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/39997 (Procedure(), pointer & implicit typing: rejects-valid / accepts...
authorJanus Weil <janus@gcc.gnu.org>
Fri, 26 Jun 2009 22:11:15 +0000 (00:11 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Fri, 26 Jun 2009 22:11:15 +0000 (00:11 +0200)
commitfc9c6e5d64f4dbdc1f7a53a4fa14ddc3f124f165
treea011c58836777edcbf0334f314676e4eccd1a4bf
parent9833720d3bf1e5adf2319bb480b882dad8060182
re PR fortran/39997 (Procedure(), pointer  & implicit typing: rejects-valid / accepts-invalid?)

2009-06-26  Janus Weil  <janus@gcc.gnu.org>

PR fortran/39997
PR fortran/40541
* decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
result.
* expr.c (gfc_check_pointer_assign): Enable interface check for
procedure pointer assignments where the rhs is a function returning a
procedure pointer.
* resolve.c (resolve_symbol): If an external procedure with unspecified
return type can not be implicitly typed, it must be a subroutine.

2009-06-26  Janus Weil  <janus@gcc.gnu.org>

PR fortran/39997
PR fortran/40541
* gfortran.dg/proc_ptr_15.f90: Fixed and extended.
* gfortran.dg/proc_ptr_common_1.f90: Fixed invalid test case.
* gfortran.dg/proc_ptr_result_1.f90: Ditto.
* gfortran.dg/proc_ptr_result_5.f90: New.

From-SVN: r148996
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/expr.c
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/proc_ptr_15.f90
gcc/testsuite/gfortran.dg/proc_ptr_common_1.f90
gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90
gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 [new file with mode: 0644]