Hi PA,
not yet a full review, but some observations:
First: Please include the change
gcc/fortran/types.def (BT_FN_PTR_CONST_PTR_INT)
of "[PATCH v2 7/8] OpenMP: Fortran front-end support for dispatch +
adjust_args"
Do so either in this patch (3/8) - or in the previous (2/8) one that
adds it to gcc/builtin-types.def.
Otherwise this will break the build as omp-builtins.def (modified
in this patch) is also used by gfortran.
Causing intermittened build fails is bad - first, in general, and
secondly it causes issues when bisecting.
* * *
If I try your testcase and move "bar" and "baz" *after* 'foo' and leave
only the following before:
int baz (double *d_bv, const double *d_av, int n);
int bar (double *d_bv, const double *d_av, int n);
it fails at runtime with:
ERROR at 1: 0.000000 (act) != 2.718280 (exp)
as the two calls to __builtin_omp_get_mapped_ptr are now missing.
With both the declaration and the definition before the declare target,
it works.
* * *
I think this variant needs to be either supported – or an error has to
be printed that it cannot be supported, but that would be rather
unfortunate.
Thanks,
Tobias