https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90570
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- Started with r260969 where Jason emit initializer list initialization as automatic variable instead of a const int variable. Difference: BEFORE: stru::stru (struct stru * const this) { struct initializer_list D.17010; const int D.16442[2]; struct allocator_type D.16443; _1 = &this->v; D.16442[0] = 1; D.16442[1] = 2; D.17010._M_array = &D.16442; D.17010._M_len = 2; .ASAN_MARK (UNPOISON, &D.16443, 1); std::allocator<int>::allocator (&D.16443); try { try { std::vector<int>::vector (_1, D.17010, &D.16443); } finally { std::allocator<int>::~allocator (&D.16443); } } finally { .ASAN_MARK (POISON, &D.16443, 1); } try { this->i = 5; } catch { _2 = &this->v; std::vector<int>::~vector (_2); } } AFTER: stru::stru (struct stru * const this) { struct initializer_list D.17010; static const int C.0[2] = {1, 2}; struct allocator_type D.16443; _1 = &this->v; .ASAN_MARK (UNPOISON, &C.0, 8); try { D.17010._M_array = &C.0; D.17010._M_len = 2; .ASAN_MARK (UNPOISON, &D.16443, 1); std::allocator<int>::allocator (&D.16443); try { try { std::vector<int>::vector (_1, D.17010, &D.16443); } finally { std::allocator<int>::~allocator (&D.16443); } } finally { .ASAN_MARK (POISON, &D.16443, 1); } } finally { .ASAN_MARK (POISON, &C.0, 8); } try { this->i = 5; } catch { _2 = &this->v; std::vector<int>::~vector (_2); } } I believe we're doing good and the code is really invalid. Jason?