From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102007 invoked by alias); 18 Jun 2015 09:05:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 101997 invoked by uid 89); 18 Jun 2015 09:05:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 18 Jun 2015 09:05:30 +0000 Received: by oigb199 with SMTP id b199so11275238oig.3 for ; Thu, 18 Jun 2015 02:05:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.43.133 with SMTP id w5mr8137451obl.65.1434618328466; Thu, 18 Jun 2015 02:05:28 -0700 (PDT) Received: by 10.60.147.170 with HTTP; Thu, 18 Jun 2015 02:05:28 -0700 (PDT) In-Reply-To: <20150618085943.GA13979@arm.com> References: <20150618085943.GA13979@arm.com> Date: Thu, 18 Jun 2015 09:32:00 -0000 Message-ID: Subject: Re: [PATCH, testsuite]: Fix PR 65944, FAIL: g++.dg/lto/pr65276: undefined reference to std2::exception::~exception() From: Uros Bizjak To: James Greenhalgh Cc: "gcc-patches@gcc.gnu.org" , Jonathan Wakely Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-06/txt/msg01241.txt.bz2 On Thu, Jun 18, 2015 at 10:59 AM, James Greenhalgh wrote: >> > Hello! >> > >> > Following patch fixes: >> > >> > cp_lto_pr65276_1.o: In function `std2::runtime_error::~runtime_error()= ':^M >> > pr65276_1.C:(.text._ZN4std213runtime_errorD2Ev[_ZN4std213runtime_error= D5Ev]+0x8): >> > undefined reference to `std2::exception::~exception()'^M >> > cp_lto_pr65276_1.o: In function `std2::runtime_error::~runtime_error()= ':^M >> > pr65276_1.C:(.text._ZN4std213runtime_errorD0Ev[_ZN4std213runtime_error= D5Ev]+0xc): >> > undefined reference to `std2::exception::~exception()'^M >> > cp_lto_pr65276_1.o:(.rodata._ZTVN4std29exceptionE[_ZTVN4std29exception= E]+0x10): >> > undefined reference to `std2::exception::~exception()'^M >> > cp_lto_pr65276_1.o:(.rodata._ZTVN4std29exceptionE[_ZTVN4std29exception= E]+0x18): >> > undefined reference to `std2::exception::~exception()'^M >> > collect2: error: ld returned 1 exit status^M >> > >> > link error with g++.dg/lto/pr65276 testcase. >> > >> > 2015-06-16 Uros Bizjak >> > >> > PR testsuite/65944 >> > * g++.dg/lto/pr65276_0.C: Add std2::exception::~exception() functi= on. >> > >> > Tested on x86_64-linux-gnu CentOS 5.11 (where linking failed) and >> > Fedora 22 (where linking didn't fail). >> > >> > OK for mainline and gcc-5 branch? >> >> Now committed as obvious. > > This patch causes failures in arm-none-linux-gnueabihf testing: > > PASS->FAIL: g++.dg/lto/pr65276 cp_lto_pr65276_0.o-cp_lto_pr65276_1.o link= , -flto -O0 -std=3Dc++11 > > .../arm-none-linux-gnueabihf/obj/gcc4/gcc/testsuite/g++2/../../xg++ -B...= /arm-none-linux-gnueabihf/obj/gcc4/gcc/testsuite/g++2/../../ cp_lto_pr65276= _0.o cp_lto_pr65276_1.o -fno-diagnostics-show-caret -fdiagnostics-color=3Dn= ever -nostdinc++ -I.../arm-none-linux-gnueabihf/obj/gcc4/arm-none-linux-gnu= eabihf/libstdc++-v3/include/arm-none-linux-gnueabihf -I.../arm-none-linux-g= nueabihf/obj/gcc4/arm-none-linux-gnueabihf/libstdc++-v3/include -I.../gcc/l= ibstdc++-v3/libsupc++ -I.../gcc/libstdc++-v3/include/backward -I.../gcc/lib= stdc++-v3/testsuite/util -fmessage-length=3D0 -flto -O0 -std=3Dc++11 -L.../= arm-none-linux-gnueabihf/obj/gcc4/arm-none-linux-gnueabihf/./libstdc++-v3/s= rc/.libs -B.../arm-none-linux-gnueabihf/obj/gcc4/arm-none-linux-gnueabihf/.= /libstdc++-v3/src/.libs -L.../arm-none-linux-gnueabihf/obj/gcc4/arm-none-li= nux-gnueabihf/./libstdc++-v3/src/.libs -o g++-dg-lto-pr65276-01.exe > cp_lto_pr65276_1.o (symbol from plugin): In function `typeinfo for std2::= runtime_error': > (.text+0x0): multiple definition of `typeinfo name for std2::exception' > cp_lto_pr65276_0.o (symbol from plugin):(.text+0x0): first defined here > cp_lto_pr65276_1.o (symbol from plugin): In function `typeinfo for std2::= runtime_error': > (.text+0x0): multiple definition of `typeinfo for std2::exception' > cp_lto_pr65276_0.o (symbol from plugin):(.text+0x0): first defined here > collect2: error: ld returned 1 exit status > compiler exited with status 1 > output is: > cp_lto_pr65276_1.o (symbol from plugin): In function `typeinfo for std2::= runtime_error': > (.text+0x0): multiple definition of `typeinfo name for std2::exception' > cp_lto_pr65276_0.o (symbol from plugin):(.text+0x0): first defined here > cp_lto_pr65276_1.o (symbol from plugin): In function `typeinfo for std2::= runtime_error': > (.text+0x0): multiple definition of `typeinfo for std2::exception' > cp_lto_pr65276_0.o (symbol from plugin):(.text+0x0): first defined here > collect2: error: ld returned 1 exit status I discussed this patch privately with Jon, where he suggested that the approach is OK. The patch also works for me on both, CentOS 5.11 and Fedora 22. I'm out of ideas why this doesn't work on your system. Can you investigate = it? Uros.