[Bug libgomp/124737] New: Undeferred task with detach clause should not wait for the allow-completion event to be fulfilled
protze at itc dot rwth-aachen.de
gcc-bugzilla@gcc.gnu.org
Tue Mar 31 16:09:09 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124737
Bug ID: 124737
Summary: Undeferred task with detach clause should not wait for
the allow-completion event to be fulfilled
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgomp
Assignee: unassigned at gcc dot gnu.org
Reporter: protze at itc dot rwth-aachen.de
CC: jakub at gcc dot gnu.org
Target Milestone: ---
Created attachment 64107
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64107&action=edit
OpenMP program that deadlocks when executed with libgomp
The attached test comes from the libomp OMPT tests
(https://github.com/llvm/llvm-project/blob/main/openmp/runtime/test/ompt/tasks/task_late_fulfill.c).
The execution is blocked in GOMP_task for `gomp_sem_wait (&completion_sem);`.
>From the OpenMP spec:
> undeferred task: A task for which execution is not deferred with respect to
> its generating task region. That is, its generating task region is suspended
> until execution of the structured block associated with the undeferred task is
> completed.
The generating task is only suspended for executing the structured block of the
task, but not until the allow-completion event is fulfilled.
As a side-effect, out-dependences for undeferred tasks actually need to be
handled and cannot be ignored.
More information about the Gcc-bugs
mailing list