https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98206
--- Comment #1 from Roland B <rbock at eudoxos dot de> --- Here is the actual error message: // ----- example.cpp:16:49: runtime error: reference binding to misaligned address 0x7ffdc34cab61 for type 'const struct X', which requires 8 byte alignment 0x7ffdc34cab61: note: pointer points here 00 00 00 02 00 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 af 20 40 00 00 00 00 00 20 17 40 00 00 ^ // ----- This is referring to return static_cast<const Derived&>(*this);