https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106005
Ron <caplanr at predsci dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |caplanr at predsci dot com
--- Comment #9 from Ron <caplanr at predsci dot com> ---
Hi,
I would like to suggest that it is not necessary to
fully "implement" REDUCE() on DO CONCURRENT loops right now,
but that it should at least be "recognized" by the compiler so it can compile
and run with GFORTRAN.
Right now, NVFORTRAN, IFX, AMDFLANG, FLANG, NAG, FTN, etc. all
support/recognize reduce.
GCC is now an outlier.
On CPU compilation, there is no need to "do anything" with the reduce clause,
other than ignore it (the DC loop is just run in serial anyways).
Only when multi-threading (with something like -ftree-parallelize-loops=) is a
real "implementation" needed (and right now such a reduction loop is simply run
in serial in that case).
For serial codes, REDUCE needs to be ignored and the code compiled (in fact
some codes have a build system that seds out REDUCE when compiling with GCC).
Is there any way a simple "recognize but ignore" could be added to GFORTRAN
(and ideally back-ported all the way to GCC 9) so that codes that use it can
still compile and run with GFORTRAN?
Later, allowing -ftree-parallelize-loops to thread it with true reductions (or
some other direct DC parallelization feature) can be added if wanted.
Even just adding a flag "-fignore-dc-reduce" would be useful!
- Ron