[Bug c++/32507] New: internal compiler error

2007-06-25 Thread magnetudinbuda at yahoo dot com
g++ -g source_c++_iostream_test01.cpp

--

source_c++_iostream_test01.cpp:80 internal compiler error: in dwarf2out_finish,
at dwarf2out.c:14292

source_c++_iostream_test01.cpp :

#include cassert
#include iostream
#include sstream
#include limits
using namespace std;

static
void
PerformTest01 () {
stringstream objStream;
objStream1234\n ;
int intValue ;
objStream  intValue ;
char charValue = objStream . get ();
  assert (1234 == intValue  '\n' == charValue);
}

static
void
PerformTest02 () {
class Manipulators {
public:
static istream  IgnoreSpace (istream  anInputStream) {
assert (ios_base :: goodbit == anInputStream .
exceptions ());
assert (anInputStream . good ());
char aChar;
while (anInputStream . good ()) {
aChar = anInputStream . peek ();
if (anInputStream . good ()) {
if (' ' == aChar) {
aChar = anInputStream . get ();
}
}
}   
}
static istream  IgnoreLine (istream  anInputStream) {
assert (ios_base :: goodbit == anInputStream .
exceptions ());
assert (anInputStream . good ());
anInputStream . ignore (numeric_limits  streamsize 
:: max (), '\n');
}
private:
Manipulators () {}
};
stringstream objStream;
assert (objStream . good ());
assert (ios_base :: goodbit == objStream . exceptions ());
int intValue;
char charValue;
objStreama b c   \n  \n 123;
assert (objStream . good ());
  objStream  Manipulators :: IgnoreLine ;
assert (objStream . good ());
charValue = objStream . get ();
assert (objStream . good ());
assert ('\n' == charValue);
objStream  Manipulators :: IgnoreSpace ;
assert (objStream . good ());
charValue = objStream . get ();
assert (objStream . good ());
assert ('\n' == charValue);
charValue = objStream . peek ();
assert (objStream . good ());
assert (' ' == charValue);
objStream  intValue;
assert (objStream . eof ());
assert (123 == intValue);
}

int main () {
int nReturnCode = 0;
try {
PerformTest02 ();   
} catch (...) {
cerr  Exception!  endl;
nReturnCode = 1;
}
return nReturnCode;
}


-- 
   Summary: internal compiler error
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: magnetudinbuda at yahoo dot com


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



[Bug c++/32507] internal compiler error

2007-06-25 Thread magnetudinbuda at yahoo dot com


--- Comment #1 from magnetudinbuda at yahoo dot com  2007-06-25 21:41 
---
Created an attachment (id=13788)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13788action=view)
the file that caused 'internal compiler error'


-- 


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