Hi Kwok,
Kwok Cheung Yeung wrote:
Oops. I thought exactly the same thing yesterday, but forgot to add
the changes to my commit! Here is the updated version.
I regard(ed) this change as obvious - hence, I missed to reply.
But for completeness: LGTM.
I think it would be useful to commit this now with an xfail
for the one failing testcase that depends on the review-pending libgomp
patch.
I mean something like:
--- a/libgomp/testsuite/libgomp.fortran/declare-target-indirect-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/declare-target-indirect-2.f90
@@ -1,2 +1,3 @@
! { dg-do run }
+! { dg-xfail-run-if "Requires libgomp bug fix pending review" { offload_device
} }
Thanks,
Tobias
On 06/02/2024 9:03 am, Tobias Burnus wrote:
LGTM. I just wonder whether there should be a value test and not just
a does-not-crash-when-called test for the latter testcase, i.e.
+++ b/libgomp/testsuite/libgomp.fortran/declare-target-indirect-3.f90
@@ -0,0 +1,25 @@
+! { dg-do run }
+
+! Check that indirect calls work on procedures passed in via a
dummy argument
+
+module m
+contains
+ subroutine bar
+ !$omp declare target enter(bar) indirect
e.g. "integer function bar()" ... " bar = 42"
+ end subroutine
+
+ subroutine foo(f)
+ procedure(bar) :: f
+
+ !$omp target
+ call f
And then: if (f() /= 42) stop 1
+ !$omp end target
+ end subroutine
+end module
Thanks,
Tobias