[Bug c++/59813] tail-call elimintation didn't fired with left-shift of char to cout
virkony at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jan 14 21:59:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59813
--- Comment #1 from Nikolay Orliuk <virkony at gmail dot com> ---
In 4.7.3 that code works, but changing it to
void foo()
{
cout << "x" << endl; // ok
cout << 'x' << endl; // kills tail-call elimination in gcc 4.8.2
struct {} bar; // kills tail-call elimination in 4.7.3
foo();
}
Removing either "bar" or 'x' results in normal infinite loop.
In 4.5.4 this works fine as is.
More information about the Gcc-bugs
mailing list