brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 1aa2880 Raw
41 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenmp2! OpenMP Version 5.03! 2.9.3.1 simd Construct4!   - A program that branches into or out of a simd region is non-conforming.5!   - The associated loops must be structured blocks6 7program omp_simd8   integer i, j9 10   !$omp simd11   do i = 1, 1012      do j = 1, 1013         print *, "omp simd"14         !ERROR: invalid branch leaving an OpenMP structured block15         goto 1016      end do17      if (i .EQ. 5) THEN18         call function1()19      else if (i .EQ. 7) THEN20         open (10, file="random-file-name.txt", err=20)2120       print *, "Error message doesn't branch out of the loop's structured block"22      else23         !ERROR: invalid branch leaving an OpenMP structured block24         open (10, file="random-file-name.txt", err=10)25      end if26   end do27   !$omp end simd2810 stop29 30end program omp_simd31 32subroutine function1()33   integer i, option34   option = 135   !$omp simd36   do i = 1, 1037      print *, "CORRECT SIMD LOOP"38   end do39   !$omp end simd40end subroutine function141