https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124362
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> => Seems as if NEWLIB gets miscompiled.
In particular, it seems to flip between wording and failing depending
whether the commit is applied or not and then doing:
cd $build/amdgcn-amdhsa/newlib/
rm libc/stdio/*.o ../gfx90a/newlib/libc/stdio/*.o
make
make install
I find this very surprising as the offload code is just:
#pragma omp target
#pragma omp teams num_teams(tms) thread_limit(ths)
#pragma omp distribute parallel for dist_schedule(static) schedule(static)
for (int i = 0; i < n; ++i)
a[i] += b[i] + c[i];
which does not seem to involve anything from stdio – even though there is
some complexity behind the 'omp teams distribute parallel' in libgomp.