https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80726
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2017-06-26 Target Milestone|--- |7.2 Summary|Destructor not inlined |[7/8 Regression] Destructor |anymore (regression) |not inlined anymore | |(regression) Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Considering inline candidate Foo::~Foo(). not inlinable: void f()/4 -> Foo::~Foo()/3, callee refers to comdat-local symbols Iterations: 0 If I use: bool shouldThrow = false; template <int> inline void ff() { if (shouldThrow) throw "hmm"; } void f() { ff<1>(); } ---- CUT ---- It works. I don't see any difference between the two really.