From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 583913858025; Thu, 9 Dec 2021 14:03:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 583913858025 From: "mathieu.malaterre at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103629] Possible miscompilation triggered by -fvisibility=hidden Date: Thu, 09 Dec 2021 14:03:01 +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: 11.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mathieu.malaterre at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 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: Thu, 09 Dec 2021 14:03:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103629 --- Comment #5 from Mathieu Malaterre = --- (In reply to Andrew Pinski from comment #4) > (In reply to Mathieu Malaterre from comment #3) > > $ export CXXFLAGS=3D-fvisibility=3Dhidden >=20 > Yes you can't just use -fvisibility=3Dhidden without the source being rea= dy > for it. Andrew, could you please be a bit more specific. I do not see any changes related to duplicate `typeinfo` or `visibility=3Dhidden` in the changelog: * https://gcc.gnu.org/gcc-11/changes.html `-fvisibility=3Dhidden` was added in 2015 in the Debian/OpenVDB package and= has worked quite well for all users so far. It would be nice if gcc/ld would he= lp track any `type_info` issue, in large portable c++ codebase. * https://salsa.debian.org/multimedia-team/openvdb/-/blob/debian/3.0.0-1/debi= an/rules#L14-15=