llvm/flang/test/semantics/canondo06.f90
Eric Schweitz da521a2284 [flang] add openmp simd test
Original-commit: flang-compiler/f18@c31bb0d144
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false
2018-10-24 12:22:42 -07:00

39 lines
1,001 B
Fortran

! Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
! You may obtain a copy of the License at
!
! http://www.apache.org/licenses/LICENSE-2.0
!
! Unless required by applicable law or agreed to in writing, software
! distributed under the License is distributed on an "AS IS" BASIS,
! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
! See the License for the specific language governing permissions and
! limitations under the License.
! RUN: ${F18} -fopenmp -funparse-with-symbols %s 2>&1 | ${FileCheck} %s
! CHECK-NOT: do *[1-9]
! CHECK: omp simd
program P
implicit none
integer N, I
parameter (N=100)
real A(N), B(N), C(N)
!$OMP SIMD
do 10 I = 1, N
A(I) = I * 1.0
10 continue
B = A
!$OMP SIMD
do 20 I = 1, N
C(I) = A(I) + B(I)
write (*,100) I, C(I)
20 continue
100 format(" C(", I3, ")=", F8.2)
end program P