public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51930] New: Explicitly instantiated template gets hidden visibility
@ 2012-01-21 11:41 sefi@s-e-f-i.de
  2012-01-21 14:23 ` [Bug c++/51930] " redi at gcc dot gnu.org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: sefi@s-e-f-i.de @ 2012-01-21 11:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51930

             Bug #: 51930
           Summary: Explicitly instantiated template gets hidden
                    visibility
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sefi@s-e-f-i.de


gcc-4.7 produces a symbol with hidden visibility for testfunc<foo>, while
gcc-4.6 produces a symbol with default visibility.

struct foo
{
};

template<
        typename T
>
__attribute__ ((visibility("default")))
void testfunc();

template<
        typename T
>
void testfunc()
{
}

template
__attribute__ ((visibility("default")))
void testfunc<foo>();


I compiled this with 
g++-4.7 -fvisibility=hidden -shared test.cpp


If I replace

struct foo {};

with 

struct __attribute__ ((visibility("default"))) foo {};

then testfunc<foo> gets default visibility even with gcc-4.7.

Is this intentional?


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-03-05 18:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 11:41 [Bug c++/51930] New: Explicitly instantiated template gets hidden visibility sefi@s-e-f-i.de
2012-01-21 14:23 ` [Bug c++/51930] " redi at gcc dot gnu.org
2012-01-21 21:16 ` [Bug c++/51930] [4.7 regression] " jason at gcc dot gnu.org
2012-01-23 18:32 ` jason at gcc dot gnu.org
2012-01-23 21:52 ` jason at gcc dot gnu.org
2012-01-23 21:55 ` jason at gcc dot gnu.org
2012-01-29 14:07 ` sefi@s-e-f-i.de
2012-02-15  1:23 ` jason at gcc dot gnu.org
2012-02-15  9:29 ` sefi@s-e-f-i.de
2012-02-15 10:15 ` redi at gcc dot gnu.org
2012-02-15 10:55 ` jason at gcc dot gnu.org
2012-02-15 12:02 ` sefi@s-e-f-i.de
2012-02-15 13:50 ` paolo.carlini at oracle dot com
2012-02-16  8:48 ` jason at gcc dot gnu.org
2012-02-22 10:09 ` rguenth at gcc dot gnu.org
2012-02-27 10:40 ` rguenth at gcc dot gnu.org
2012-02-27 11:08 ` sefi@s-e-f-i.de
2012-02-27 15:04 ` redi at gcc dot gnu.org
2012-02-27 15:21 ` redi at gcc dot gnu.org
2012-03-01  2:39 ` jason at gcc dot gnu.org
2012-03-01 17:53 ` jason at gcc dot gnu.org
2012-03-01 20:49 ` manu at gcc dot gnu.org
2012-03-01 20:54 ` manu at gcc dot gnu.org
2012-03-05 18:09 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).