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

            Bug ID: 45010
           Summary: Assertion failed: !(isAtomic() && getAlignment() == 0)
                    && "Alignment required for atomic load"
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: gchate...@google.com
          Reporter: alexandre.ga...@ubisoft.com
                CC: h...@chromium.org, htmldevelo...@gmail.com,
                    llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk
            Blocks: 44555

When compiling Clang with assertions enabled, I'm seeing the assert I've
mentioned here: https://reviews.llvm.org/D71547#1824272

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;
}


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=44555
[Bug 44555] [meta] 10.0.0 Release Blockers
-- 
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

Reply via email to