On Tue, Mar 25, 2025 at 10:03:17AM -0600, Sandra Loosemore wrote:
>       * gfortran.dg/gomp/append-args-interop.f90: New.

The test fails for me with
UNRESOLVED: gfortran.dg/gomp/append-args-interop.f90   -O   scan-tree-dump 
gimple "__builtin_GOMP_interop \\\\(99, 0, 0B, 0B, 0B, 0, 0B, 3, 
interopobjs.[0-9]+,"
UNRESOLVED: gfortran.dg/gomp/append-args-interop.f90   -O   scan-tree-dump 
gimple "__builtin_GOMP_interop \\\\(99, 3, interopobjs.[0-9]+, 
tgt_tgtsync.[0-9]+, pref_type.[0-9]+, "
UNRESOLVED: gfortran.dg/gomp/append-args-interop.f90   -O   scan-tree-dump 
gimple "g \\\\(&interop.[0-9]+, interop.[0-9]+, &interop.[0-9]+\\\\)"
FAIL: gfortran.dg/gomp/append-args-interop.f90   -O  (test for excess errors)
on both x86_64-linux and i686-linux.

The gcc/testsuite/*/gomp/ tests aren't compiled with include or module
paths pointing to libgomp, so shouldn't be using omp.h nor use omp_lib
etc.

The following patch adjusts the test to define it locally, like
e.g. recently in interop-5.f90 test or many other tests which have
their own definitions of types or enumerators they need.

Tested on x86_64-linux, committed to trunk.

2025-03-26  Jakub Jelinek  <ja...@redhat.com>

        * gfortran.dg/gomp/append-args-interop.f90: Don't use omp_lib,
        instead use iso_c_binding and define omp_interop_kind parameter
        locally.

--- gcc/testsuite/gfortran.dg/gomp/append-args-interop.f90.jj   2025-03-25 
21:11:06.863408456 +0100
+++ gcc/testsuite/gfortran.dg/gomp/append-args-interop.f90      2025-03-26 
14:39:53.435511151 +0100
@@ -6,7 +6,8 @@
 ! append_args clause. 
 
 module m
-  use omp_lib, only: omp_interop_kind
+  use iso_c_binding, only: c_intptr_t
+  integer, parameter :: omp_interop_kind = c_intptr_t
 contains
 subroutine g(x,y,z)
   integer(omp_interop_kind) :: x, y, z


        Jakub

Reply via email to