[Bug c++/105838] g++ 12.1.0 runs out of memory or time when building const std::vector of std::strings

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 14 11:56:57 GMT 2022


--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 53133
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53133&action=edit
unincluded, and reduced

This "reduced" testcase peaks at 3.8GB memory.

> /usr/bin/time /space/rguenther/install/gcc-12.1/bin/g++ -S -O /tmp/t.C
8.68user 1.13system 0:10.03elapsed 97%CPU (0avgtext+0avgdata
17328inputs+2104outputs (28major+961476minor)pagefaults 0swaps

simply doubling the initializer grows it to 14.8GB

> /usr/bin/time /space/rguenther/install/gcc-12.1/bin/g++ -S -O /tmp/t.C
43.02user 4.49system 0:47.51elapsed 99%CPU (0avgtext+0avgdata
0inputs+4088outputs (0major+3727738minor)pagefaults 0swaps

More information about the Gcc-bugs mailing list