[llvm-bugs] [Bug 50929] New: Ignored initializer clause in user-defined reduction

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 29 02:46:17 PDT 2021


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: unassignedclangbugs at nondot.org
          Reporter: emil.loevbak at kuleuven.be
                CC: llvm-bugs at 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 at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210629/f07218c1/attachment.html>


More information about the llvm-bugs mailing list