This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5548: g++ 3.1 ICE on invalid input



>Number:         5548
>Category:       c++
>Synopsis:       g++ 3.1 ICE on invalid input
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 30 16:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     scott snyder
>Release:        3.1 20020129 (experimental)
>Organization:
>Environment:
System: Linux karma 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long
>Description:

g++ dies with a segv compiling the source below (which is invalid C++):

$ g++ -c    x.cc
x.cc:3: parse error before `x'
x.cc:3: missing ';' before right brace
x.cc:4: ISO C++ forbids defining types within return type
x.cc:4: semicolon missing after declaration of `struct Item'
x.cc: In function `int Item()':
x.cc:4: only constructors take base initializers
x.cc:4: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


>How-To-Repeat:

Compile this source:

-------------------------------------------------------------------
struct Item {
  int what;
  Item(string x)  {}
  Item() : what(0) {}
};

-------------------------------------------------------------------

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]