Add the coarray intrinsic functions, lcobound and ucobound, to the
list of intrinsics. For both of these functions, add a check to
ensure that if the optional dim argument is present and statically
checkable, its value is in the inclusive range of 1 and the corank
of the coarray argument. In the semantics tests for lcobound and
ucobound, remove the XFAIL directive, add the ERROR directives and
add additional standard-conforming and non-standard conforming
calls.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/test/Semantics/lcobound.f90 | ||
---|---|---|
10 | How about testing for corank>1? |
flang/test/Semantics/lcobound.f90 | ||
---|---|---|
10 | I have added some coarrays with a corank>1 to pass to the coarray argument now. In doing so, I discovered that the restriction I tried to add to the dim argument, requiring it to be within the range of the corank doesn't work when the corank is above 1. So I am going back to work on fixing that before I update the patch. Thanks for the suggestion! |
- Add ucobound to the list of intrinsics and update the semantics test with the ERROR directives and with more examples of valid and invalid code
- Add function to ensure that if the optional dim argument is present and statically checkable, its value is in the inclusive range of 1 and the corank of the coarray argument
- Add more examples of valid and invalid code to the semantics test for lcobound
@klausler, @jeanPerier, @PeteSteinfeld Would anyone else like to look this over before I push?
flang/lib/Evaluate/intrinsics.cpp | ||
---|---|---|
192 | It took me several tries to understand the intent here, since the result doesn't depend on the value of the DIM= argument, only its presence, despite the name. Maybe something more self-evident could be used for the name, like "vectorIfNoDim" or "scalarIfDim". |
It took me several tries to understand the intent here, since the result doesn't depend on the value of the DIM= argument, only its presence, despite the name. Maybe something more self-evident could be used for the name, like "vectorIfNoDim" or "scalarIfDim".