[PATCH, Fortran] PROCEDURE declarations

Janus Weil jaydub66@googlemail.com
Fri Aug 31 17:38:00 GMT 2007


:ADDPATCH fortran:

Hi all,
attached I send you my patch for the implementation of PROCEDURE
statements, which were introduced by the Fortran 2003 standard. It is
in a way the successor to my ABSTRACT INTERFACE patch, which was
committed two weeks ago (see
http://gcc.gnu.org/ml/fortran/2007-08/msg00417.html), because
PROCEDURE statements are the only application of abstract interfaces.

This patch implements only simple PROCEDURE declarations, which act as
an extension of the EXTERNAL statement, and omits the usage of the
PROCEDURE keyword for procedure pointers and type-bound procedures
(which hopefully will follow soon).

I hope all the stuff (actual code, test cases and change log) is
formally ok, and conforming to the GCC coding standards. Also I hope
that the patch provides a solid implementation of PROCEDURE
declarations, even if I can't guarantee you that it's perfect in any
sense, and am a little afraid someone might eventually be able to
break it again (which is probably gonna be Tobias, who has been doing
an awesome job in testing the patch, and has thereby made a major
contribution to the quality of the patch. So, thanks a lot, Tobi!)

And since today is officially the last day of Google's Summer of Code,
which this project was a part of, I want to thank the whole gfortran
community for supporting me and helping me get along in GCC
development, which was completely new to me, and specially my mentor
Steven Bosscher, who made this project possible in the first place. I
also want to thank Paul Thomas, who laid the foundation for my work,
in that he gave me his early procedure patch to work with.

And even though SoC is over, I'd like to keep on working on gfortran.
In particular I would really like to implement procedure pointers or
type-bound procedures in GCC 4.3. Since there is not much time left, I
don't know if I can do any of that, but at least I will try and see
how far I can get.

But first I need this patch approved, of course. It's regression
tested on i686-pc-linux-gnu without failures. Ok for trunk?
Janus



2007-08-31  Janus Weil  <jaydub66@gmail.com>
	    Paul Thomas  <pault@gcc.gnu.org>

	* decl.c (gfc_match_procedure): Handle PROCEDURE statements.
	* gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
	(enum gfc_statement): New element "ST_PROCEDURE".
	(strcut symbol_attribute): New member "unsigned procedure".
	* match.h: Add gfc_match_procedure.
	* parse.c (decode_statement,next_statement,gfc_ascii_statement,
	parse_interface): Implement PROCEDURE statements.
	* resolve.c (resolve_symbol): Ditto.
	* symbol.c (check_conflict): Ditto.
	(copy_formal_args): New function for copying formal argument lists.


2007-08-31  Janus Weil  <jaydub66@gmail.com>
	    Tobias Burnus  <burnus@net-b.de>

	* gfortran.dg/proc_decl_1.f90: New.
	* gfortran.dg/proc_decl_2.f90: New.
	* gfortran.dg/proc_decl_3.f90: New.
	* gfortran.dg/proc_decl_4.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: procdecl127956.diff
Type: text/x-patch
Size: 21115 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070831/62f52ee7/attachment.bin>


More information about the Fortran mailing list