https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407
--- Comment #1 from Dave Poston <Dave.Poston at gs dot com> --- In fact, fill() isn't even needed. Smaller repro: https://godbolt.org/z/ubXl7Y ----------------------- #include<iostream> struct MyStruct { MyStruct() { std::cout << "Constructed" << std::endl; } ~MyStruct() { std::cout << "Destructed" << std::endl; } int a; }; MyStruct problem() { int cnt = 100; start: MyStruct a; if( cnt-- ) goto start; return a; } int main( int argc, char** argv ) { problem(); return 0; }