[clangd] Re-land "support outgoing calls in call hierarchy" (#117673)
[llvm-project.git] / flang / test / Semantics / OpenMP / simd-aligned.f90
blob0a9f95833e22e74aa48144bfcc1e29b6b92c62e5
1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! OpenMP Version 4.5
4 ! 2.8.1 simd Construct
5 ! Semantic error for correct test case
7 program omp_simd
8 integer i, j, k, c, d(100)
9 integer, allocatable :: a(:), b(:)
10 common /cmn/ c
12 allocate(a(10))
13 allocate(b(10))
15 !ERROR: List item 'a' present at multiple ALIGNED clauses
16 !$omp simd aligned(a, a)
17 do i = 1, 10
18 a(i) = i
19 end do
20 !$omp end simd
22 !ERROR: List item 'a' present at multiple ALIGNED clauses
23 !ERROR: List item 'b' present at multiple ALIGNED clauses
24 !$omp simd aligned(a,a) aligned(b) aligned(b)
25 do i = 1, 10
26 a(i) = i
27 b(i) = i
28 end do
29 !$omp end simd
31 !ERROR: List item 'a' present at multiple ALIGNED clauses
32 !$omp simd aligned(a) aligned(a)
33 do i = 1, 10
34 a(i) = i
35 end do
36 !$omp end simd
38 !$omp simd aligned(a) aligned(b)
39 do i = 1, 10
40 a(i) = i
41 b(i) = i
42 end do
43 !$omp end simd
45 !ERROR: List item 'a' present at multiple ALIGNED clauses
46 !$omp simd aligned(a) private(a) aligned(a)
47 do i = 1, 10
48 a(i) = i
49 b(i) = i
50 end do
51 !$omp end simd
53 print *, a
55 !ERROR: 'c' is a common block name and can not appear in an ALIGNED clause
56 !$omp simd aligned(c)
57 do i = 1, 10
58 c = 5
59 end do
60 !$omp end simd
62 !ERROR: 'd' in ALIGNED clause must be of type C_PTR, POINTER or ALLOCATABLE
63 !$omp simd aligned(d:100)
64 do i = 1, 100
65 d(i) = i
66 end do
68 end program omp_simd