https://bugs.llvm.org/show_bug.cgi?id=38902
Bug ID: 38902
Summary: incorrect diagnose of user-defined reduction declared
in namespace
Product: OpenMP
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangb...@nondot.org
Reporter: k...@ca.ibm.com
CC: a.bat...@hotmail.com, llvm-bugs@lists.llvm.org
template <typename T>
void bar(T &x, T &y) { x.a += y.a; }
namespace N1
{
struct A { int a; A() : a(0) {} };
#pragma omp declare reduction(+: A : bar(omp_out, omp_in))
};
int main ()
{
N1::A a;
// A a;
#pragma omp parallel reduction(+: a)
{
}
}
$ clang++ -fopenmp d2a.cpp
d2a.cpp:15:34: error: invalid operands to binary expression ('N1::A' and
'N1::A')
#pragma omp parallel reduction(+: a)
^ ~
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs