https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125590

--- Comment #1 from Ivan Lazaric <ivan.lazaric.gcc at gmail dot com> ---
A bit more simplified:
```cpp
struct PC {
  int data = 1;
  constexpr int get() const { return data; }
};

consteval {
    PC pc;
    pc.get(); // commenting this out makes it work
    contract_assert(pc.get());
}
```

Godbolt: https://godbolt.org/z/9PaYqjv49
  • [Bug c++/125590] New: contr... ivan.lazaric.gcc at gmail dot com via Gcc-bugs
    • [Bug c++/125590] contr... ivan.lazaric.gcc at gmail dot com via Gcc-bugs

Reply via email to