From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DC959385803E; Wed, 18 May 2022 16:38:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC959385803E From: "boreynol at microsoft dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/41091] Using section attribute in c and c++ function causes section type conflict Date: Wed, 18 May 2022 16:38:47 +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: 4.4.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: boreynol at microsoft dot com 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: cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2022 16:38:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D41091 Bobby Reynolds changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |boreynol at microsoft dot = com --- Comment #9 from Bobby Reynolds --- My team is also impacted by this issue (also with tracing code, as it turns out). FWIW there's a great writeup explaining the issue on Stack Overflow: https://stackoverflow.com/questions/35091862/inline-static-data-causes-a-se= ction-type-conflict In this writeup, the author suggests that perhaps -fno-gnu-unique should additionally cause GCC to _not_ use section grouping for the associated sym= bol; in this case GCC would simply emit a weak symbol without grouping, which I believe would match the (admittedly less robust) behavior of Clang.=