Description: Drop always_inline on three virtual destructors that delete polymorphic members (Patch from Claude) . Three destructors in gecode/search/cutoff.hpp (CutoffAppend, CutoffMerge, CutoffRepeat) are marked `forceinline`, which expands under GCC to `inline __attribute__((__always_inline__))`. Their bodies invoke `delete` on members of type `Cutoff*`, a class with a virtual destructor. The inlined call graph therefore folds the recursive destruction of every derived Cutoff subclass into each call site, and under g++-16 the cost model rejects the expansion with . error: inlining failed in call to 'always_inline' 'virtual Gecode::Search::CutoffAppend::~CutoffAppend() noexcept': --param max-inline-insns-single limit reached . With g++-15 the same source compiled because the inliner budget happened to admit the bodies; nothing semantically depends on inlining a virtual destructor that is always invoked through a vtable, so the `always_inline` annotation was never load-bearing. Replace `forceinline` with plain `inline` on the three destructor definitions. `inline` preserves ODR (the bodies sit in a header pulled into ~48 translation units via gecode/search.hh) and lets the compiler decide. The constructors keep `forceinline`; only the three destructors change. Author: Kari Pahula Forwarded: no Last-Update: 2026-05-17 Index: gecode-6.2.0/gecode/search/cutoff.hpp =================================================================== --- gecode-6.2.0.orig/gecode/search/cutoff.hpp +++ gecode-6.2.0/gecode/search/cutoff.hpp @@ -99,7 +99,7 @@ namespace Gecode { namespace Search { forceinline CutoffAppend::CutoffAppend(Cutoff* d1, unsigned long int n0, Cutoff* d2) : c1(d1), c2(d2), n(n0) {} - forceinline + inline CutoffAppend::~CutoffAppend(void) { delete c1; delete c2; } @@ -108,7 +108,7 @@ namespace Gecode { namespace Search { forceinline CutoffMerge::CutoffMerge(Cutoff* d1, Cutoff* d2) : c1(d1), c2(d2) {} - forceinline + inline CutoffMerge::~CutoffMerge(void) { delete c1; delete c2; } @@ -119,7 +119,7 @@ namespace Gecode { namespace Search { : c(c1), i(0), n(n0) { cutoff = (*c)(); } - forceinline + inline CutoffRepeat::~CutoffRepeat(void) { delete c; }