[Bug c++/32008] New: g++ crashes (internal error) on simple code.

2007-05-20 Thread kuba dot skowron at gmail dot com
g++ hangs computer for about 5 minutes, then reports "internal error".

On program:

#include 
#include 

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



[Bug c++/32008] g++ crashes (internal error) on simple code.

2007-05-20 Thread kuba dot skowron at gmail dot com


--- Comment #1 from kuba dot skowron at gmail dot com  2007-05-20 12:05 
---
Created an attachment (id=13588)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13588&action=view)
preprocessed file triggering the bug

generated by command line:
g++ -v -save-temps gcc_bug.cpp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32008



[Bug c++/32008] g++ crashes (internal error) on simple code.

2007-05-20 Thread kuba dot skowron at gmail dot com


--- Comment #2 from kuba dot skowron at gmail dot com  2007-05-20 12:07 
---
Created an attachment (id=13589)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13589&action=view)
g++ output (with version and build options)

generated by:
g++ -v -save-temps gcc_bug.cpp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32008