aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-04-18 18:00:34 -0400
committerJonathan Wakely <redi@gcc.gnu.org>2025-04-25 11:47:47 +0100
commit8acea9ffa82ed84bbf15d75b9dd034b2bb82724e (patch)
treefe340a61f4b9b3f7eb594440fc21ba7ab42ca765 /libstdc++-v3/testsuite
parent901900bc37566c59b4eb62c1427f3150b800d8a0 (diff)
downloadgcc-8acea9ffa82ed84bbf15d75b9dd034b2bb82724e.zip
gcc-8acea9ffa82ed84bbf15d75b9dd034b2bb82724e.tar.gz
gcc-8acea9ffa82ed84bbf15d75b9dd034b2bb82724e.tar.bz2
c++: bad pending_template recursion
limit_bad_template_recursion currently avoids immediate instantiation of templates from uses in an already ill-formed instantiation, but we still can get unnecessary recursive instantiation in pending_templates if the instantiation was queued before the error. Initially this regressed several libstdc++ tests which seemed to rely on a static_assert in a function called from another that is separately ill-formed. For instance, in the 48101_neg.cc tests, we first got an error in find(), then later instantiate _S_key() (called from find) and got the static_assert error from there. r16-131-g876d1a22dfaf87 and r16-132-g901900bc37566c changed the library code (and tests) to make the expected static_assert errors happen earlier. gcc/cp/ChangeLog: * cp-tree.h (struct tinst_level): Add had_errors bit. * pt.cc (push_tinst_level_loc): Clear it. (pop_tinst_level): Set it. (reopen_tinst_level): Check it. (instantiate_pending_templates): Call limit_bad_template_recursion. gcc/testsuite/ChangeLog: * g++.dg/template/recurse5.C: New test.
Diffstat (limited to 'libstdc++-v3/testsuite')
0 files changed, 0 insertions, 0 deletions