https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116607
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-09-05 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Keywords| |c++-contracts, | |ice-on-valid-code --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. reduced valid testcase: ``` struct a { __attribute__((no_sanitize(""))) int f(int) [[pre:true]]; }; int a::f(int) {} ``` Looks like there is a missing check for cxx_contract_attribute_p in the loop. has_active_contract_condition either should use cxx_contract_attribute_p or more likely just use CONTRACT_CHAIN .