This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug lto/52687] [LTO] undefined vtable in dynamic library


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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]