[Fortran-Experiments] Merge to r120360
Christopher D. Rickett
crickett@lanl.gov
Thu Feb 22 02:38:00 GMT 2007
>>
>> function test()
>> integer(c_int) :: test
>> bind(c,name="kk") :: test
>> ! NAG f95: "BIND(C) for non-variable TEST"
>> ! gfortran, g95: Accepted
>> test = 5_c_int
>> end function test
>
> i'll look into this. shouldn't test be allowed in the bind(c...)
> statement? that seems like it should be ok.
i looked at the standard, and it does specify that the bind attribute and
bind attribute statement refer to variables or common blocks. this
doesn't include functions/subroutines. procedures are required to have
the proc-lang-binding-spec. i'll fix this and submit a patch. in my
opinion, i'm not sure why this limitation is there, but it shouldn't be
too difficult to enforce.
thanks for pointing it out.
Chris
More information about the Fortran
mailing list