https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124648
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
I think that there are two issues and it would probably help to separate them
1. that contract conditions should not trigger implicit captures
2. the second ICE (when using an entity otherwise captured).
I guess that the warning is expected - you are forcing a capture which is only
used in a contract condition - which is a somewhat surprising use-case (to have
a condition on something that's unused).
something like :
```cpp
int main() {
int x = 3;
auto lambda = [&] pre(x > 0) { (void)x; };
lambda();
}
reproduces the issue without the warning.