https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113968
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:c829042849da4e82668db8c845ef0847264c8687 commit r15-1942-gc829042849da4e82668db8c845ef0847264c8687 Author: Nina Ranns <dinka.ra...@gmail.com> Date: Thu Jul 4 17:08:58 2024 +0100 c++, contracts: Fix ICE in create_tmp_var [PR113968] During contract parsing, in grok_contract(), we proceed even if the condition contains errors. This results in contracts with embedded errors which eventually confuse gimplify. Checks for errors have been added in grok_contract() to exit early if an error is encountered. PR c++/113968 gcc/cp/ChangeLog: * contracts.cc (grok_contract): Check for error_mark_node early exit. gcc/testsuite/ChangeLog: * g++.dg/contracts/pr113968.C: New test. Signed-off-by: Nina Ranns <dinka.ra...@gmail.com>