From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C3A00385840B; Thu, 9 Dec 2021 14:15:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3A00385840B From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103629] Possible miscompilation triggered by -fvisibility=hidden Date: Thu, 09 Dec 2021 14:15:39 +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: pinskia at gcc dot gnu.org 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:15:39 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103629 --- Comment #6 from Andrew Pinski --- (In reply to Mathieu Malaterre from comment #5) > (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 r= eady > > for it. >=20 > 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: >=20 > * https://gcc.gnu.org/gcc-11/changes.html right there has been no major changes in this area as far as I Know.=20 >=20 > `-fvisibility=3Dhidden` was added in 2015 in the Debian/OpenVDB package a= nd > has worked quite well for all users so far. It would be nice if gcc/ld wo= uld > help track any `type_info` issue, in large portable c++ codebase. It was working by accident before. Do you know why it was added? Has the co= de upstream in OpenVDB been fixed for adding the visibility attribute where needed?=