PR c++/47877 - -fvisibility-inlines-hidden and member templates.
authorJason Merrill <jason@redhat.com>
Tue, 7 Jan 2020 15:05:25 +0000 (10:05 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 7 Jan 2020 15:05:25 +0000 (10:05 -0500)
commitbd65538abb6a48c97f9fd02d037b41e5a6397a70
tree31186666c87d3f4b819b1ee7f2c251b168cf0b80
parent66b01cc3421055806f51ac36a8d237536970504c
PR c++/47877 - -fvisibility-inlines-hidden and member templates.

DECL_VISIBILITY_SPECIFIED is also true if an enclosing scope has explicit
visibility, and we don't want that to override -fvisibility-inlines-hidden.
So check for the attribute specifically on the function, like we already do
for template argument visibility restriction.

* decl2.c (determine_visibility): -fvisibility-inlines-hidden beats
explicit class visibility for a template.

From-SVN: r279960
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden-5.C [new file with mode: 0644]
gcc/tree.h