https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87633
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> --- Reduced C++ code seems to be: class a { public: double b() const; }; class c { public: int m_fn2() const; }; double a::b() const { return 0 == 0 ? reinterpret_cast<const c *>(this)->m_fn2() : 0; } bool d; void e() { a f; double g = f.b(); d = __builtin_isnan(g); }