Skip to content
Unverified Commit 499d41ce authored by Leandro Lupori's avatar Leandro Lupori Committed by GitHub
Browse files

[flang][OpenMP] Fix threadprivate common blocks (#68739)

Using a threadprivate common block within a nested scope resulted
in compilation errors.

This happened because common block names were being first resolved
to those in the parent scope. Because of this, in a nested scope,
an inner threadprivate directive would be applied to the outter
common block. This caused a 'common_block appears in more than one
data-sharing clause' error.

Also, when a copyin clause in a parallel region tried to use the
common block, getting the inner version of it, their objects would
be missing the threadprivate attribute, causing a 'Non-THREADPRIVATE
object in COPYIN clause' error.

Fixes https://github.com/llvm/llvm-project/issues/61200
parent de9b3c5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment