The Berkeley Lab Flang team develops tests for the LLVM-Project Flang Fortran compiler. Because of the paramount importance of parallelism in high-performance computing, we are focusing on Fortran’s parallel features, commonly denoted "Coarray Fortran."
The image argument in the intrinsic image_status is required by the standard to be a positive integer. The current implementation in the frontend does not perform this check on constant expressions that are passed as actual-arguments. This check should be added.
image_status has already been added to the list of intrinsic functions. However, the new semantics test showed that no error was created if the image arg of image_status was not a positive value, as the section 3 of 16.9.98 in the Fortran 2019 standard states it must be. Add a check for this and an error if it occurs.
Add coshape and it's interface to the list of intrinsic functions in flang/lib/Evaluate/intrinsics.cpp. Use coshape semantics test submitted by @ngeorge1098 to check the implementation I am adding.