http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58063
Fanael <fanael4 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fanael4 at gmail dot com --- Comment #10 from Fanael <fanael4 at gmail dot com> --- My attempt at reducing: struct basic_ios { virtual ~basic_ios() {} bool operator!() const { return false; } }; struct ostream : virtual basic_ios { ostream() {} ~ostream() {} private: ostream(const ostream&); ostream& operator=(const ostream&); }; ostream& operator<<(ostream& os, const char* s) { __builtin_printf("%s", s); return os; } ostream cout; void f(bool x = !(cout << "hi!\n")) { __builtin_printf("%d\n", static_cast<int>(x)); } int main() { f(); } Seems like virtual inheritance is the culprit.