https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127506
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:5b0a952ca720ba661baa20cd72becfeb9532633f commit r17-4596-g5b0a952ca720ba661baa20cd72becfeb9532633f Author: Jakub Jelinek <[email protected]> Date: Wed Sep 23 09:31:07 2026 +0200 c++: Fix __builtin_is_within_lifetime error recovery [PR127506] As the following testcase shows, error_mark_node can appear anywhere in the ctors, and with the asserts we ICE on those during error recovery. The following patch just returns error_mark_node in those cases. 2026-09-23 Jakub Jelinek <[email protected]> PR c++/127506 * constexpr.cc (is_within_lifetime): When val is error_mark_node, return it. * g++.dg/cpp26/within-lifetime13.C: New test. Reviewed-by: Jason Merrill <[email protected]>
