public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50687] New: Missing symbols with -flto -fvisibility=hidden on 4.6.x but not on 4.7.0
@ 2011-10-10 16:01 giulio.eulisse at cern dot ch
  2011-10-11  9:25 ` [Bug lto/50687] " lat at cern dot ch
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: giulio.eulisse at cern dot ch @ 2011-10-10 16:01 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50687
           Summary: Missing symbols with -flto -fvisibility=hidden on
                    4.6.x but not on 4.7.0
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: giulio.eulisse@cern.ch


There seems to be a bug (or least a different behavior) when compiling: 

  cat >test.cc <<-EOF
  struct bar {
     static void * foo();
     virtual void * getFoo() const { return bar::foo();}
  };
  EOF

with:

  c++ -fPIC -shared -flto -fvisibility=hidden test.cc

using gcc 4.6.x (both 4.6.1 release and this week 4.6.2 snapshot) compared to
gcc
4.7.0 (20111001 snapshot).

In the case of gcc 4.6.x I get a missing symbol:

  % nm a.out | grep U
  U _ZN3bar3fooEv  

while with 4.7.x I don't get it anymore (which is what I would expect).

Dropping -flto fixes the behavior also for 4.6.x.


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

end of thread, other threads:[~2011-10-11 12:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 16:01 [Bug lto/50687] New: Missing symbols with -flto -fvisibility=hidden on 4.6.x but not on 4.7.0 giulio.eulisse at cern dot ch
2011-10-11  9:25 ` [Bug lto/50687] " lat at cern dot ch
2011-10-11  9:57 ` giulio.eulisse at cern dot ch
2011-10-11  9:58 ` paolo.carlini at oracle dot com
2011-10-11 12:01 ` lat at cern dot ch

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).