[libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90
authorTom de Vries <tdevries@suse.de>
Fri, 1 Apr 2022 11:08:54 +0000 (13:08 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 1 Apr 2022 11:23:16 +0000 (13:23 +0200)
commitbfa9f660d25aef1513b1289d01c80b52090ef72a
tree785e0aeab00621ce448703c48394f3b27f9bb16c
parent065e25f6331c130bc3cd2ce78036f2328adb3d71
[libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on
an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run
into:
...
FAIL: libgomp.fortran/examples-4/declare_target-1.f90 -O0 \
  -DGOMP_NVPTX_JIT=-O0 execution test
FAIL: libgomp.fortran/examples-4/declare_target-2.f90 -O0 \
  -DGOMP_NVPTX_JIT=-O0 execution test
...

Fix this by further limiting recursion depth in the test-cases for nvptx.

Furthermore, make the recursion depth limiting nvptx-specific.

Tested on x86_64 with nvptx accelerator.

libgomp/ChangeLog:

2022-04-01  Tom de Vries  <tdevries@suse.de>

* testsuite/libgomp.fortran/examples-4/declare_target-1.f90: Define
and use REC_DEPTH.
* testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Same.
libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90
libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90