[J3] VALUE attribute for assumed-shape in an interface with bind C

Reuben D. Budiardja reubendb at ornl.gov
Mon Jan 10 16:00:13 UTC 2022


Hello,

I'd appreciate if I could get some help to know whether the following is 
standard compliant:

program p
   interface
     subroutine MyS (A) bind (c, name = 'c_sub')
       use iso_c_binding
       integer(c_int), intent(in), dimension(:), value :: A
     end subroutine MyS
   end interface
end program


Some compilers accept it, some rejects this (unfortunately with 
different / confusing error messages). But I couldn't find where this is 
disallowed in the standard. In the VALUE attribute section (8.5.19 in 
21/007r2) the constraint is only for assumed-size.

Thanks,
Reuben


More information about the J3 mailing list