[llvm-bugs] [Bug 49917] New: MSVC fails to compile SmallVector.cpp targeting arm32

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 10 16:09:44 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49917

            Bug ID: 49917
           Summary: MSVC fails to compile SmallVector.cpp targeting arm32
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: jenatali at microsoft.com
                CC: llvm-bugs at lists.llvm.org

Attempting to compile LLVM 12.x for "ARM" architectures in VS2019 latest
(v16.9.2) will fail with the following errors:

llvm-project\llvm\include\llvm/ADT/SmallVector.h(528,1): error C2719: 'Elt':
formal parameter with requested alignment of 16 won't be aligned (compiling
source file llvm-project\llvm\lib\Support\SmallVector.cpp)
llvm-project\llvm\include\llvm/ADT/SmallVector.h(528,1): error C2719: 'Elt':
formal parameter with requested alignment of 32 won't be aligned (compiling
source file llvm-project\llvm\lib\Support\SmallVector.cpp)

This appears to be due to the static assertions in SmallVector.cpp causing
template instantiation of:
void growAndAssign(size_t NumElts, T Elt)

Since this is an explicitly-aligned element being passed on the stack, MSVC
will complain because apparently that's not supported on this architecture. The
code compiles fine for x86/Win32, x64/amd64, and arm64.

-- 
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/20210410/57573efe/attachment.html>


More information about the llvm-bugs mailing list