https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109701
--- Comment #6 from tommelt ---
Thank you.
Interestingly, I tried your suggestion:
"!$omp target teams distribute parallel do simd if(target:is_GPU)
reduction(max:max_diff) collapse(2)"
It works for gfortran v 12.2.0
but it does not work for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109701
--- Comment #4 from Thomas Meltzer ---
Thanks adding map(max_diff) works for me but my guess is that this should not
be required and there is a potential bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109701
--- Comment #1 from Thomas Meltzer ---
Could be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99928 but I am
not sure. In my case the GPU offloading should be ignored.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109701
Bug ID: 109701
Summary: I have a MWE where an omp reduction breaks if I add
the option for GPU offloading (even if it isn't used).
Product: gcc
Version: 12.2.0
Status: U