https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123875

            Bug ID: 123875
           Summary: [13/14/15/16 Regression] atomic<X>(X) cosntructor is
                    usable at compile time in C++14 and later
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkaminsk at gcc dot gnu.org
  Target Milestone: ---

The following example does not compile in C++14 (or later mode) since GCC-13:
```
struct X { char c; int x; };
constexpr std::atomic<X> a(X{1, 2});
```
It works correctly in GCC-12.

This is another regression introduced by clearing the padding bits in:
https://github.com/gcc-mirror/gcc/commit/157236dbd621644b3cec50b6cf38811959f3e78c
The __builtin_clear_padding is not usable as constant expression.

Reply via email to