From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3263 invoked by alias); 14 May 2003 14:46:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 3205 invoked by uid 71); 14 May 2003 14:46:00 -0000 Resent-Date: 14 May 2003 14:46:00 -0000 Resent-Message-ID: <20030514144600.3203.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, dens@stl.sarov.ru Received: (qmail 17527 invoked by uid 48); 14 May 2003 14:39:48 -0000 Message-Id: <20030514143948.17526.qmail@sources.redhat.com> Date: Wed, 14 May 2003 14:46:00 -0000 From: dens@stl.sarov.ru Reply-To: dens@stl.sarov.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10782: undefined reference to `virtual thunk ... X-SW-Source: 2003-05/txt/msg01647.txt.bz2 List-Id: >Number: 10782 >Category: c++ >Synopsis: undefined reference to `virtual thunk ... >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed May 14 14:46:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: dens@stl.sarov.ru >Release: unknown-1.0 >Organization: >Environment: cat /proc/version Linux version 2.4.18-14smp (bhcompile@stripples.devel.redhat.com) (gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)) #1 SMP Wed Sep 4 12:34:47 EDT 2002 cat /etc/issue Red Hat Linux release 8.0 (Psyche) Kernel \r on an \m rpm -qa | grep gcc gcc-gnat-3.2-7 gcc-objc-3.2-7 gcc-3.2-7 libgcc-3.2-7 gcc-g77-3.2-7 gcc-java-3.2-7 gcc-c++-3.2-7 >Description: G++ doesn't generate virtual thunk for c21 destructor from attached sample: nm gtest.o | grep c21D 000006e4 T _ZN3c183c193c21D0Ev 0000066a T _ZN3c183c193c21D1Ev 000005ec T _ZN3c183c193c21D2Ev U _ZTv0_n16_N3c183c193c21D0Ev U _ZTv0_n16_N3c183c193c21D1Ev [dens@sr007lnx work]$ g++ gtest.cpp gtest.cpp:69: warning: direct base `c0::c1' inaccessible in `c8' due to ambiguity /home/dens/tmp/ccbwnzlp.o(.gnu.linkonce.d._ZTC3c264_N3c183c193c21E+0x30): undefined reference to `virtual thunk [v:0,-16] to c18::c19::c21::~c21 [in-charge]()' /home/dens/tmp/ccbwnzlp.o(.gnu.linkonce.d._ZTC3c264_N3c183c193c21E+0x34): undefined reference to `virtual thunk [v:0,-16] to c18::c19::c21::~c21 [in-charge deleting]()' collect2: ld returned 1 exit status NB in case when c26 constructor is "inline" thunk is not needed. It isn't good also. >How-To-Repeat: g++ gtest.cpp >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="gtest.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gtest.cpp" Y2xhc3MgYzAgCnsKICBwdWJsaWM6CiAgYzAoKTsKCiAgY2xhc3MgYzEgCiAgewogICAgcHVibGlj OgogICAgYzEoKTsKCiAgICBzaWduZWQgY2hhciBtMDsKICAgIHN0YXRpYyBsb25nIGRvdWJsZSB2 b2xhdGlsZSB2MDsKCiAgfSAvKiBjbGFzcyBjMSAqLzsKCn0gLyogY2xhc3MgYzAgKi87CgpjMDo6 YzAoKSB7fQpjMDo6YzE6OmMxKCkge30KCm5hbWVzcGFjZSBzdGQgewoKICBjbGFzcyBjMyA6IAog ICAgcHJpdmF0ZSB2aXJ0dWFsIDo6YzA6OmMxCiAgewogICAgcHVibGljOgogICAgYzMoKTsKCiAg ICBjbGFzcyBjNiAKICAgIHsKICAgICAgcHVibGljOgogICAgICBjNigpOwoKICAgICAgY2xhc3Mg YzcgOiBwdWJsaWM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6OmMzOjpjNjo6YzcsCiAgICAgIHB1YmxpYyA6OmM4CiAg ICB7CiAgICAgIGMyMSgpOwoKCiAgICAgIHZpcnR1YWwgfmMyMSgpOwoKICAgIH0gLyogc3RydWN0 IGMyMSAqLzsKCiAgICB+YzE5KCk7CgogIH0gLyogY2xhc3MgYzE5ICovOwoKICB2aXJ0dWFsIH5j MTgoKTsKCn0gLyogc3RydWN0IGMxOCAqLzsKCmMxODo6YzE4KCkge30KCmMxODo6fmMxOCgpIHt9 CgpjMTg6OmMxOTo6YzE5KCkge30KCmMxODo6YzE5Ojp+YzE5KCkge30KCmMxODo6YzE5OjpjMjE6 OmMyMSgpIHt9CgpjMTg6OmMxOTo6YzIxOjp+YzIxKCkge30KCnN0cnVjdCBjMjYgOiBwdWJsaWMg dmlydHVhbCA6OmMxODo6YzE5OjpjMjEKewogICAgICBjMjYoKTsKfTsgCmMyNjo6YzI2KCkge30K CgoKLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqCiAgTWFpbiBQcm9ncmFtCioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwoKaW50Cm1h aW4gKGludCBhcmdjLCBjaGFyICoqYXJndikgewpyZXR1cm4gMDsKfQo=