https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116459
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to xiaohuba2021 from comment #0) > struct Matrix { > long long mat[2][2]; > Matrix() { memset(mat, 0, sizeof(mat)); } N.B. there's no miscompilation if you change this to the more idiomatic and sensible: Matrix() : mat() { }