https://bugs.llvm.org/show_bug.cgi?id=50929
Bug ID: 50929
Summary: Ignored initializer clause in user-defined reduction
Product: OpenMP
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Clang Compiler Support
Assignee: unassignedclangb...@nondot.org
Reporter: emil.loev...@kuleuven.be
CC: llvm-bugs@lists.llvm.org
Created attachment 24988
--> https://bugs.llvm.org/attachment.cgi?id=24988&action=edit
Code reproducing the error
The code in the attached cpp file generates a compilation error under clang++
12 on Mac OS (both x86 and ARM). I, however, believe the code to be correct. It
also compiles and runs without issues under g++.
It seems that the initalizer clause is not being read by the preprocessor and
instead the private copies of the struct are being initialized with the
(non-existent) empty-brackets constructor.
Compilation command: clang++ -Xpreprocessor -fopenmp reduction.cpp
Tested compilers:
emil@serenity Downloads % clang++ -v
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
emil@serenity Downloads % /usr/local/opt/llvm/bin/clang++ -v
clang version 12.0.0
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs