On Mon, Mar 24, 2025 at 02:36:31PM +0100, Paul-Antoine Arras wrote:
> Hi Thomas,
>
> On 24/03/2025 13:47, Thomas Schwinge wrote:
> > On 2025-03-21T18:35:57+0100, Paul-Antoine Arras <[email protected]> wrote:
> > > --- /dev/null
> > > +++ b/gcc/testsuite/gfortran.dg/gomp/interop-5.f90
> > > @@ -0,0 +1,21 @@
> > > +! { dg-additional-options "-fdump-tree-omplower" }
> > > +
> > > +subroutine sub1 (a1, a2, a3, a4)
> > > + use omp_lib, only: omp_interop_kind
> >
> > [...]/gfortran.dg/gomp/interop-5.f90:4:8: Fatal Error: Cannot open
> > module file 'omp_lib.mod' for reading at (1): No such file or directory
> > compilation terminated.
> > compiler exited with status 1
> > FAIL: gfortran.dg/gomp/interop-5.f90 -O (test for excess errors)
> >
> > As other files state:
> >
> > ! The following definitions are in omp_lib, which cannot be included
> > ! in gcc/testsuite/
>
> Thanks for pointing that out! The attached patch should fix it.
>
> If no one objects, I'll commit it shortly.
LGTM.
> --- gcc/testsuite/gfortran.dg/gomp/interop-5.f90
> +++ gcc/testsuite/gfortran.dg/gomp/interop-5.f90
> @@ -1,7 +1,13 @@
> ! { dg-additional-options "-fdump-tree-omplower" }
>
> subroutine sub1 (a1, a2, a3, a4)
> - use omp_lib, only: omp_interop_kind
> + use iso_c_binding
> + implicit none
> +
> + ! The following definitions are in omp_lib, which cannot be included
> + ! in gcc/testsuite/
> + integer, parameter :: omp_interop_kind = c_intptr_t
> +
> integer(omp_interop_kind) :: a1 ! by ref
> integer(omp_interop_kind), optional :: a2 ! as pointer
> integer(omp_interop_kind), allocatable :: a3 ! ref to pointer
Jakub