[Bug fortran/108558] OpenMP/Fortran 'has_device_addr' clause getting lost?

tschwinge at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 26 13:46:53 GMT 2023


--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> I bet that this is a problem of 'gfc_split_omp_clauses': [...]

Heh, so indeed as I suspected:

(In reply to myself from comment #0)
> (Decomposed combined construct.  Is that perhaps where the problem lies?)


With your patch (thanks!) applied, I do get what I suspect are the expected


    -  #pragma omp target
    +  #pragma omp target has_device_addr(a) has_device_addr(b)


    -  #pragma omp target num_teams(0) thread_limit(0) firstprivate(m)
map(tofrom:*b [len: D.4283][implicit]) map(alloc:b [pointer assign, bias: 0])
map(tofrom:*a [len: D.4280][implicit]) map(alloc:a [pointer assign, bias: 0])
    +  #pragma omp target num_teams(0) thread_limit(0) has_device_addr(a)
has_device_addr(b) firstprivate(D.4283) firstprivate(D.4280) firstprivate(m)

..., and my original test case behaves as expected; OpenMP/Fortran
'has_device_addr' works.

More information about the Gcc-bugs mailing list