[Patch, Fortran] PR 40117: [OOP][F2008] Type-bound procedure: allow list after PROCEDURE

Janus Weil janus@gcc.gnu.org
Sat Jun 12 02:28:00 GMT 2010


Hi all,

here is a simple parsing patch which adds a minor F08 extension:
Declaring a list of type-bound procedures. In F03 each TBP had to be
declared with a separate PROCEDURE statement. In F08 this restriction
is gone and lists are allowed.

The patch basically just takes the parsing code for the type-bound
PROCEDURE statement and puts it inside a loop (with some adjustments).
It also adds a standards-version check, which will reject procedure
lists with -std=f2003 or earlier. I had to slightly modifiy one test
case, and added two new ones: One to make sure that the parsing of
lists works, and one to check that the rejection works.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus



2010-06-11  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40117
	* decl.c (match_procedure_in_type): Allow procedure lists (F08).


2010-06-11  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/40117
	* gfortran.dg/typebound_proc_4.f03: Modified error message.
	* gfortran.dg/typebound_proc_14.f03: New.
	* gfortran.dg/typebound_proc_15.f03: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr40117.diff
Type: application/octet-stream
Size: 7698 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100612/95659d3e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typebound_proc_14.f03
Type: application/octet-stream
Size: 498 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100612/95659d3e/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typebound_proc_15.f03
Type: application/octet-stream
Size: 423 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20100612/95659d3e/attachment-0002.obj>


More information about the Fortran mailing list