From fdedd363cf43a0247748dc43467815f0b2b6385c Mon Sep 17 00:00:00 2001 From: agozillon Date: Wed, 21 Oct 2026 23:58:23 +0200 Subject: [PATCH] [Flang][OpenMP][Fortran-map-tests] Adjust tests for privatized descriptors (#2638) These tests write over the bounds of the mapped device data, previously our devices were fine with this but after privatizing the descriptor they will be less happy with this. --- .../allocatable-array-section-1d-upperbound.f95 | 2 +- test/fortran-map-tests/allocatable-map-scopes-bounds.f95 | 6 +++--- .../pointer-array-section-1d-upperbound.f95 | 2 +- test/fortran-map-tests/pointer-map-scopes-bounds.f95 | 6 +++--- .../pointer-target-array-section-1d-upperbound.f95 | 2 +- test/fortran-map-tests/pointer-target-map-scopes-bounds.f95 | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/fortran-map-tests/allocatable-array-section-1d-upperbound.f95 b/test/fortran-map-tests/allocatable-array-section-1d-upperbound.f95 index d0b960409b..e0aab1ffe9 100644 --- a/test/fortran-map-tests/allocatable-array-section-1d-upperbound.f95 +++ b/test/fortran-map-tests/allocatable-array-section-1d-upperbound.f95 @@ -15,7 +15,7 @@ program prog_a end do !$omp target map(tofrom:var_a(2:6)) map(tofrom:var_b(2:6)) - do var_c = 1, 10 + do var_c = 2, 6 var_b(var_c) = var_a(var_c) end do !$omp end target diff --git a/test/fortran-map-tests/allocatable-map-scopes-bounds.f95 b/test/fortran-map-tests/allocatable-map-scopes-bounds.f95 index c012659418..47c05327c2 100644 --- a/test/fortran-map-tests/allocatable-map-scopes-bounds.f95 +++ b/test/fortran-map-tests/allocatable-map-scopes-bounds.f95 @@ -10,7 +10,7 @@ subroutine sub_a(var_a) integer, allocatable, intent (inout) :: var_a(:) !$omp target map(tofrom: var_a(2:6)) - do var_b = 1, 10 + do var_b = 2, 6 var_a(var_b) = var_a(var_b) + var_b end do !$omp end target @@ -34,7 +34,7 @@ subroutine sub_b allocate(var_c(10)) !$omp target map(tofrom: var_c(2:6)) - do var_a = 1, 10 + do var_a = 2, 6 var_c(var_a) = var_a end do !$omp end target @@ -60,7 +60,7 @@ program prog_a allocate(var_c(10)) !$omp target map(tofrom: var_c(2:6)) - do var_a = 1, 10 + do var_a = 2, 6 var_c(var_a) = var_a end do !$omp end target diff --git a/test/fortran-map-tests/pointer-array-section-1d-upperbound.f95 b/test/fortran-map-tests/pointer-array-section-1d-upperbound.f95 index 8284ac0d76..d3de8ecba1 100644 --- a/test/fortran-map-tests/pointer-array-section-1d-upperbound.f95 +++ b/test/fortran-map-tests/pointer-array-section-1d-upperbound.f95 @@ -15,7 +15,7 @@ program prog_a end do !$omp target map(tofrom:var_a(2:6)) map(tofrom:var_b(2:6)) - do var_c = 1, 10 + do var_c = 2, 6 var_b(var_c) = var_a(var_c) end do !$omp end target diff --git a/test/fortran-map-tests/pointer-map-scopes-bounds.f95 b/test/fortran-map-tests/pointer-map-scopes-bounds.f95 index 2bf374071d..a76c8c5d28 100644 --- a/test/fortran-map-tests/pointer-map-scopes-bounds.f95 +++ b/test/fortran-map-tests/pointer-map-scopes-bounds.f95 @@ -10,7 +10,7 @@ subroutine sub_a(var_a) integer :: var_b, var_c !$omp target map(tofrom: var_a(2:6)) - do var_b = 1, 10 + do var_b = 2, 6 var_a(var_b) = var_a(var_b) + var_b end do !$omp end target @@ -34,7 +34,7 @@ subroutine sub_b allocate(var_a(10)) !$omp target map(tofrom: var_a(2:6)) - do var_b = 1, 10 + do var_b = 2, 6 var_a(var_b) = var_b end do !$omp end target @@ -61,7 +61,7 @@ program prog_a allocate(var_a(10)) !$omp target map(tofrom: var_a(2:6)) - do var_b = 1, 10 + do var_b = 2, 6 var_a(var_b) = var_b end do !$omp end target diff --git a/test/fortran-map-tests/pointer-target-array-section-1d-upperbound.f95 b/test/fortran-map-tests/pointer-target-array-section-1d-upperbound.f95 index 8fbd567162..8c68c2d5b5 100644 --- a/test/fortran-map-tests/pointer-target-array-section-1d-upperbound.f95 +++ b/test/fortran-map-tests/pointer-target-array-section-1d-upperbound.f95 @@ -17,7 +17,7 @@ program prog_a end do !$omp target map(tofrom:var_a(2:6)) map(tofrom:var_b(2:6)) - do var_e = 1, 10 + do var_e = 2, 6 var_b(var_e) = var_a(var_e) end do !$omp end target diff --git a/test/fortran-map-tests/pointer-target-map-scopes-bounds.f95 b/test/fortran-map-tests/pointer-target-map-scopes-bounds.f95 index 9d23dd702d..e37bee38c8 100644 --- a/test/fortran-map-tests/pointer-target-map-scopes-bounds.f95 +++ b/test/fortran-map-tests/pointer-target-map-scopes-bounds.f95 @@ -10,7 +10,7 @@ subroutine sub_a(var_a) integer, pointer, intent (inout) :: var_a(:) !$omp target map(tofrom: var_a(2:6)) - do var_b = 1, 10 + do var_b = 2, 6 var_a(var_b) = var_a(var_b) + var_b end do !$omp end target @@ -35,7 +35,7 @@ subroutine sub_b var_c => var_d !$omp target map(tofrom: var_c(2:6)) - do var_a = 1, 10 + do var_a = 2, 6 var_c(var_a) = var_a end do !$omp end target @@ -60,7 +60,7 @@ program prog_a var_c => var_d !$omp target map(tofrom: var_c(2:6)) - do var_a = 1, 10 + do var_a = 2, 6 var_c(var_a) = var_a end do !$omp end target