Skip to content

Commit e3538b8

Browse files
committed
Tidy up tests
1 parent 3b4c5ac commit e3538b8

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

flang/test/Lower/OpenMP/optional-argument-map-3.f90

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
module mod
44
contains
5-
subroutine foo( dt, switch )
6-
implicit none
7-
real(4), dimension(:), INTENT(INOUT) :: dt
8-
logical, INTENT(IN) :: switch
9-
integer :: dim, idx
5+
subroutine foo(dt, switch)
6+
implicit none
7+
real(4), dimension(:), intent(inout) :: dt
8+
logical, intent(in) :: switch
9+
integer :: dim, idx
1010

11-
if ( switch ) then
11+
if (switch) then
1212
!$omp target teams distribute parallel do
13-
do idx = 1, 100
13+
do idx = 1, 100
1414
dt(idx) = 20
15-
end do
16-
else
15+
end do
16+
else
1717
!$omp target teams distribute parallel do
18-
do idx = 1, 100
18+
do idx = 1, 100
1919
dt(idx) = 30
20-
end do
21-
end if
22-
end subroutine foo
20+
end do
21+
end if
22+
end subroutine foo
2323
end module
2424

2525
! CHECK-LABEL: func.func @{{.*}}(

offload/test/offloading/fortran/optional-mapped-arguments-3.f90

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,38 @@
88
! RUN: %libomptarget-compile-fortran-run-and-check-generic
99
module reproducer_mod
1010
contains
11-
subroutine branching_target_call( dt, switch )
11+
subroutine branching_target_call(dt, switch)
1212
implicit none
13-
real(4), dimension(:), INTENT(INOUT) :: dt
14-
logical, INTENT(IN) :: switch
13+
real(4), dimension(:), intent(inout) :: dt
14+
logical, intent(in) :: switch
1515
integer :: dim, idx
1616

1717
dim = size(dt)
18-
if ( switch ) then
18+
if (switch) then
1919
!$omp target teams distribute parallel do
20-
do idx = 1, dim
21-
dt(idx) = 20
22-
end do
20+
do idx = 1, dim
21+
dt(idx) = 20
22+
end do
2323
else
2424
!$omp target teams distribute parallel do
25-
do idx = 1, dim
26-
dt(idx) = 30
27-
end do
25+
do idx = 1, dim
26+
dt(idx) = 30
27+
end do
2828
end if
29-
end subroutine branching_target_call
29+
end subroutine branching_target_call
3030
end module reproducer_mod
3131

3232
program reproducer
33-
use reproducer_mod
34-
implicit none
35-
real(4), dimension(:), allocatable :: dt
36-
integer :: n = 21312
37-
integer :: i
33+
use reproducer_mod
34+
implicit none
35+
real(4), dimension(:), allocatable :: dt
36+
integer :: n = 21312
37+
integer :: i
3838

39-
allocate(dt(n))
40-
call branching_target_call(dt, .FALSE.)
41-
call branching_target_call(dt, .TRUE.)
42-
print *, "PASSED"
39+
allocate (dt(n))
40+
call branching_target_call(dt, .FALSE.)
41+
call branching_target_call(dt, .TRUE.)
42+
print *, "PASSED"
4343
end program reproducer
4444

4545
! CHECK: PASSED

0 commit comments

Comments
 (0)