c++/9354: g++-3.4 segfault in template definition
rassahah@neofonie.de
rassahah@neofonie.de
Fri Jan 17 19:09:00 GMT 2003
>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:
More information about the Gcc-bugs
mailing list