In the following program, in a constant expression, a temporary object of A is created with all fields initialized, and then function f creates another object of A at the same address, skipping (re)initialization of the field x, which is read afterwards: ``` #include <memory> struct A { int x; constexpr A() {} constexpr A(int xx) : x(xx) {} }; constexpr int f(A && a) { a.~A(); std::construct_at<A>(&a); return a.x; } static_assert( f(A{5}) == 5 ); ``` This code is accepted by GCC, but other compilers complain about uninitialized object read. Demo: https://gcc.godbolt.org/z/sPGjj75Md Related discussion: https://stackoverflow.com/q/70820127/7325599
Confirmed.