[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

2012-01-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-01-13
 CC||jason at gcc dot gnu.org
Summary|-fvisibility=hidden causes  |[4.7 Regression]
   |std::codecvt members to be  |-fvisibility=hidden causes
   |undefined   |std::codecvt members to be
   ||undefined
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2012-01-13 
11:53:58 UTC ---
Jason, this happens only in mainline and I'm trying to figure if it may have to
do with our recent changes in the visibility area (like PR35688).

We have a problem with, for example, the std::use_facet specializations which
we declare extern template (in bits/codecvt.h):

  extern template
const codecvt&
use_facet >(const locale&);

note that the latter happens in the namespace std as decorated visibility
default.

The library normally exports the required use_facet symbol from the .so but for
some reason, see Description, the linker doesn't find it.

Apparently the problem has more generally to do with extern template things.
Any idea what may be going wrong? Is there something the library should do
here?


[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

2012-01-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |

--- Comment #2 from Jason Merrill  2012-01-13 
15:57:35 UTC ---
The difference is that now for the same input, GCC marks the undefined
use_facet symbol as hidden, while 4.6 doesn't.  I'll take a look.


[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

2012-01-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Component|libstdc++   |c++
   Target Milestone|--- |4.7.0

--- Comment #8 from Jason Merrill  2012-01-13 
17:01:06 UTC ---
Mine.


[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

2012-01-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

--- Comment #9 from Jason Merrill  2012-01-13 
17:51:04 UTC ---
Author: jason
Date: Fri Jan 13 17:50:58 2012
New Revision: 183156

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183156
Log:
PR c++/51813
* decl2.c (constrain_visibility): Clear DECL_VISIBILITY_SPECIFIED
when reducing the visibility.

Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/template9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/51813] [4.7 Regression] -fvisibility=hidden causes std::codecvt members to be undefined

2012-01-13 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51813

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Jason Merrill  2012-01-13 
17:52:47 UTC ---
Fixed.  I think the change to C header visibility would still be a good idea,
though.