Adds a testcase for consteval-only types.
A new test case was added to ensure that consteval-only type computations in GCC are not quadratic in complexity.
A new test case, g++.dg/reflect/pr125179.C, was added to the GCC testsuite to verify that computations involving consteval-only types do not exhibit quadratic complexity. This test creates a loop with 50000 types which could cause a timeout with an earlier quadratic implementation.
In Details
This commit adds a testcase for the consteval feature in C++, specifically addressing a potential performance issue where computations involving consteval-only types could exhibit quadratic complexity. The test case g++.dg/reflect/pr125179.C is designed to expose this issue and ensure that the compiler handles such computations efficiently.
For Context
Consteval functions in C++ are functions that must be evaluated at compile time. The result of a consteval function can be used in contexts where a constant expression is required, such as array sizes or template arguments. This test case makes sure that the compiler handles certain consteval computations efficiently, preventing excessive compile times.