This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, Fortran] PROCEDURE declarations



Hi Janus,


Janus Weil wrote:
The F2003 standard can be found at http://gcc.gnu.org/wiki/GFortranStandards.

Thanks for the link, I wasn't aware of that page. Very useful!


On this matter it says:
"A procedure declaration statement declares procedure pointers, dummy
procedures, and external procedures. It specifies the EXTERNAL
attribute (5.1.2.6) for all procedure entities in the proc-decl
-list."
So the test case is surely illegal.

Hm, so instead of doing all these checks and finding all possible conflicts, it should be sufficient to call gfc_add_external().


There's not much I can think of.  Maybe initialization can cause
trouble?  Say one of the following examples:
  program prog
  data f/1.0/
  procedure(real):: f,g
  !data f/1.0/
  !real :: f = 1.0
  end program

This doesn't seem to be a problem, since I get


 procedure(real):: f,g
                   1
Error: VARIABLE attribute of 'f' conflicts with PROCEDURE attribute at (1)

Great!


Thanks,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]