public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9010: Err in dump class hierarchy file gen for template class destructor
@ 2002-12-19  9:48 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2002-12-19  9:48 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, lei, michaelw, nobody

Synopsis: Err in dump class hierarchy file gen for template class destructor

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Dec 19 09:48:15 2002
State-Changed-Why:
    This is already fixed for 3.3 and 3.4

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9010


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c++/9010: Err in dump class hierarchy file gen for template class destructor
@ 2002-12-19  9:36 lei
  0 siblings, 0 replies; 2+ messages in thread
From: lei @ 2002-12-19  9:36 UTC (permalink / raw)
  To: gcc-gnats; +Cc: michaelw


>Number:         9010
>Category:       c++
>Synopsis:       Err in dump class hierarchy file gen for template class destructor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 19 09:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Lei Huang
>Release:        3.2
>Organization:
>Environment:
Linux Version 2.4.19 SuSE SLES 8 (ppc) - Kernel 2.4.19-ul1-ppc64-SMP (36).
GNU assembler version 2.12.90.0.15 (powerpc-suse-linux) using BFD version 2.12.90.0.15 20020717 (SuSE)
>Description:
Error in dump class hiearchy file generated for template class's
virutal destructor.  This only occurs for template classes.

Options given when GCC was configured/built:
Configured with: /build/gcc/gcc-3.2/configure -prefix=/.../torolab.ibm.com/fs/pr
oj/p0/vabld/run/gcc/linux_ppc/3.2.0 -enable-threads=posix -enable-languages=c,c+
+ -disable-shared
Thread model: posix

Sourc code for a.cpp:
------------------------------------------------
template <class T> struct A {
  virtual ~A () {}
};

A<int> a;
------------------------------------------------

Actual class hierarchy file (a.cpp.class):
------------------------------------------------
Vtable for A<int>
A<int>::_ZTV1AIiE: 4 entries
0     0
4     &_ZTI1AIiE
8     A<T>::A() [with T = int]
12    A<T>::A() [with T = int]

Class A<int>
   size=4 align=4
A<int> (0x40092600) 0 nearly-empty
    vptr=((&A<int>::_ZTV1AIiE) + 8)
------------------------------------------------

Expected Behaviour:
- expected the "Vtable for A<int>" entries contains class A's destructor,
  not constructor

a.ii generated with -save-temps option
------------------------------------------------
# 1 "a.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "a.cpp"
template <class T> struct A {
  virtual ~A () {}
};

A<int> a;
------------------------------------------------
>How-To-Repeat:
1. g++ -fdump-class-hierarchy -c a.cpp
2. cat a.cpp.class
>Fix:

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-12-19 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-19  9:48 c++/9010: Err in dump class hierarchy file gen for template class destructor bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-12-19  9:36 lei

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).