c++/8476: SIGSEGV on explicit call of dtor of static member in template
Detlef Vollmann
dv@vollmann.ch
Wed Nov 6 04:46:00 GMT 2002
>Number: 8476
>Category: c++
>Synopsis: SIGSEGV on explicit call of dtor of static member in template
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Nov 06 04:46:06 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Detlef Vollmann
>Release: 3.3 20021105 (experimental)
>Organization:
vollmann engineering gmbh
>Environment:
System: Linux dwarf 2.4.3-XFS #7 Mon Aug 6 18:43:20 CEST 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /pdsrc/gcc/cvs/gcc/configure --program-suffix=-test --prefix=/local/gcc-test --enable-shared --enable-threads=posix --enable-version-specific-runtime-libs --enable-languages=c,c++
>Description:
tst.cc: In static member function `static void T<Y>::f() [with Y = char]':
tst.cc:21: instantiated from here
tst.cc:3: internal compiler error: Segmentation fault
>How-To-Repeat:
just compile attached source
>Fix:
// tst.cc
struct X
{
~X() { }
};
template <class Y> struct T
{
public:
static void f()
{
x.~X();
}
static X x;
};
int
main()
{
T<char>::f();
return 0;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-prs
mailing list