https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116459
--- Comment #2 from xiaohuba2021 <xiaohuba2021 at 163 dot com> --- > Uncomment line 20 (mask = 1) or explicitly add operator= for struct Matrix > solves this problem. sorry, the code above produces the correct answer, since line 20 is uncommented. Comment it and it will output 1.