Fwd: Seek help with PR 33917 (PROCEDUREs)
Paul Richard Thomas
paul.richard.thomas@gmail.com
Fri Nov 9 16:09:00 GMT 2007
I do apologise, I had meant this to be copied to the list.
Tobias,
> Now, I want to check for the restriction "If name is declared by a
> procedure-declaration-stmt it shall be previously declared." But how? I
> don't see any possibility in decl.c and for resolve.c, the order depends
> on how the tree is walked, which is in general not the order in the file.
You can depend on the declarations being treated in file order, since
they are handled by calls from the parser. Take a look at
primary.c(gfc_match_rvalue); you will find there that procedure
references are treated by looking for the symbol and, if it is not
already there, creating one. Later on, when the contained procedure
is created, this symbol will be given its characteristics and
attributes. If it does not already occur, the error condition can be
trapped in resolve.c by checking that the procedure is either
intrinsic, external or has an explicit interface.
Cheers
Paul
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
More information about the Fortran
mailing list