re PR fortran/36704 (Procedure pointer as function result)
authorJanus Weil <janus@gcc.gnu.org>
Tue, 2 Dec 2008 11:58:16 +0000 (12:58 +0100)
committerJanus Weil <janus@gcc.gnu.org>
Tue, 2 Dec 2008 11:58:16 +0000 (12:58 +0100)
commit726d8566c19edbbf347cac9dd93fd263a7fd8ce4
tree1a8ed9bfe2933dce30e55e9615c3176bfb1bc126
parentb72bbbcb08f999e3216f1a9bf3f82d7e72eb7123
re PR fortran/36704 (Procedure pointer as function result)

2008-12-02  Janus Weil  <janus@gcc.gnu.org>

PR fortran/36704
PR fortran/38290
* decl.c (match_result): Result may be a standard variable or a
procedure pointer.
* expr.c (gfc_check_pointer_assign): Additional checks for procedure
pointer assignments.
* primary.c (gfc_match_rvalue): Bugfix for procedure pointer
assignments.
* resolve.c (resolve_function): Check for attr.subroutine.
* symbol.c (check_conflict): Addtional checks for RESULT statements.
* trans-types.c (gfc_sym_type,gfc_get_function_type): Support procedure
pointers as function result.

2008-12-02  Janus Weil  <janus@gcc.gnu.org>

PR fortran/36704
PR fortran/38290
* gfortran.dg/entry_7.f90: Modified.
* gfortran.dg/proc_ptr_2.f90: Extended.
* gfortran.dg/proc_ptr_3.f90: Modified.
* gfortran.dg/proc_ptr_11.f90: New.
* gfortran.dg/proc_ptr_12.f90: New.
* gfortran.dg/result_1.f90: New.

From-SVN: r142351
14 files changed:
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/fortran/expr.c
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/fortran/symbol.c
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/entry_7.f90
gcc/testsuite/gfortran.dg/proc_ptr_11.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/proc_ptr_12.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/proc_ptr_2.f90
gcc/testsuite/gfortran.dg/proc_ptr_3.f90
gcc/testsuite/gfortran.dg/result_1.f90 [new file with mode: 0644]