[Bug c++/126643] New: [contracts] ICE on implicit conversion inside template function precondition
kengusername at proton dot me via Gcc-bugs <[email protected]> Tue, 04 Aug 2026 20:05:49 +0000
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126643
Bug ID: 126643
Summary: [contracts] ICE on implicit conversion inside template
function precondition
Product: gcc
Version: 16.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kengusername at proton dot me
Target Milestone: ---
This program fails to compile on gcc 16.1 with assertions.
```
template<signed = 0> constexpr auto foo(signed x) pre(x) {}
static_assert((foo(123), 1));
```
https://godbolt.org/z/Yz138x6b8