https://bugs.llvm.org/show_bug.cgi?id=34321
Bug ID: 34321
Summary: Custom OpenMP reduction in C++ template causes
SEGFAULT at compile time
Product: clang
Version: 4.0
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: s6jas...@uni-bonn.de
CC: llvm-bugs@lists.llvm.org
Created attachment 19040
--> https://bugs.llvm.org/attachment.cgi?id=19040&action=edit
Crash report
The following reduced test case does crash clang:
struct Summary {
void merge(const Summary& other) {}
};
template <typename K>
void work() {
Summary global_summary;
#pragma omp declare reduction(+ : Summary : omp_out.merge(omp_in))
#pragma omp parallel for reduction(+ : global_summary)
for (int k = 1; k <= 100; ++k) {
}
}
struct A {};
int main(int argc, char** argv) {
work<A>();
return 0;
}
I did compile it with "LDFLAGS="-L/usr/local/opt/llvm/lib
-Wl,-rpath,/usr/local/opt/llvm/lib" /usr/local/opt/llvm/bin/clang++ -std=c++11
-fopenmp=libomp main.cpp" using the homebrew version of llvm on macOS.
--
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