https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96044
--- Comment #10 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- (In reply to Richard Biener from comment #8) > The issue with timeouts (as in wall-clock) is that it makes builds > dependent on CPU speed which is something we generally avoid. For ISL > computations where we employ this kind of thing there's tracking of > "number of ops" that are performed by ISL itself plus the ability for > the client to set an upper bound after which operations return with > an appropriate error. gmp/mpfr/mpc could for example track the number > of 64bit multiplies and support limiting there - but I expect this would > be a lot of work. Eventually we could make GCC use mini-gmp (would > a host libmpfr then use the built-in mini-gmp?) and patch in this kind > of accounting there... The result would depend on the algorithm, i.e. on the MPFR version. And for this reason, I agree with: > But IMHO simply classifying a value-range where we do and where we do not > constant fold certain functions would be reasonable as well - unless C++ > at some point magically requires to constexpr evaluate jn().