public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/52687] New: [LTO] undefined vtable in dynamic library
@ 2012-03-23 16:57 dimhen at gmail dot com
  2012-03-26  8:28 ` [Bug lto/52687] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dimhen at gmail dot com @ 2012-03-23 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52687
           Summary: [LTO] undefined vtable in dynamic library
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dimhen@gmail.com


GCC trunk [trunk revision 185738], Fedora 16/x64

$ cat foo.cpp
class foo {
   virtual void bar();
   virtual ~foo() {}
};
$ g++ -flto -c foo.cpp -o foo.o && g++ -shared foo.o -flto -o libfoo.so && nm
-D -C -u libfoo.so foo.o | grep foo
libfoo.so:
                 U vtable for foo
foo.o:
nm: foo.o: No symbols

native F16/x64 gcc-4.6.3 do the same


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

* [Bug lto/52687] [LTO] undefined vtable in dynamic library
  2012-03-23 16:57 [Bug lto/52687] New: [LTO] undefined vtable in dynamic library dimhen at gmail dot com
@ 2012-03-26  8:28 ` rguenth at gcc dot gnu.org
  2012-03-26 10:11 ` dimhen at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-26  8:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-26 08:27:11 UTC ---
Seems to work for me.


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

* [Bug lto/52687] [LTO] undefined vtable in dynamic library
  2012-03-23 16:57 [Bug lto/52687] New: [LTO] undefined vtable in dynamic library dimhen at gmail dot com
  2012-03-26  8:28 ` [Bug lto/52687] " rguenth at gcc dot gnu.org
@ 2012-03-26 10:11 ` dimhen at gmail dot com
  2012-03-27  9:40 ` dimhen at gmail dot com
  2012-03-29  7:56 ` dimhen at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dimhen at gmail dot com @ 2012-03-26 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2012-03-26 10:07:53 UTC ---
May be issue is Fedora 16 specific?

i update gcc-trunk and retest with gcc-4.8.0/r185790 and with F16 gcc
For gcc-4.8.0 i try -O0/1/2/3/fast and w/o -O  with no differences

[dimhen@dim tst]$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.6.3/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.6.3 20120306 (Red Hat 4.6.3-2) (GCC) 

w/o LTO

[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -c foo.cpp -o foo.o && g++
-shared foo.o -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
foo.o:

with LTO

[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -flto -c foo.cpp -o foo.o && g++
-shared foo.o -flto -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
                 U vtable for foo
foo.o:
[dimhen@dim tst]$ uname -a
Linux dim.cp.ru 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64
x86_64 x86_64 GNU/Linux

gcc-4.8.0 with LTO

[dimhen@dim tst]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc-current/configure
--prefix=/usr/local/gcc_current --with-multilib-list=m64 --enable-__cxa_atexit
--enable-shared --enable-checking=df,fold,rtl,tree,yes
--enable-gnu-unique-object --enable-linker-build-id
--enable-languages=c,c++,lto --enable-plugin --with-tune=generic
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.8.0 20120326 (experimental) [trunk revision 185790] (GCC) 
[dimhen@dim tst]$ rm -f foo.o libfoo.so && g++ -flto -c foo.cpp -o foo.o && g++
-shared foo.o -flto -o libfoo.so && nm -D -C -u libfoo.so foo.o | grep foo
nm: foo.o: No symbols
libfoo.so:
                 U vtable for foo
foo.o:


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

* [Bug lto/52687] [LTO] undefined vtable in dynamic library
  2012-03-23 16:57 [Bug lto/52687] New: [LTO] undefined vtable in dynamic library dimhen at gmail dot com
  2012-03-26  8:28 ` [Bug lto/52687] " rguenth at gcc dot gnu.org
  2012-03-26 10:11 ` dimhen at gmail dot com
@ 2012-03-27  9:40 ` dimhen at gmail dot com
  2012-03-29  7:56 ` dimhen at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dimhen at gmail dot com @ 2012-03-27  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2012-03-27 09:39:05 UTC ---
Fedora 17 Alpha / x64 has no problems

gcc-4.7.0 20120208 (Red Hat 4.7.0-0.12)
binutils 2.22.52.0.1-4.fc17 20120131


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

* [Bug lto/52687] [LTO] undefined vtable in dynamic library
  2012-03-23 16:57 [Bug lto/52687] New: [LTO] undefined vtable in dynamic library dimhen at gmail dot com
                   ` (2 preceding siblings ...)
  2012-03-27  9:40 ` dimhen at gmail dot com
@ 2012-03-29  7:56 ` dimhen at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dimhen at gmail dot com @ 2012-03-29  7:56 UTC (permalink / raw)
  To: gcc-bugs

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

Dmitry G. Dyachenko <dimhen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #4 from Dmitry G. Dyachenko <dimhen at gmail dot com> 2012-03-29 07:10:39 UTC ---
problem was with ld-2.21.53.0.1
gold works fine


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

end of thread, other threads:[~2012-03-29  7:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 16:57 [Bug lto/52687] New: [LTO] undefined vtable in dynamic library dimhen at gmail dot com
2012-03-26  8:28 ` [Bug lto/52687] " rguenth at gcc dot gnu.org
2012-03-26 10:11 ` dimhen at gmail dot com
2012-03-27  9:40 ` dimhen at gmail dot com
2012-03-29  7:56 ` dimhen at gmail dot com

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