From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 221DC3857C70; Thu, 7 Mar 2024 14:25:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 221DC3857C70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709821503; bh=xYWq/zaBuEMbySYZIZOVEk4ZFI77IqBSehWkzc4J6uM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=joupu8TPN424K9MS/f4t5yACk9Qzgk0bscTUrckMD2L23sY4dTLkr2CwQ8+DhGRU+ wwJJj9zyXZDAgky9g3AF1dNTicGCPDDtprqzBHG2coN6g9OywYvvW3akXujtAaVrJt qLCAWbxTw7910a3ynuWSpQ24xkVsHMJXInArPbeM= From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114233] Newly-introduced pr113617.C test fails on Darwin Date: Thu, 07 Mar 2024 14:25:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: link-failure, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114233 --- Comment #3 from Francois-Xavier Coudert = --- Jakub has posted a patch in the linker PR (thanks!). But there remains a darwin bug. The test in check_effective_target_shared actually works with C, but not with C++, because: Undefined symbols for architecture arm64: "__Z3foov", referenced from: __Z3bazv in ccCj5plO.o Why have we not seen it before? Because most of the use of that check is in= { dg-require-effective-target shared } so we're effectively skipping tests, a= nd that is silent. As far as I can tell, this addition is the first time { tar= get shared } is used as a conditional in something like { dg-additional-options= } in the C++ testsuite. The fix is simple: diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ae33c4f1e3a..467b539b20d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1390,7 +1390,7 @@ proc check_effective_target_shared { } { # here to be undefined. set extra_flags "" if { [istarget *-*-darwin\[912\]*] } { - set extra_flags "-Wl,-U,_foo,-U,_bar" + set extra_flags "-Wl,-U,_foo,-U,_bar,-U,__Z3foov" } # Note that M68K has a multilib that supports -fpic but not # -fPIC, so we need to check both. We test with a program that The question is: will this reveal new issues in other tests that weren't running before. I'm starting a new regtest and will post the results here.=