[PATCH, Fortran] PROCEDURE declarations

Tobias Schlüter Tobias.Schlueter@physik.uni-muenchen.de
Mon Sep 3 13:19:00 GMT 2007


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



More information about the Gcc-patches mailing list