[llvm-bugs] [Bug 34321] New: Custom OpenMP reduction in C++ template causes SEGFAULT at compile time
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 25 01:46:06 PDT 2017
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: unassignedclangbugs at nondot.org
Reporter: s6jaschu at uni-bonn.de
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170825/f989250d/attachment.html>
More information about the llvm-bugs
mailing list