Jakub Jelinek 98acbb3111 openmp: Fix up taskloop reduction ICE if taskloop has no iterations [PR100471]
When a taskloop doesn't have any iterations, GOMP_taskloop* takes an early
return, doesn't create any tasks and more importantly, doesn't create
a taskgroup and doesn't register task reductions.  But, the code emitted
in the callers assumes task reductions have been registered and performs
the reduction handling and task reduction unregistration.  The pointer
to the task reduction private variables is reused, on input it is the alignment
and only on output it is the pointer, so in the case taskloop with no iterations
the caller attempts to dereference the alignment value as if it was a pointer
and crashes.  We could in the early returns register the task reductions
only to have them looped over and unregistered in the caller, but I think
it is better to tell the caller there is nothing to task reduce and bypass
all that.

2021-05-11  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/100471
	* omp-low.c (lower_omp_task_reductions): For OMP_TASKLOOP, if data
	is 0, bypass the reduction loop including
	GOMP_taskgroup_reduction_unregister call.

	* taskloop.c (GOMP_taskloop): If GOMP_TASK_FLAG_REDUCTION and not
	GOMP_TASK_FLAG_NOGROUP, when doing early return clear the task
	reduction pointer.
	* testsuite/libgomp.c/task-reduction-4.c: New test.
2021-05-11 09:07:47 +02:00
2021-05-11 00:16:36 +00:00
2021-05-04 00:16:53 +00:00
2021-05-11 00:16:36 +00:00
2021-05-08 00:16:27 +00:00
2021-02-03 00:16:23 +00:00
2021-05-07 00:16:33 +00:00
2021-04-17 00:16:25 +00:00
2021-01-16 00:16:29 +00:00
2021-05-04 00:16:53 +00:00
2021-05-06 00:16:37 +00:00
2021-04-07 00:16:39 +00:00
2021-05-08 00:16:27 +00:00
2021-05-04 00:16:53 +00:00
2021-01-06 00:16:55 +00:00
2021-05-11 00:16:36 +00:00
2021-05-06 00:16:37 +00:00
2021-04-12 15:23:16 -07:00
2021-01-06 00:16:55 +00:00
2021-05-07 00:16:33 +00:00
2021-01-16 00:16:29 +00:00
2021-01-06 00:16:55 +00:00
2021-01-06 00:16:55 +00:00
2021-05-11 00:16:36 +00:00
2021-01-06 00:16:55 +00:00
2021-04-18 00:16:21 +00:00
2021-01-06 00:16:55 +00:00
2021-05-11 00:16:36 +00:00
2021-01-06 00:16:55 +00:00
2021-05-11 00:16:36 +00:00
2021-04-21 00:16:23 +00:00
2021-01-06 00:16:55 +00:00
2021-05-05 00:16:54 +00:00
2021-01-05 16:04:14 -07:00
2021-03-12 19:48:13 -05:00
2021-03-12 19:48:13 -05:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 4.2 GiB
Languages
C++ 30.7%
C 30.2%
Ada 14.4%
D 6.1%
Go 5.7%
Other 12.4%