PROCEDURE declarations
Janus Weil
jaydub66@googlemail.com
Tue Aug 28 12:00:00 GMT 2007
Hi all,
here goes a new revision of my procedure declaration patch, together
with some examples of valid code which is accepted by the patch, and
invalid code which is rejected. If you find any testcases beyond
these, where the implementation does not work as expected, please let
me know.
Some of the things I recently added are e.g. rejecting intrinsic
procedures and generic interfaces as procedure interface, and some
more bugfixes.
One area where I'm still having problems is PROCEDURE statements
inside of generic INTERFACE statements. I get some really weird errors
there, e.g. for
interface operator(.bar.)
procedure foo
end interface
I get:
end interface
1
Error: User operator procedure 'end' at (1) must have at least one argument
This makes absolutely no sense to me. Similarly for the following
interface gen
procedure foo
procedure boo
end interface
I get:
procedure boo
1
Error: Entity 'boo' at (1) is already present in the interface
Which also seems strange. And for
module X
interface gen
procedure foo
end interface
end module X
I just get an ICE, which comes somewhere out of "gfc_dump_module".
Really strange.
I tried to copy the implementation from the "module procedure" case,
i.e. I use gfc_add_interface. The problem is I have no idea what is
going wrong. Somehow I'm stuck on this one. Would be great if one of
the more experienced gfortran programmers could help me out here. To
me it seems as if the procedure symbol somehow gets deallocated or
overridden, but I have no clue why that should happen :(
Any help is highly appreciated ...
Janus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: procdecl127827.diff
Type: text/x-patch
Size: 13877 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070828/24dd2009/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: val_acc.f90
Type: text/x-fortran
Size: 1491 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070828/24dd2009/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inv_rej.f90
Type: text/x-fortran
Size: 1166 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070828/24dd2009/attachment-0002.bin>
More information about the Fortran
mailing list