https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110968
Bug ID: 110968 Summary: format out of bounds read on format("{:05L}",-1.f) Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc at pauldreik dot se Target Milestone: --- The following program: #include <cstdio> #include <format> int main() { float v = -1; std::puts(std::vformat("{:05L}", std::make_format_args(v)).c_str()); } generates an out of bounds read when compiled with gcc 13.2 (and current trunk, as of 2023-08-10). Link to reproducer: https://godbolt.org/z/PjeTsK89E