http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50276
Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-03 22:46:33 UTC --- If I consider Comment #1, and maybe I tweak it a bit like this: bool testfun(void*) { return true; } template<int i> bool test() { if (bool value = /* true */ testfun( []() { return 0; } )) return value; __builtin_abort(); return false; } int main() { test<0>(); } I see what looks like a full fledged miscompilation: testfun always returns true, thus test should simply return true! Jason, what do you think?