From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8A5FB3858402; Thu, 9 Dec 2021 14:23:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A5FB3858402 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:23:07 +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:23:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103629 --- Comment #7 from Mathieu Malaterre = --- (In reply to Andrew Pinski from comment #6) > (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= ready > > > for it. > >=20 > > Andrew, could you please be a bit more specific. I do not see any chang= es > > related to duplicate `typeinfo` or `visibility=3Dhidden` in the changel= og: > >=20 > > * https://gcc.gnu.org/gcc-11/changes.html >=20 > right there has been no major changes in this area as far as I Know.=20 >=20 > >=20 > > `-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 > > help track any `type_info` issue, in large portable c++ codebase. >=20 > It was working by accident before. Do you know why it was added? Has the > code upstream in OpenVDB been fixed for adding the visibility attribute > where needed? OpenVDB is supposed to be /portable/ c++. The dll export mechanism has been working on windows arch since basically day-one. The gcc implementation is at: * https://github.com/AcademySoftwareFoundation/openvdb/blob/master/openvdb/op= envdb/Platform.h#L218-L219 IMHO this is following the wiki from: * https://gcc.gnu.org/wiki/Visibility=