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 optimization/9767] explicit instantiation of class members unoptimized?


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From jh at suse dot cz  2003-07-30 22:54 -------
Subject: Re:  explicit instantiation of class members unoptimized?

> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9767
> 
> 
> 
> ------- Additional Comments From bkoz at gcc dot gnu dot org  2003-07-30 19:08 -------
> 
> Actually the transition to -funit-at-a-time is not seamless for libstdc++.
> 
> I first re-compiled libstdc++ by using
> 
> make CXXFLAGS="-g -O2 -funit-at-a-time" all 
> 
> after removing the build directory. Then, I added -funit-at-a-time to
> scripts/testsuite_flags.h so that 
> 
>       --cxxflags)
> CXXFLAGS_save="-g -O2 -funit-at-a-time"
> 
> Then, I ran make-check in the libstdc++ build directory. I got seven new failures:
> 
> FAIL: 22_locale/numpunct/members/pod/2.cc (test for excess errors)
> WARNING: 22_locale/numpunct/members/pod/2.cc compilation failed to produce
> executable
> XPASS: 26_numerics/c99_classification_macros_c.cc (test for excess errors)
> FAIL: 26_numerics/complex_inserters_extractors.cc (test for excess errors)
> WARNING: 26_numerics/complex_inserters_extractors.cc compilation failed to
> produce executable
> FAIL: 27_io/basic_ios/cons/char/3.cc (test for excess errors)
> WARNING: 27_io/basic_ios/cons/char/3.cc compilation failed to produce
> executableFAIL: 27_io/basic_istream/sentry/char/3983-fstream.cc (test for excess
> errors)
> WARNING: 27_io/basic_istream/sentry/char/3983-fstream.cc compilation failed to
> produce executable
> FAIL: 27_io/basic_istream/sentry/char/3983-sstream.cc (test for excess errors)
> WARNING: 27_io/basic_istream/sentry/char/3983-sstream.cc compilation failed to
> produce executable
> FAIL: 27_io/basic_ostream/sentry/char/3983-fstream.cc (test for excess errors)
> WARNING: 27_io/basic_ostream/sentry/char/3983-fstream.cc compilation failed to
> produce executable
> FAIL: 27_io/basic_ostream/sentry/char/3983-sstream.cc (test for excess errors)
> WARNING: 27_io/basic_ostream/sentry/char/3983-sstream.cc compilation failed to
> produce executable
>  
>                 === libstdc++-v3 Summary ===
>  
> # of expected passes            2010
> # of unexpected failures        7
> # of unexpected successes       1
> # of expected failures          9
> 
> 
> These all exhibited the same pathology: missing definitions for virtual dtors.
> They look like this:
> 
> Executing on host: /mnt/hd/bld/gcc/gcc/g++ -shared-libgcc -B/mnt/hd/bld/gcc/gcc/
> -nostdinc++ -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src
> -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs
> -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/bin/
> -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/lib/ -isystem
> /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/include -isystem
> /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/sys-include -include bits/stdc++.h -g
> -O2 -funit-at-a-time -ffunction-sections -fdata-sections -fmessage-length=0
> -DLOCALEDIR="/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/po/share/locale"
> -nostdinc++
> -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu
> -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include
> -I/mnt/hd/src/gcc/libstdc++-v3/libsupc++
> -I/mnt/hd/src/gcc/libstdc++-v3/include/backward
> -I/mnt/hd/src/gcc/libstdc++-v3/testsuite
> /mnt/hd/src/gcc/libstdc++-v3/testsuite/22_locale/numpunct/members/pod/2.cc  
> -D_GLIBCXX_ASSERT  -L/mnt/hd/bld/gcc/i686-pc-linux-gnu//libstdc++-v3/testsuite
> -lv3test -lm   -o ./2.exe    (timeout = 300)
> /tmp/cc6w3g7T.o(.gnu.linkonce.r._ZTVSt19basic_ostringstreamIN9__gnu_cxx9characterItj11__mbstate_tEESt11char_traitsIS3_ESaIS3_EE+0xc):
> In function `main':
> 
> /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/streambuf:504: undefined
> reference to `std::basic_ostringstream<__gnu_cxx::character<unsigned short,
> unsigned, __mbstate_t>, std::char_traits<__gnu_cxx::character<unsigned short,
> unsigned, __mbstate_t> >, std::allocator<__gnu_cxx::character<unsigned short,
> unsigned, __mbstate_t> > >::~basic_ostringstream [in-charge]()'
> 
> /tmp/cc6w3g7T.o(.gnu.linkonce.r._ZTVSt19basic_ostringstreamIN9__gnu_cxx9characterItj11__mbstate_tEESt11char_traitsIS3_ESaIS3_EE+0x10):
> In function `main':
> 
> /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:705:
> undefined reference to `std::basic_ostringstream<__gnu_cxx::character<unsigned
> short, unsigned, __mbstate_t>, std::char_traits<__gnu_cxx::character<unsigned
> short, unsigned, __mbstate_t> >, std::allocator<__gnu_cxx::character<unsigned
> short, unsigned, __mbstate_t> > >::~basic_ostringstream [in-charge deleting]()'
> 
> /tmp/cc6w3g7T.o(.gnu.linkonce.r._ZTVSt19basic_ostringstreamIN9__gnu_cxx9characterItj11__mbstate_tEESt11char_traitsIS3_ESaIS3_EE+0x20):
> In function `test01()':
> 
> /mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/locale_classes.h:278:
> undefined reference to `virtual thunk [v:0,-12] to
> std::basic_ostringstream<__gnu_cxx::character<unsigned short, unsigned,
> __mbstate_t>, std::char_traits<__gnu_cxx::character<unsigned short, unsigned,
> __mbstate_t> >, std::allocator<__gnu_cxx::character<unsigned short, unsigned,
> __mbstate_t> > >::~basic_ostringstream [in-charge]()'

Hmm, these faiulres are definitly new.  I will check them out.
You may try to play with older tree.

Honza


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