https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94294
--- Comment #1 from Eyal Rozenberg <eyalroz at technion dot ac.il> --- Note: The bugs also manifest with this simpler program: #include <string> int bar() { std::string second { "Hey... no small-string optimization for me please!" }; return 123; } See: https://godbolt.org/z/LjmNYi