From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 668353858D28; Tue, 2 Apr 2024 22:31:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 668353858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712097112; bh=Ft7F1zxRWQbCFxvwVJuiTvLFh3tBPY3qRDWKGPvd6hE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lXYfXf6GejeVv3K8wSTPsAgeKBcRI6faTBx7sa7RzvolaVgG8fNpSvCttkkDXj22a 3UBfy6PKfOfKZWiVl7QggBbnJX9bEIaPTFgGtQ1xRYNyNsHwt4B4w0I9bJqtTKd/sd Wy0T5VKBx1Z954nxEy2MaeoaPbNSS3qswATYNaIM= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111067] g++.dg/opt/icf{1,2,3}.C tests fail on darwin Date: Tue, 02 Apr 2024 22:31:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: iains 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=3D111067 --- Comment #11 from Iain Sandoe --- (In reply to Jason Merrill from comment #10) > (In reply to Jonathan Wakely from comment #8) > > (In reply to Iain Sandoe from comment #7) > > > So I am actually asking if the extension actually has any useful mean= ing? > >=20 > > For non-darwin, yes, it requests the storage of two initializer lists t= o be > > merged (see the commit msg for r14-1500-g4d935f52b0d5c0). >=20 > Though that doesn't involve the attribute, and promoting init-lists to > static should work fine on darwin. I think that is working we end up with two constant text arrays (no copy via automatic storage as mentioned in the paper) > (In reply to Jonathan Wakely from comment #6) > > The question then is whether the attribute is supposed to be a non-bind= ing > > request or not. > >=20 > > If it's a non-binding request then the test should be adjusted/unsuppor= ted > > for this target. >=20 > It is a non-binding request. And yes, if this optimization is problematic= on > darwin, we should adjust the test. Actually, the optimisation is failing on Darwin - we produce two distinct arrays. (although, if it succeeds then technically that's breaking the ABI since we then have two external symbols with the same addresss). SO I suppose the question is do we want to figure out why the opt is failing (knowing that if it succeeds that is a secondary issue) - or just dg-xfail-run-if for Darwin? This is what we generate now: .const .align 3 _i: .long 1 .long 2 .long 3 .globl _j .align 3 _j: .long 1 .long 2 .long 3 and we do access i and j directly (i.e. not via the GOT).=