[Bug c++/124263] [contracts] handle_contract_violation from libstdc++exp not resolved on MinGW/PE-COFF
kachalenko.denis at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 24 08:40:29 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124263
--- Comment #3 from Denys Kachalenko <kachalenko.denis at gmail dot com> ---
(In reply to Peter Damianov from comment #2)
> https://inbox.sourceware.org/binutils/cover.1782245474.git.peter0x44@disroot.
> org/T/#ma84cbe4d190e0b8cced29b6c4839589495a7cb44
> Try these patches. I tested they fixed the issue on my end.
Tested the v3 series on GCC 17 trunk (20260504, x86_64-w64-mingw32) + binutils
master @ 9a54c021, patches 1–3. Single-TU reproducer (to isolate from
PR124264):
int Get(int I) noexcept pre(I >= 0) { return I; }
int main() { return Get(1); }
Before: undefined reference to handle_contract_violation.
After: links and runs; Get(-1) fires the real default handler. Confirmed fixed.
More information about the Gcc-bugs
mailing list