https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117579
--- Comment #1 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:3b0fca5835b92ca7b139ef9f06d16b65510568ef commit r15-5903-g3b0fca5835b92ca7b139ef9f06d16b65510568ef Author: Nina Ranns <dinka.ra...@googlemail.com> Date: Tue Dec 3 14:58:21 2024 +0000 c++/contracts: ICE with contract assert on non-empty statement [PR 117579] Contract assert is an attribute on an empty statement. Currently we assert that the statement is empty before emitting the assertion. This has been changed to a conditional check that the statement is empty before the assertion is emitted. PR c++/117579 gcc/cp/ChangeLog: * parser.cc (cp_parser_statement): Replace assertion with a conditional check that the statement containing a contract assert is empty. gcc/testsuite/ChangeLog: * g++.dg/contracts/pr117579.C: New test. Signed-off-by: Nina Ranns <dinka.ra...@gmail.com> Reviewed-by: Jason Merrill <ja...@redhat.com>