<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MSVC fails to compile SmallVector.cpp targeting arm32"
   href="https://bugs.llvm.org/show_bug.cgi?id=49917">49917</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MSVC fails to compile SmallVector.cpp targeting arm32
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jenatali@microsoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>