llvm-project/flang/test/Semantics/sync-images.f90
Peter Klausler 38207a52a7
[flang] Test SYNC IMAGES, increase checking (#132279)
Add a test for the SYNC IMAGES statement, and add a check for invalid
image numbers.
2025-03-26 12:08:48 -07:00

13 lines
405 B
Fortran

!RUN: %python %S/test_errors.py %s %flang_fc1
integer twod(1,1)
sync images (*) ! ok
!ERROR: An image-set that is an int-expr must be a scalar or a rank-one array
sync images (twod)
!ERROR: Must have INTEGER type, but is REAL(4)
sync images (3.14159)
!ERROR: Image number -1 in the image-set is not valid
sync images (-1)
!ERROR: Image number -1 in the image-set is not valid
sync images ([2, -1, 3])
end