g++ hangs computer for about 5 minutes, then reports "internal error".
On program: #include <iostream> #include <string> using namespace std; int main() { cout << "\e[18t" << flush string s; return 0; } Compiled with: g++ -c gcc_bug.cpp He should report "expected ';'" error on line 9 (after flush, before string s), but instead computer becomes not responsive, and finally g++ is being killed by the OS. This bug is triggerd by invalid code, but forgeting about ';' at the end of the line is very common and cause in this particular situation very severe effect. When I don't use "using namespace std;", but explicitly write std::cout, std::flush and std::string, g++ works as he should. Occurs on: gcc version 3.3.5 20050117 (prerelease) (SUSE Linux) Also occurs on: g++ (GCC) 3.3.3 20040412 (Red Hat Linux 3.3.3-7) Doesn't occur on: g++ (GCC) 4.0.3 20060212 (prerelease) (Debian 4.0.2-9) Additional information: output from g++ triggered by g++ -v -save-temps gcc_bug.cpp can be found at: http://studenci.fuw.edu.pl/~jskow/www/gcc_bug.out preprocessed file can be found at: http://studenci.fuw.edu.pl/~jskow/www/gcc_bug.ii -- Summary: g++ crashes (internal error) on simple code. Product: gcc Version: 3.3.5 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kuba dot skowron at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32008