From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3B14385C6D5; Mon, 21 Aug 2023 12:53:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3B14385C6D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692622402; bh=KmHEAWFGBVBL9H0us5NYH4ATOyZkW89G6KRuwqM60J4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gBIQRR4+1jxAKFhQ/l7gAk7yjePcRP+W3scQgs1LVUM2Tl9CtjzxiOiqY7XtCr+E1 4XPG9UCcFN8u01FpiVZFj80dqnmYYR3SasmzN3lCwyFQcq5Cwlvcggn2EgYkGpkt1r QcWvxEYFBBB7Ilx0cf2HYvEdd+t3OnvJz/oXEGI4= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/111067] g++.dg/opt/icf{1,2,3}.C tests fail on darwin Date: Mon, 21 Aug 2023 12:53:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite 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 #4 from Iain Sandoe --- clang on Darwin rejects the code thus: $ ./bin/clang++ /src-local/gcc-master/gcc/testsuite/g++.dg/opt/icf1.C -o i1 -std=3Dc++14 /src-local/gcc-master/gcc/testsuite/g++.dg/opt/icf1.C:5:3: error: 'no_unique_address' attribute only applies to non-bit-field non-static data members 5 | [[no_unique_address]] extern const int i[] =3D { 1,2,3 }; this seems to agree with the current WD: https://eel.is/c++draft/dcl.attr.nouniqueaddr "9.12.11 No unique address attribute [dcl.attr.nouniqueaddr] 1 # The attribute-token no_unique_address specifies that a non-static data memb= er is a potentially-overlapping subobject ([intro.object]). No attribute-argument-clause shall be present. The attribute may appertain to a non-static data member other than a bit-field. " since the objects in the test case are not non-static, non-bitfield data members, any application of the attribute would be a GCC extension, I guess? What is the intent?=