[Patch, Fortran] PR36705: Procedure pointers with attributes statements

Janus Weil jaydub66@googlemail.com
Thu Aug 14 18:19:00 GMT 2008


Hi all,

the attached patch fixes PR36705, which involves certain combinations
of PROCEDURE, POINTER and SAVE or INTENT being rejected though they
are valid. The reason for this was that the conflict checks for
(PROCEDURE,SAVE) and (PROCEDURE,INTENT) were done too early, i.e. in
check_conflict (symbol.c). My patch moves these checks to
resolve_fl_procedure (resolve.c), so that they are not carried out
before all attributes are known. Moreover the patch includes the test
cases from the PR and modifies some other test cases, where the
location of the error message has changed.

Regtested on i686-pc-linux-gnu with no failures. Ok for trunk?

Cheers,
Janus


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr36705.diff
Type: text/x-patch
Size: 3900 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080814/3eea0ad8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proc_ptr_9.f90
Type: application/octet-stream
Size: 236 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080814/3eea0ad8/attachment.obj>


More information about the Fortran mailing list