From 11586ed9c96870a14fb417fe26eebe4504c3d60a Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Mon, 9 Dec 2019 11:21:22 +0000 Subject: [PATCH] =?utf8?q?libgomp/testsuite/*fortran=20=E2=80=93=20make=20?= =?utf8?q?'stop'=20values=20unique?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes unique. * testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto. * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto. * testsuite/libgomp.oacc-fortran/declare-5.f90: Ditto. * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90: Ditto. * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: Ditto. * testsuite/libgomp.oacc-fortran/optional-update-host.f90: Ditto. From-SVN: r279117 --- libgomp/ChangeLog | 12 + .../libgomp.fortran/use_device_addr-3.f90 | 328 ++++++++++----------- .../libgomp.fortran/use_device_addr-4.f90 | 328 ++++++++++----------- .../libgomp.fortran/use_device_ptr-optional-2.f90 | 4 +- .../testsuite/libgomp.oacc-fortran/declare-5.f90 | 4 +- .../optional-data-copyin-by-value.f90 | 2 +- .../libgomp.oacc-fortran/optional-firstprivate.f90 | 2 +- .../libgomp.oacc-fortran/optional-update-host.f90 | 8 +- 8 files changed, 350 insertions(+), 338 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 22ac20f..a0bd251 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,15 @@ +2019-12-09 Tobias Burnus + + * testsuite/libgomp.fortran/use_device_addr-3.f90: Make 'stop' codes + unique. + * testsuite/libgomp.fortran/use_device_addr-4.f90: Ditto. + * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Ditto. + * testsuite/libgomp.oacc-fortran/declare-5.f90: Ditto. + * testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90: + Ditto. + * testsuite/libgomp.oacc-fortran/optional-firstprivate.f90: Ditto. + * testsuite/libgomp.oacc-fortran/optional-update-host.f90: Ditto. + 2019-12-06 Kwok Cheung Yeung * config/accel/proc.c (omp_get_num_procs): Apply ialias macro. diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 index 82cf9ac..a917d28 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-3.f90 @@ -98,20 +98,20 @@ contains !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) call copy3_array(c_loc(aa), c_loc(bb), N) !$omp end target data - if (any(abs(aa - 11.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11.0_c_double) > 10.0_c_double * epsilon(aa))) stop 2 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 3 !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 4 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 5 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 6 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 7 end subroutine test_dummy_callee_1 ! Save device ptr - and recall pointer @@ -167,28 +167,28 @@ contains ! check c_loc ptr once call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 8 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 9 ! check c_loc ptr again after target-value modification aa = 1111.0_c_double !$omp target update to(aa) call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 1111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 1111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 10 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 11 ! check Fortran pointer after target-value modification aa = 11111.0_c_double !$omp target update to(aa) call copy3_array(c_loc(aptr), c_loc(bptr), N) !$omp target update from(bb) - if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 12 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 13 !$omp end target data - if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 14 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 15 !$omp target data map(to:cc) map(from:dd) @@ -202,28 +202,28 @@ contains ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 16 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 17 ! check c_loc ptr again after target-value modification cc = 3333.0_c_double !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 18 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 19 ! check Fortran pointer after target-value modification cc = 33333.0_c_double !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 20 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 21 !$omp end target data - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 22 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 23 !$omp target data map(to:ee) map(from:ff) @@ -237,28 +237,28 @@ contains ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 24 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 25 ! check c_loc ptr again after target-value modification ee = 5555.0_c_double !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 26 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 27 ! check Fortran pointer after target-value modification ee = 55555.0_c_double !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 28 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 29 !$omp end target data - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 30 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 31 end subroutine test_dummy_callee_2 end module test_dummies @@ -303,38 +303,38 @@ contains integer, value :: N ! All shall be present - and pointing to non-NULL - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.present(ee) .or. .not.present(ff)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 32 + if (.not.present(cc) .or. .not.present(dd)) stop 33 + if (.not.present(ee) .or. .not.present(ff)) stop 34 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 35 + if (.not.associated(ee) .or. .not.associated(ff)) stop 36 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 37 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 38 call copy3_array(c_loc(aa), c_loc(bb), N) !$omp end target data - if (any(abs(aa - 11.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11.0_c_double) > 10.0_c_double * epsilon(aa))) stop 39 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 40 !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 41 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 42 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 43 call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 44 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 45 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 46 + if (.not.associated(ee) .or. .not.associated(ff)) stop 47 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 48 call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 49 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 50 end subroutine test_dummy_opt_callee_1 subroutine test_dummy_opt_callee_1_absent(aa, bb, cc, dd, ee, ff, N) @@ -346,20 +346,20 @@ contains integer, value :: N ! All shall be absent - if (present(aa) .or. present(bb)) stop 1 - if (present(cc) .or. present(dd)) stop 1 - if (present(ee) .or. present(ff)) stop 1 + if (present(aa) .or. present(bb)) stop 51 + if (present(cc) .or. present(dd)) stop 52 + if (present(ee) .or. present(ff)) stop 53 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (present(aa) .or. present(bb)) stop 1 + if (present(aa) .or. present(bb)) stop 54 !$omp end target data !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) - if (present(cc) .or. present(dd)) stop 1 + if (present(cc) .or. present(dd)) stop 55 !$omp end target data !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (present(ee) .or. present(ff)) stop 1 + if (present(ee) .or. present(ff)) stop 56 !$omp end target data end subroutine test_dummy_opt_callee_1_absent @@ -399,12 +399,12 @@ contains real(c_double) :: dummy ! All shall be present - and pointing to non-NULL - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.present(ee) .or. .not.present(ff)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 57 + if (.not.present(cc) .or. .not.present(dd)) stop 58 + if (.not.present(ee) .or. .not.present(ff)) stop 59 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 60 + if (.not.associated(ee) .or. .not.associated(ff)) stop 61 aa = 111.0_c_double bb = 222.0_c_double @@ -415,134 +415,134 @@ contains !$omp target data map(to:aa) map(from:bb) !$omp target data map(alloc:dummy) use_device_addr(aa,bb) - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 62 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 63 c_aptr = c_loc(aa) c_bptr = c_loc(bb) aptr => aa bptr => bb - if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 1 - if (.not.associated(aptr) .or. .not.associated(bptr)) stop 1 + if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 64 + if (.not.associated(aptr) .or. .not.associated(bptr)) stop 65 !$omp end target data - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 - if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 1 - if (.not.associated(aptr) .or. .not.associated(bptr)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 66 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 67 + if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 68 + if (.not.associated(aptr) .or. .not.associated(bptr)) stop 69 ! check c_loc ptr once call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 70 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 71 ! check c_loc ptr again after target-value modification aa = 1111.0_c_double !$omp target update to(aa) call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 1111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 1111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 72 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 73 ! check Fortran pointer after target-value modification aa = 11111.0_c_double !$omp target update to(aa) call copy3_array(c_loc(aptr), c_loc(bptr), N) !$omp target update from(bb) - if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 74 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 75 !$omp end target data - if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 1 - if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_double) > 10.0_c_double * epsilon(aa))) stop 76 + if (any(abs(3.0_c_double * aa - bb) > 10.0_c_double * epsilon(aa))) stop 77 !$omp target data map(to:cc) map(from:dd) !$omp target data map(alloc:dummy) use_device_addr(cc,dd) - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 78 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 79 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 80 c_cptr = c_loc(cc) c_dptr = c_loc(dd) cptr => cc dptr => dd - if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 1 - if (.not.associated(cptr) .or. .not.associated(dptr)) stop 1 + if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 81 + if (.not.associated(cptr) .or. .not.associated(dptr)) stop 82 !$omp end target data - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 - if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 1 - if (.not.associated(cptr) .or. .not.associated(dptr)) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 83 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 84 + if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 85 + if (.not.associated(cptr) .or. .not.associated(dptr)) stop 86 ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 87 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 88 ! check c_loc ptr again after target-value modification cc = 3333.0_c_double !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 89 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 90 ! check Fortran pointer after target-value modification cc = 33333.0_c_double !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 91 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 92 !$omp end target data - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 93 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 94 !$omp target data map(to:ee) map(from:ff) !$omp target data map(alloc:dummy) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 95 + if (.not.associated(ee) .or. .not.associated(ff)) stop 96 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 97 c_eptr = c_loc(ee) c_fptr = c_loc(ff) eptr => ee fptr => ff - if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 1 - if (.not.associated(eptr) .or. .not.associated(fptr)) stop 1 + if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 98 + if (.not.associated(eptr) .or. .not.associated(fptr)) stop 99 !$omp end target data - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 - if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 1 - if (.not.associated(eptr) .or. .not.associated(fptr)) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 100 + if (.not.associated(ee) .or. .not.associated(ff)) stop 101 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 102 + if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 103 + if (.not.associated(eptr) .or. .not.associated(fptr)) stop 104 ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 105 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 106 ! check c_loc ptr again after target-value modification ee = 5555.0_c_double !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 107 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 108 ! check Fortran pointer after target-value modification ee = 55555.0_c_double !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 109 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 110 !$omp end target data - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 111 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 112 end subroutine test_dummy_opt_callee_2 end module test_dummies_opt @@ -569,33 +569,33 @@ contains ee => null() ff => null() - if (associated(aa) .or. associated(bb)) stop 1 + if (associated(aa) .or. associated(bb)) stop 113 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (c_associated(c_loc(aa)) .or. c_associated(c_loc(bb))) stop 1 + if (c_associated(c_loc(aa)) .or. c_associated(c_loc(bb))) stop 114 c_aptr = c_loc(aa) c_bptr = c_loc(bb) aptr => aa bptr => bb - if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 1 - if (associated(aptr) .or. associated(bptr, bb)) stop 1 - if (associated(aa) .or. associated(bb)) stop 1 + if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 115 + if (associated(aptr) .or. associated(bptr, bb)) stop 116 + if (associated(aa) .or. associated(bb)) stop 117 !$omp end target data - if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 1 - if (associated(aptr) .or. associated(bptr, bb)) stop 1 - if (associated(aa) .or. associated(bb)) stop 1 + if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 118 + if (associated(aptr) .or. associated(bptr, bb)) stop 119 + if (associated(aa) .or. associated(bb)) stop 120 - if (allocated(gg)) stop 1 + if (allocated(gg)) stop 121 !$omp target data map(tofrom:gg) use_device_addr(gg) - if (c_associated(c_loc(gg))) stop 1 + if (c_associated(c_loc(gg))) stop 122 c_gptr = c_loc(gg) gptr => gg - if (c_associated(c_gptr)) stop 1 - if (associated(gptr)) stop 1 - if (allocated(gg)) stop 1 + if (c_associated(c_gptr)) stop 123 + if (associated(gptr)) stop 124 + if (allocated(gg)) stop 125 !$omp end target data - if (c_associated(c_gptr)) stop 1 - if (associated(gptr)) stop 1 - if (allocated(gg)) stop 1 + if (c_associated(c_gptr)) stop 126 + if (associated(gptr)) stop 127 + if (allocated(gg)) stop 128 call test_dummy_opt_nullptr_callee_1(ee, ff, hh, c_eptr, c_fptr, c_hptr, eptr, fptr, hptr) end subroutine test_nullptr_1 @@ -608,36 +608,36 @@ contains type(c_ptr), optional :: c_eptr, c_fptr, c_hptr real(c_double), optional, pointer :: eptr(:), fptr(:), hptr(:) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (associated(ee) .or. associated(ff)) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 129 + if (associated(ee) .or. associated(ff)) stop 130 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (associated(ee) .or. associated(ff)) stop 1 - if (c_associated(c_loc(ee)) .or. c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 131 + if (associated(ee) .or. associated(ff)) stop 132 + if (c_associated(c_loc(ee)) .or. c_associated(c_loc(ff))) stop 133 c_eptr = c_loc(ee) c_fptr = c_loc(ff) eptr => ee fptr => ff - if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 1 - if (associated(eptr) .or. associated(fptr)) stop 1 + if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 134 + if (associated(eptr) .or. associated(fptr)) stop 135 !$omp end target data - if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 1 - if (associated(eptr) .or. associated(fptr)) stop 1 + if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 136 + if (associated(eptr) .or. associated(fptr)) stop 137 - if (allocated(hh)) stop 1 + if (allocated(hh)) stop 138 !$omp target data map(tofrom:hh) use_device_addr(hh) - if (c_associated(c_loc(hh))) stop 1 + if (c_associated(c_loc(hh))) stop 139 c_hptr = c_loc(hh) hptr => hh - if (c_associated(c_hptr)) stop 1 - if (associated(hptr)) stop 1 - if (allocated(hh)) stop 1 + if (c_associated(c_hptr)) stop 140 + if (associated(hptr)) stop 141 + if (allocated(hh)) stop 142 !$omp end target data - if (c_associated(c_hptr)) stop 1 - if (associated(hptr)) stop 1 - if (allocated(hh)) stop 1 + if (c_associated(c_hptr)) stop 143 + if (associated(hptr)) stop 144 + if (allocated(hh)) stop 145 end subroutine test_dummy_opt_nullptr_callee_1 end module test_nullptr @@ -668,14 +668,14 @@ contains !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_double) > 10.0_c_double * epsilon(cc))) stop 146 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 147 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_double) > 10.0_c_double * epsilon(ee))) stop 148 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 149 deallocate(ee, ff) ! pointers, only end subroutine test_main_1 @@ -709,28 +709,28 @@ contains ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 150 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 151 ! check c_loc ptr again after target-value modification cc = 3333.0_c_double !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 152 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 153 ! check Fortran pointer after target-value modification cc = 33333.0_c_double !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(cc))) stop 154 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(cc))) stop 155 !$omp end target data - if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 1 - if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_double) > 10.0_c_double * epsilon(dd))) stop 156 + if (any(abs(3.0_c_double * cc - dd) > 10.0_c_double * epsilon(dd))) stop 157 !$omp target data map(to:ee) map(from:ff) @@ -744,28 +744,28 @@ contains ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 158 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 159 ! check c_loc ptr again after target-value modification ee = 5555.0_c_double !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 160 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 161 ! check Fortran pointer after target-value modification ee = 55555.0_c_double !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 162 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ff))) stop 163 !$omp end target data - if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 1 - if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_double) > 10.0_c_double * epsilon(ee))) stop 164 + if (any(abs(3.0_c_double * ee - ff) > 10.0_c_double * epsilon(ee))) stop 165 deallocate(ee, ff) end subroutine test_main_2 diff --git a/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 b/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 index d17249d..e7b6c62 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_addr-4.f90 @@ -98,20 +98,20 @@ contains !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) call copy3_array(c_loc(aa), c_loc(bb), N) !$omp end target data - if (any(abs(aa - 11.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11.0_c_float) > 10.0_c_float * epsilon(aa))) stop 2 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 3 !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 4 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 5 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 6 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 7 end subroutine test_dummy_callee_1 ! Save device ptr - and recall pointer @@ -167,28 +167,28 @@ contains ! check c_loc ptr once call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 8 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 9 ! check c_loc ptr again after target-value modification aa = 1111.0_c_float !$omp target update to(aa) call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 1111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 1111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 10 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 11 ! check Fortran pointer after target-value modification aa = 11111.0_c_float !$omp target update to(aa) call copy3_array(c_loc(aptr), c_loc(bptr), N) !$omp target update from(bb) - if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 12 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 13 !$omp end target data - if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 14 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 15 !$omp target data map(to:cc) map(from:dd) @@ -202,28 +202,28 @@ contains ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 16 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 17 ! check c_loc ptr again after target-value modification cc = 3333.0_c_float !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 18 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 19 ! check Fortran pointer after target-value modification cc = 33333.0_c_float !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 20 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 21 !$omp end target data - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 22 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 23 !$omp target data map(to:ee) map(from:ff) @@ -237,28 +237,28 @@ contains ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 24 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 25 ! check c_loc ptr again after target-value modification ee = 5555.0_c_float !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 26 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 27 ! check Fortran pointer after target-value modification ee = 55555.0_c_float !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 28 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 29 !$omp end target data - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 30 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 31 end subroutine test_dummy_callee_2 end module test_dummies @@ -303,38 +303,38 @@ contains integer, value :: N ! All shall be present - and pointing to non-NULL - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.present(ee) .or. .not.present(ff)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 32 + if (.not.present(cc) .or. .not.present(dd)) stop 33 + if (.not.present(ee) .or. .not.present(ff)) stop 34 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 35 + if (.not.associated(ee) .or. .not.associated(ff)) stop 36 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 37 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 38 call copy3_array(c_loc(aa), c_loc(bb), N) !$omp end target data - if (any(abs(aa - 11.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11.0_c_float) > 10.0_c_float * epsilon(aa))) stop 39 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 40 !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 41 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 42 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 43 call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 44 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 45 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 46 + if (.not.associated(ee) .or. .not.associated(ff)) stop 47 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 48 call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 49 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 50 end subroutine test_dummy_opt_callee_1 subroutine test_dummy_opt_callee_1_absent(aa, bb, cc, dd, ee, ff, N) @@ -346,20 +346,20 @@ contains integer, value :: N ! All shall be absent - if (present(aa) .or. present(bb)) stop 1 - if (present(cc) .or. present(dd)) stop 1 - if (present(ee) .or. present(ff)) stop 1 + if (present(aa) .or. present(bb)) stop 51 + if (present(cc) .or. present(dd)) stop 52 + if (present(ee) .or. present(ff)) stop 53 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (present(aa) .or. present(bb)) stop 1 + if (present(aa) .or. present(bb)) stop 54 !$omp end target data !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) - if (present(cc) .or. present(dd)) stop 1 + if (present(cc) .or. present(dd)) stop 55 !$omp end target data !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (present(ee) .or. present(ff)) stop 1 + if (present(ee) .or. present(ff)) stop 56 !$omp end target data end subroutine test_dummy_opt_callee_1_absent @@ -399,12 +399,12 @@ contains real(c_float) :: dummy ! All shall be present - and pointing to non-NULL - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.present(ee) .or. .not.present(ff)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 57 + if (.not.present(cc) .or. .not.present(dd)) stop 58 + if (.not.present(ee) .or. .not.present(ff)) stop 59 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 60 + if (.not.associated(ee) .or. .not.associated(ff)) stop 61 aa = 111.0_c_float bb = 222.0_c_float @@ -415,134 +415,134 @@ contains !$omp target data map(to:aa) map(from:bb) !$omp target data map(alloc:dummy) use_device_addr(aa,bb) - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 62 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 63 c_aptr = c_loc(aa) c_bptr = c_loc(bb) aptr => aa bptr => bb - if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 1 - if (.not.associated(aptr) .or. .not.associated(bptr)) stop 1 + if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 64 + if (.not.associated(aptr) .or. .not.associated(bptr)) stop 65 !$omp end target data - if (.not.present(aa) .or. .not.present(bb)) stop 1 - if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 1 - if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 1 - if (.not.associated(aptr) .or. .not.associated(bptr)) stop 1 + if (.not.present(aa) .or. .not.present(bb)) stop 66 + if (.not.c_associated(c_loc(aa)) .or. .not.c_associated(c_loc(bb))) stop 67 + if (.not.c_associated(c_aptr) .or. .not.c_associated(c_bptr)) stop 68 + if (.not.associated(aptr) .or. .not.associated(bptr)) stop 69 ! check c_loc ptr once call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 70 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 71 ! check c_loc ptr again after target-value modification aa = 1111.0_c_float !$omp target update to(aa) call copy3_array(c_aptr, c_bptr, N) !$omp target update from(bb) - if (any(abs(aa - 1111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 1111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 72 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 73 ! check Fortran pointer after target-value modification aa = 11111.0_c_float !$omp target update to(aa) call copy3_array(c_loc(aptr), c_loc(bptr), N) !$omp target update from(bb) - if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 74 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 75 !$omp end target data - if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 1 - if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 1 + if (any(abs(aa - 11111.0_c_float) > 10.0_c_float * epsilon(aa))) stop 76 + if (any(abs(3.0_c_float * aa - bb) > 10.0_c_float * epsilon(aa))) stop 77 !$omp target data map(to:cc) map(from:dd) !$omp target data map(alloc:dummy) use_device_addr(cc,dd) - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.allocated(cc) .or. .not.allocated(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 78 + if (.not.allocated(cc) .or. .not.allocated(dd)) stop 79 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 80 c_cptr = c_loc(cc) c_dptr = c_loc(dd) cptr => cc dptr => dd - if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 1 - if (.not.associated(cptr) .or. .not.associated(dptr)) stop 1 + if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 81 + if (.not.associated(cptr) .or. .not.associated(dptr)) stop 82 !$omp end target data - if (.not.present(cc) .or. .not.present(dd)) stop 1 - if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 1 - if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 1 - if (.not.associated(cptr) .or. .not.associated(dptr)) stop 1 + if (.not.present(cc) .or. .not.present(dd)) stop 83 + if (.not.c_associated(c_loc(cc)) .or. .not.c_associated(c_loc(dd))) stop 84 + if (.not.c_associated(c_cptr) .or. .not.c_associated(c_dptr)) stop 85 + if (.not.associated(cptr) .or. .not.associated(dptr)) stop 86 ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 87 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 88 ! check c_loc ptr again after target-value modification cc = 3333.0_c_float !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 89 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 90 ! check Fortran pointer after target-value modification cc = 33333.0_c_float !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 91 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 92 !$omp end target data - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 93 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 94 !$omp target data map(to:ee) map(from:ff) !$omp target data map(alloc:dummy) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 95 + if (.not.associated(ee) .or. .not.associated(ff)) stop 96 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 97 c_eptr = c_loc(ee) c_fptr = c_loc(ff) eptr => ee fptr => ff - if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 1 - if (.not.associated(eptr) .or. .not.associated(fptr)) stop 1 + if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 98 + if (.not.associated(eptr) .or. .not.associated(fptr)) stop 99 !$omp end target data - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (.not.associated(ee) .or. .not.associated(ff)) stop 1 - if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 1 - if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 1 - if (.not.associated(eptr) .or. .not.associated(fptr)) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 100 + if (.not.associated(ee) .or. .not.associated(ff)) stop 101 + if (.not.c_associated(c_loc(ee)) .or. .not.c_associated(c_loc(ff))) stop 102 + if (.not.c_associated(c_eptr) .or. .not.c_associated(c_fptr)) stop 103 + if (.not.associated(eptr) .or. .not.associated(fptr)) stop 104 ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 105 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 106 ! check c_loc ptr again after target-value modification ee = 5555.0_c_float !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 107 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 108 ! check Fortran pointer after target-value modification ee = 55555.0_c_float !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 109 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 110 !$omp end target data - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 111 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 112 end subroutine test_dummy_opt_callee_2 end module test_dummies_opt @@ -569,33 +569,33 @@ contains ee => null() ff => null() - if (associated(aa) .or. associated(bb)) stop 1 + if (associated(aa) .or. associated(bb)) stop 113 !$omp target data map(to:aa) map(from:bb) use_device_addr(aa,bb) - if (c_associated(c_loc(aa)) .or. c_associated(c_loc(bb))) stop 1 + if (c_associated(c_loc(aa)) .or. c_associated(c_loc(bb))) stop 114 c_aptr = c_loc(aa) c_bptr = c_loc(bb) aptr => aa bptr => bb - if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 1 - if (associated(aptr) .or. associated(bptr, bb)) stop 1 - if (associated(aa) .or. associated(bb)) stop 1 + if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 115 + if (associated(aptr) .or. associated(bptr, bb)) stop 116 + if (associated(aa) .or. associated(bb)) stop 117 !$omp end target data - if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 1 - if (associated(aptr) .or. associated(bptr, bb)) stop 1 - if (associated(aa) .or. associated(bb)) stop 1 + if (c_associated(c_aptr) .or. c_associated(c_bptr)) stop 118 + if (associated(aptr) .or. associated(bptr, bb)) stop 119 + if (associated(aa) .or. associated(bb)) stop 120 - if (allocated(gg)) stop 1 + if (allocated(gg)) stop 121 !$omp target data map(tofrom:gg) use_device_addr(gg) - if (c_associated(c_loc(gg))) stop 1 + if (c_associated(c_loc(gg))) stop 122 c_gptr = c_loc(gg) gptr => gg - if (c_associated(c_gptr)) stop 1 - if (associated(gptr)) stop 1 - if (allocated(gg)) stop 1 + if (c_associated(c_gptr)) stop 123 + if (associated(gptr)) stop 124 + if (allocated(gg)) stop 125 !$omp end target data - if (c_associated(c_gptr)) stop 1 - if (associated(gptr)) stop 1 - if (allocated(gg)) stop 1 + if (c_associated(c_gptr)) stop 126 + if (associated(gptr)) stop 127 + if (allocated(gg)) stop 128 call test_dummy_opt_nullptr_callee_1(ee, ff, hh, c_eptr, c_fptr, c_hptr, eptr, fptr, hptr) end subroutine test_nullptr_1 @@ -608,36 +608,36 @@ contains type(c_ptr), optional :: c_eptr, c_fptr, c_hptr real(c_float), optional, pointer :: eptr(:), fptr(:), hptr(:) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (associated(ee) .or. associated(ff)) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 129 + if (associated(ee) .or. associated(ff)) stop 130 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) - if (.not.present(ee) .or. .not.present(ff)) stop 1 - if (associated(ee) .or. associated(ff)) stop 1 - if (c_associated(c_loc(ee)) .or. c_associated(c_loc(ff))) stop 1 + if (.not.present(ee) .or. .not.present(ff)) stop 131 + if (associated(ee) .or. associated(ff)) stop 132 + if (c_associated(c_loc(ee)) .or. c_associated(c_loc(ff))) stop 133 c_eptr = c_loc(ee) c_fptr = c_loc(ff) eptr => ee fptr => ff - if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 1 - if (associated(eptr) .or. associated(fptr)) stop 1 + if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 134 + if (associated(eptr) .or. associated(fptr)) stop 135 !$omp end target data - if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 1 - if (associated(eptr) .or. associated(fptr)) stop 1 + if (c_associated(c_eptr) .or. c_associated(c_fptr)) stop 136 + if (associated(eptr) .or. associated(fptr)) stop 137 - if (allocated(hh)) stop 1 + if (allocated(hh)) stop 138 !$omp target data map(tofrom:hh) use_device_addr(hh) - if (c_associated(c_loc(hh))) stop 1 + if (c_associated(c_loc(hh))) stop 139 c_hptr = c_loc(hh) hptr => hh - if (c_associated(c_hptr)) stop 1 - if (associated(hptr)) stop 1 - if (allocated(hh)) stop 1 + if (c_associated(c_hptr)) stop 140 + if (associated(hptr)) stop 141 + if (allocated(hh)) stop 142 !$omp end target data - if (c_associated(c_hptr)) stop 1 - if (associated(hptr)) stop 1 - if (allocated(hh)) stop 1 + if (c_associated(c_hptr)) stop 143 + if (associated(hptr)) stop 144 + if (allocated(hh)) stop 145 end subroutine test_dummy_opt_nullptr_callee_1 end module test_nullptr @@ -668,14 +668,14 @@ contains !$omp target data map(to:cc) map(from:dd) use_device_addr(cc,dd) call copy3_array(c_loc(cc), c_loc(dd), N) !$omp end target data - if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33.0_c_float) > 10.0_c_float * epsilon(cc))) stop 146 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 147 !$omp target data map(to:ee) map(from:ff) use_device_addr(ee,ff) call copy3_array(c_loc(ee), c_loc(ff), N) !$omp end target data - if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55.0_c_float) > 10.0_c_float * epsilon(ee))) stop 148 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 149 deallocate(ee, ff) ! pointers, only end subroutine test_main_1 @@ -709,28 +709,28 @@ contains ! check c_loc ptr once call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 150 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 151 ! check c_loc ptr again after target-value modification cc = 3333.0_c_float !$omp target update to(cc) call copy3_array(c_cptr, c_dptr, N) !$omp target update from(dd) - if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 3333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 152 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 153 ! check Fortran pointer after target-value modification cc = 33333.0_c_float !$omp target update to(cc) call copy3_array(c_loc(cptr), c_loc(dptr), N) !$omp target update from(dd) - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(cc))) stop 154 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(cc))) stop 155 !$omp end target data - if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 1 - if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 1 + if (any(abs(cc - 33333.0_c_float) > 10.0_c_float * epsilon(dd))) stop 156 + if (any(abs(3.0_c_float * cc - dd) > 10.0_c_float * epsilon(dd))) stop 157 !$omp target data map(to:ee) map(from:ff) @@ -744,28 +744,28 @@ contains ! check c_loc ptr once call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 158 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 159 ! check c_loc ptr again after target-value modification ee = 5555.0_c_float !$omp target update to(ee) call copy3_array(c_eptr, c_fptr, N) !$omp target update from(ff) - if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 5555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 160 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 161 ! check Fortran pointer after target-value modification ee = 55555.0_c_float !$omp target update to(ee) call copy3_array(c_loc(eptr), c_loc(fptr), N) !$omp target update from(ff) - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 162 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ff))) stop 163 !$omp end target data - if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 1 - if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 1 + if (any(abs(ee - 55555.0_c_float) > 10.0_c_float * epsilon(ee))) stop 164 + if (any(abs(3.0_c_float * ee - ff) > 10.0_c_float * epsilon(ee))) stop 165 deallocate(ee, ff) end subroutine test_main_2 diff --git a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 index 6eefbe1..d33b7d1 100644 --- a/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 +++ b/libgomp/testsuite/libgomp.fortran/use_device_ptr-optional-2.f90 @@ -37,8 +37,8 @@ contains if (present(z)) then; z(1) = 5; stop 15; endif if (present(cptr)) then; cptr = c_loc(v); stop 16; endif if (present(cptr_in)) then - if (c_associated(cptr_in, c_loc(x))) stop 26 - stop 27 + if (c_associated(cptr_in, c_loc(x))) stop 17 + stop 18 endif !$omp end target data diff --git a/libgomp/testsuite/libgomp.oacc-fortran/declare-5.f90 b/libgomp/testsuite/libgomp.oacc-fortran/declare-5.f90 index 4eb0eca..2fd25d6 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/declare-5.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/declare-5.f90 @@ -102,6 +102,6 @@ program test if (.not. acc_is_present (y)) stop 7 if (.not. acc_is_present (z)) stop 8 - if (a /= 3.0) stop 3 - if (k /= -378) stop 3 + if (a /= 3.0) stop 30 + if (k /= -378) stop 31 end program test diff --git a/libgomp/testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90 b/libgomp/testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90 index 5cadeed..8e84298 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-data-copyin-by-value.f90 @@ -8,7 +8,7 @@ program test integer :: res if (foo(27) .ne. 27) stop 1 - if (foo(16, 18) .ne. 288) stop 1 + if (foo(16, 18) .ne. 288) stop 2 contains function foo(x, y) integer, value :: x diff --git a/libgomp/testsuite/libgomp.oacc-fortran/optional-firstprivate.f90 b/libgomp/testsuite/libgomp.oacc-fortran/optional-firstprivate.f90 index 693e611..b8ebd6e 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/optional-firstprivate.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-firstprivate.f90 @@ -44,7 +44,7 @@ program test_firstprivate call test_allocatable(res_alloc, a_alloc, b_alloc, c_alloc) do i = 1, n - if (res_alloc(i) .ne. a_alloc(i) * b_alloc(i) + c_alloc(i)) stop 2 + if (res_alloc(i) .ne. a_alloc(i) * b_alloc(i) + c_alloc(i)) stop 3 end do deallocate(a_alloc) diff --git a/libgomp/testsuite/libgomp.oacc-fortran/optional-update-host.f90 b/libgomp/testsuite/libgomp.oacc-fortran/optional-update-host.f90 index 36b9424..dc2b5da 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/optional-update-host.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/optional-update-host.f90 @@ -29,12 +29,12 @@ program optional_update_host call test_array(a_arr, b_arr) do i = 1, n - if (res_arr(i) .ne. 0) stop 1 + if (res_arr(i) .ne. 0) stop 3 end do call test_array(a_arr, b_arr, res_arr) do i = 1, n - if (res_arr(i) .ne. a_arr(i) * b_arr(i)) stop 2 + if (res_arr(i) .ne. a_arr(i) * b_arr(i)) stop 4 end do allocate(a_alloc(n)) @@ -49,12 +49,12 @@ program optional_update_host call test_allocatable(a_alloc, b_alloc) do i = 1, n - if (res_alloc(i) .ne. 0) stop 1 + if (res_alloc(i) .ne. 0) stop 5 end do call test_allocatable(a_alloc, b_alloc, res_alloc) do i = 1, n - if (res_alloc(i) .ne. a_alloc(i) * b_alloc(i)) stop 2 + if (res_alloc(i) .ne. a_alloc(i) * b_alloc(i)) stop 6 end do deallocate(a_alloc) -- 2.7.4