Files
clang-p2996/flang/test/Semantics/omp-simd-aligned.f90
Michael Kruse 58c3f20bbf [flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:

 * Define `lit_tools_dir` for flang's test configuration
 * Replace `(<command> || true)` idiom with `not <command>`
 * Add `REQUIRES: shell` on tests that invoke a shell script

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D89368
2021-06-10 05:13:44 -05:00

56 lines
1.1 KiB
Fortran

! RUN: %S/test_errors.sh %s %t %flang -fopenmp
! REQUIRES: shell
! OpenMP Version 4.5
! 2.8.1 simd Construct
! Semantic error for correct test case
program omp_simd
integer i, j, k
integer, allocatable :: a(:), b(:)
allocate(a(10))
allocate(b(10))
!ERROR: List item 'a' present at multiple ALIGNED clauses
!$omp simd aligned(a, a)
do i = 1, 10
a(i) = i
end do
!$omp end simd
!ERROR: List item 'a' present at multiple ALIGNED clauses
!ERROR: List item 'b' present at multiple ALIGNED clauses
!$omp simd aligned(a,a) aligned(b) aligned(b)
do i = 1, 10
a(i) = i
b(i) = i
end do
!$omp end simd
!ERROR: List item 'a' present at multiple ALIGNED clauses
!$omp simd aligned(a) aligned(a)
do i = 1, 10
a(i) = i
end do
!$omp end simd
!$omp simd aligned(a) aligned(b)
do i = 1, 10
a(i) = i
b(i) = i
end do
!$omp end simd
!ERROR: List item 'a' present at multiple ALIGNED clauses
!$omp simd aligned(a) private(a) aligned(a)
do i = 1, 10
a(i) = i
b(i) = i
end do
!$omp end simd
print *, a
end program omp_simd