// { dg-do compile } // { dg-additional-options "-Wall" } #include // { dg-bogus "writing 1 byte into a region of size 0" "" { target *-*-* } 0 } void bar(std::vector); void foo() { std::vector v{1, 2}; v.insert(v.end(), 2, 0); v.push_back(1); bar(v); }