-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Closed
Labels
flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Consider the following code:
INTERFACE
SUBROUTINE ExplicitShapeArray(ioUnit, arrayShapeExplicit)
integer :: ioUnit
complex, asynchronous, dimension( 10 ) :: arrayShapeExplicit
END SUBROUTINE ExplicitShapeArray
END INTERFACE
complex, pointer, dimension( : ) :: ptrComplexArray
complex, target, dimension( 10 ) :: complexArray
ptrComplexArray => complexArray
open(1226, asynchronous='yes', action='read',&
access='stream', form='unformatted')
do i = 1, 10
read(1226, asynchronous='yes') complexArray
end do
call ExplicitShapeArray(1226, ptrComplexArray)
close( 1226 )
END
SUBROUTINE ExplicitShapeArray(ioUnit, arrayShapeExplicit)
integer :: ioUnit
complex, asynchronous, dimension( 10 ) :: arrayShapeExplicit
END SUBROUTINE ExplicitShapeArray
This code violates Constraint C1549
C1549 (R1524) If an actual argument is an array pointer that has the ASYNCHRONOUS or VOLATILE
attribute but does not have the CONTIGUOUS attribute, and the corresponding dummy argument
has either the ASYNCHRONOUS or VOLATILE attribute, but does not have the VALUE attribute,
that dummy argument shall be an array pointer, an assumed-shape array without the CONTIGUOUS
attribute, or an assumed-rank entity without the CONTIGUOUS attribute.
ptrComplexArray is implicitly given the asynchronous attribute, so the call to ExplicitShapeArray should be diagnosed.
Metadata
Metadata
Assignees
Labels
flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!