[OpenMP] Clean-up Fortran tests

* Use "do" for DO loops, there is no "for" in Fortran and it is always
   integer

 * Add -cpp to not rely on file name case

 * Add "implicit none" safety
This commit is contained in:
Michael Kruse
2025-10-06 11:58:44 +02:00
parent 93073af121
commit 830373372c
4 changed files with 10 additions and 7 deletions

View File

@@ -2,14 +2,14 @@
! It is done 3 times corresponding to every possible fraction of the last
! iteration before passing beyond UB.
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -DUB=16 %s -o %t-ub16.exe
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -DUB=17 %s -o %t-ub17.exe
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -DUB=18 %s -o %t-ub18.exe
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -cpp -DUB=16 %s -o %t-ub16.exe
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -cpp -DUB=17 %s -o %t-ub17.exe
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 -cpp -DUB=18 %s -o %t-ub18.exe
! RUN: %t-ub16.exe | FileCheck %s --match-full-lines
! RUN: %t-ub17.exe | FileCheck %s --match-full-lines
! RUN: %t-ub18.exe | FileCheck %s --match-full-lines
program tile_intfor_1d
program tile_do_1d
implicit none
integer i
print *, 'do'

View File

@@ -4,7 +4,8 @@
! RUN: %t.exe | FileCheck %s --match-full-lines
program tile_intfor_2d
program tile_do_2d
implicit none
integer i, j
print *, 'do'

View File

@@ -3,7 +3,8 @@
! RUN: %flang %flags %openmp_flags -fopenmp-version=51 %s -o %t.exe
! RUN: %t.exe | FileCheck %s --match-full-lines
program tile_intfor_varsizes
program tile_do_2d_varsizes
implicit none
integer i
call kernel(7,17,3,2)

View File

@@ -4,7 +4,8 @@
! RUN: %t.exe | FileCheck %s --match-full-lines
program unroll_heuristic
program unroll_heuristic_do
implicit none
integer :: i
print *, 'do'