public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/9354: g++-3.4 segfault in template definition
@ 2003-01-17 19:06 rassahah
  0 siblings, 0 replies; only message in thread
From: rassahah @ 2003-01-17 19:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9354
>Category:       c++
>Synopsis:       g++-3.4 segfault in template definition
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 17 11:06:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rasmus Hahn
>Release:        gcc version 3.4 20030115
>Organization:
>Environment:
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with:  : (reconfigured)  : (reconfigured) 
Thread model: posix
gcc version 3.4 20030115 (experimental)
>Description:
g++-3.4 segfaults on code below:
$ g++ x.cc
x.cc: In member function `void ObjectSlot0_<Obj>::create()':
x.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report,...

Interesting: if i change the 'new T ()' to 'new char[3]', i get a segfault, too, but with a different
message:
$ g++ x.cc
x.cc: In member function `void ObjectSlot0_<Obj>::create()':
x.cc:6: internal compiler error: tree check: expected class 't', have 'x' (
   tree_list) in cp_parser_dependent_type_p, at cp/parser.c:1859
Please submit a full bug report,...

the latter is a parser error, the former makes not clear where it comes from. Should this
be two different bug-reports?
This bug is new with gcc-3.4 (does not happen with 3.3 & older)

>How-To-Repeat:
x.cc:
struct T;
T* manage(T* t);
template <class Obj> struct ObjectSlot0_ {
  void create() {
    void* tmp = manage(new T());
  }
};
>Fix:

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-17 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-17 19:06 c++/9354: g++-3.4 segfault in template definition rassahah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).