[J3] BLOCK DATA and BIND(C) question
Bader, Reinhold
Reinhold.Bader at lrz.de
Tue Feb 1 20:17:01 UTC 2022
Steve,
an entity referenced by a BIND statement in a BLOCK DATA program unit must
be a common block.
Hence, all three examples you give are non-conforming.
I think this also implies that the cited constraints are not internally
contradictory.
Cheers
Reinhold
> -----Ursprüngliche Nachricht-----
> Von: J3 <j3-bounces at mailman.j3-fortran.org> Im Auftrag von Steven G.
> Kargl via J3
> Gesendet: Dienstag, 1. Februar 2022 20:08
> An: J3 Fortran <j3 at mailman.j3-fortran.org>
> Cc: Steven G. Kargl <kargl at uw.edu>
> Betreff: [J3] BLOCK DATA and BIND(C) question
>
> Are these code snippets equivalent?
>
> BLOCK DATA
> BIND(C) :: A
> END BLOCK DATA
>
> BLOCK DATA
> REAL :: A
> BIND(C) :: A
> END BLOCK DATA
>
> BLOCK DATA
> REAL, BIND(C) :: A
> END BLOCK DATA
>
>
> If yes, do C1415 and C1416 conflict?
>
> C1415 (R1420) A block-data specification-part shall contain
> only derived-type definitions and ..., BIND, ..., and
> type declaration statements.
>
> C1416 (R1420) A type declaration statement in a block-data
> specification-part shall not contain ALLOCATABLE, EXTERNAL,
> or BIND attribute specifiers.
>
> In fact, does C1415 conflict with C819?
>
> C819 A variable with the BIND attribute shall be declared in
> the specification part of a module.
>
> --
> Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6439 bytes
Desc: not available
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20220201/cb8072af/attachment-0001.bin>
More information about the J3
mailing list