https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77388
--- Comment #5 from Andre Vieira <andre.simoesdiasvieira at arm dot com> --- I see, thank you! Oh and leaving out the const yields an error: t.cpp:28:16: error: cannot bind packed field '((B*)this)->B::s->test_struct::c' to 'short int&' return A (s->c);