[Patch, Fortran] (Coarray) Fix constraint checks for LOCK_TYPE
Tobias Burnus
burnus@net-b.de
Tue Aug 2 16:08:00 GMT 2011
This patch fixes two issues:
a) LOCK(coarray%lock_type_comp) is also a coarray.
b) The following constraint was incompletely checked for: C1302. For
reference, I also list C1303/C1304.
C1302 A named variable of type LOCK TYPE shall be a coarray. A named
variable with a noncoarray subcomponent of type LOCK TYPE shall be a
coarray.
C1303 A lock variable shall not appear in a variable definition context
except as the lock-variable in a LOCK or UNLOCK statement, as an
allocate-object, or as an actual argument in a reference to a procedure
with an explicit interface where the corresponding dummy argument has
INTENT (INOUT).
C1304 A variable with a subobject of type LOCK TYPE shall not appear in
a variable definition context except as an allocate-object or as an
actual argument in a reference to a procedure with an explicit interface
where the corresponding dummy argument has INTENT (INOUT).
Build and regtested on x86-64-linux.
OK for the trunk.
Tobias
PS: It somehow took me quite some time to understand "subcomponent" even
though the standard is rather clear about it. For reference:
"1.3.33.3 subcomponent -- <structure> direct component that is a
subobject of the structure (6.4.2)
"1.3.33.1 direct component -- one of the components, or one of the
direct components of a nonpointer nonallocatable component (4.5.1)"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lock-check.diff
Type: text/x-patch
Size: 11371 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110802/62fb2843/attachment.bin>
More information about the Fortran
mailing list