https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102470
--- Comment #1 from Kun Ge <iDingDong at outlook dot com> --- I misplaced the wrong piece of codes. the code that actually triggered the error is: //--- #include <cstdlib> #include <memory> struct MemAttr { std::size_t size; std::size_t align; }; template <typename T> constexpr MemAttr memAttrOf = MemAttr { .size = sizeof(T), .align = alignof(T) }; template <MemAttr attr> using AlignedStorage = ::std::aligned_storage_t<attr.size, attr.align>; template <typename T> using AlignedStorageFor = AlignedStorage<memAttrOf<T>>; //---