<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 - Assertion failed: !(isAtomic() && getAlignment() == 0) && "Alignment required for atomic load""
   href="https://bugs.llvm.org/show_bug.cgi?id=45010">45010</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: !(isAtomic() && getAlignment() == 0) && "Alignment required for atomic load"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </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>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gchatelet@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alexandre.ganea@ubisoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>hans@chromium.org, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>44555
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When compiling Clang with assertions enabled, I'm seeing the assert I've
mentioned here: <a href="https://reviews.llvm.org/D71547#1824272">https://reviews.llvm.org/D71547#1824272</a>

Repro:

// a.cpp
// Build with: clang-cl a.cpp /c /O1
#include <vector>
struct SP {
  void WeakAddRef();
  void WeakRelease();
};
template <typename T> struct PtrBase {
  T *volatile P;
  ~PtrBase() {
    if (R)
      R->WeakRelease();
  }
  PtrBase(const PtrBase &O) : R(O.R) {
    if (R)
      R->WeakAddRef();
  }
  SP *R;
  bool IsValid() const { return P != nullptr; }
};
struct alignas(16) VectorSIMD4f {
  float V;
};
unsigned __int64 countAF() {
  class AF {
    VectorSIMD4f B;
  };
  struct PD {
    PtrBase<AF> P;
  };
  std::vector<PD> AFs;
  unsigned __int64 C = 0;
  for (auto A : AFs) {
    if (A.P.IsValid())
      ++C;
  }
  return C;
}</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_CONFIRMED "
   title="CONFIRMED - [meta] 10.0.0 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=44555">Bug 44555</a>] [meta] 10.0.0 Release Blockers
              </li>
          </ul>
        </div>
        <br>

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

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