Created attachment 55262 [details] 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.
Thanks for the bug report, confirmed with GCC 12.1,12.3, 13.1 and the 13 release branch, so not a regression. On trunk the testcase compiles quickly ever since r14-409-g4b8d0d4d7fd245 for PR109678. It seems backporting that commit to the 13 branch would fix the slowness there too.
Thank you for feedback!
Fixed for GCC 13.3 after the backport r13-7713-gd3088f0ed25fe7.