https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110127
Bug ID: 110127 Summary: -fimplicit-constexpr leads to extremely slow and memory intensive compilation Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fiesh at zefix dot tv Target Milestone: --- Created attachment 55262 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55262&action=edit Testcase for slow -fimplicit-constexpr The attached test case behaves as follows: % time g++ -std=c++20 -o /dev/null -c u.ii g++ -std=c++20 -o /dev/null -c u.ii 0.07s user 0.01s system 99% cpu 0.078 total % time g++ -std=c++20 -o /dev/null -fimplicit-constexpr -c u.ii g++ -std=c++20 -o /dev/null -fimplicit-constexpr -c u.ii 1637.98s user 41.63s system 99% cpu 27:59.91 total The second run also consumes a large amount of memory in the region of 100GB. I'm a bit stuck on how to reduce this further.