[Bug c++/96934] Copy initialization of struct involving aggregate array initialization miscompiles in GCC 9

2021-08-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96934 --- Comment #2 from Andrew Pinski --- Testcase: #include struct Code { constexpr Code(int) noexcept : _buffer{'1', '2', '\0'} {} char _buffer[3]; }; const Code T1 = {1}; const Code T2 = Code{1}; const Code T3 = T1; const Code T4 = T2;

[Bug c++/96934] Copy initialization of struct involving aggregate array initialization miscompiles in GCC 9

2020-09-04 Thread wielkiegie at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96934 --- Comment #1 from Gustaw Smolarczyk --- It seems that part of this issue was already reported in another bug report (though the report is about flexible array members, the comment does not reference them): https://gcc.gnu.org/bugzilla/show_bug