Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'symbol' : symbol cannot be referenced before it is used in 'threadprivate' directive
A symbol was referenced and then used in a threadprivate clause, which is not allowed.
The following sample generates C3055:
// C3055.cpp
// compile with: /openmp
int x, y;
int z = x;
#pragma omp threadprivate(x, y) // C3055
void test() {
#pragma omp parallel copyin(x, y)
{
x = y;
}
}
Possible resolution:
// C3055b.cpp
// compile with: /openmp /LD
int x, y, z;
#pragma omp threadprivate(x, y)
void test() {
#pragma omp parallel copyin(x, y)
{
x = y;
}
}