Bug 36705 - Procedure pointers with attributes statements
Summary: Procedure pointers with attributes statements
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: janus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-02 20:43 UTC by Tobias Burnus
Modified: 2008-08-14 21:20 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-08-14 17:11:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2008-07-02 20:43:17 UTC
save :: p
procedure() :: p
pointer :: p
end

Error: PROCEDURE attribute conflicts with SAVE attribute in 'p' at (1)

Problem: The SAVE + PROCEDURE checking comes too early before the POINTER is seen. I think this program is valid.

Analogously:

subroutine bar(x)
 procedure(), intent(in) :: x
 pointer :: x
end subroutine bar 

Here, the POINTER comes too late for INTENT
Comment 1 janus 2008-08-14 21:17:22 UTC
Subject: Bug 36705

Author: janus
Date: Thu Aug 14 21:15:59 2008
New Revision: 139116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139116
Log:
2008-08-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36705
	* symbol.c (check_conflict): Move conflict checks for (procedure,save)
	and (procedure,intent) to resolve_fl_procedure.
	* resolve.c (resolve_fl_procedure): Ditto.


2008-08-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/36705
	* gfortran.dg/argument_checking_7.f90: Modified.
	* gfortran.dg/conflicts.f90: Modified.
	* gfortran.dg/proc_decl_1.f90: Modified.
	* gfortran.dg/proc_ptr_9.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_9.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/argument_checking_7.f90
    trunk/gcc/testsuite/gfortran.dg/conflicts.f90
    trunk/gcc/testsuite/gfortran.dg/proc_decl_1.f90

Comment 2 janus 2008-08-14 21:20:55 UTC
Fixed with r139116. Closing.