From 9c5f2cf550c18b5fb945a27016fdd3d5a5102977 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Tue, 21 Apr 2026 07:21:08 -0500 Subject: [PATCH] [smoke-fails] Improve fnew_use_device_ptr test case Scope of changes: 1) Fixed compilation error 2) Added verification of the results --- .../FNew-use_device_ptr/use_device_ptr.f95 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/smoke-fails/FNew-use_device_ptr/use_device_ptr.f95 b/test/smoke-fails/FNew-use_device_ptr/use_device_ptr.f95 index e664747f5b..8224e4b3f3 100644 --- a/test/smoke-fails/FNew-use_device_ptr/use_device_ptr.f95 +++ b/test/smoke-fails/FNew-use_device_ptr/use_device_ptr.f95 @@ -1,6 +1,7 @@ program main use omp_lib + use iso_c_binding implicit none interface subroutine fortran_callable_init(a,N) bind(c) @@ -40,7 +41,17 @@ subroutine fortran_callable_init(a,N) bind(c) !$OMP TASKWAIT !$OMP END TARGET DATA - print *,arr1, crr1 + + do x =1, nx + if (arr1(x) .ne. x * 2.0) then + print *, "Wrong initialization of arr1" + stop 1 + end if + if (crr1(x) .ne. arr1(x)+1.0) then + print *, "Wrong value of crr1" + stop 1 + end if + end do deallocate(arr1) deallocate(crr1)