On 14.01.22 12:55, Jakub Jelinek via Fortran wrote:
If we want to check intptr_t, we should guard the dg-error with
"" { target { lp64 || llp64 } }
or so.

Well, if we want to use intptr_t, we could use be explicitly as with:

  use iso_c_binding, only: c_intptr_t
  ! use omp_lib, only: omp_allocator_handle_kind
  ...  ('implicit none' etc.)
  integer, parameter :: omp_allocator_handle_kind = c_intptr_t
  ...
  integer(kind=omp_allocator_handle_kind)

(@Abid: The 'use omp_lib' line is commented as in gcc/testsuite/*/gomp/,
the OpenMP module/header from libgomp is not available - and then a
stub parameter is created.)

Otherwise yes, we can add some other kind and hope it is not the
same as omp_allocator_handle_kind.  Or we can do both,
keep the current one with the target lp64 || llp64 and
add another one with some integer(kind=1).

For just testing something invalid, I think it makes more sense to just
set it to kind=1.

For checking the valid value, using c_intptr_t seems to make more sense
than restricting it to (l)l64.

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 
München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas 
Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht 
München, HRB 106955

Reply via email to