* [inliner] g++ -O[123] generates undefined symbol
@ 2010-06-13 19:57 Дмитрий Дьяченко
2010-06-14 5:27 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Дмитрий Дьяченко @ 2010-06-13 19:57 UTC (permalink / raw)
To: gcc
Trunk g++/x86/160655 with -O0 compile test w/o errors, but with
-O[123] generates undefined symbol
--> cat 2010_06_13.cpp
namespace FOO {
template <typename T>
class A
{
public:
A(char *pMemMgr = 0);
void Enum();
virtual void OnProv() = 0;
virtual ~A() { }
};
typedef A<char> B;
template<typename T>
inline A<T>::A(char *pMemMgr)
{
}
template<typename T>
inline void A<T>::Enum ()
{
OnProv ();
}
} // namespace FOO
class C {};
class D: public C, public FOO::B {
public:
void OnProv() {}
};
void aaa()
{
D x;
x.Enum();
}
--> g++ -O1 -c 2010_06_13.cpp && nm -uAC 2010_06_13.o | grep OnProv
2010_06_13.o: U FOO::A<char>::OnProv()
--> g++ -O0 -c 2010_06_13.cpp && nm -uAC 2010_06_13.o | grep OnProv
-->
--> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/i686-redhat-linux/4.6.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../gcc-current/configure
--prefix=/usr/local/gcc_current --enable-bootstrap --enable-shared
--enable-threads=posix --enable-checking=yes --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-languages=c,c++ --with-ppl
--with-cloog --with-tune=generic --with-arch=i686
--build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs : (reconfigured)
../gcc-current/configure --prefix=/usr/local/gcc_current
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=yes --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++ --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux --enable-lto
--enable-version-specific-runtime-libs
Thread model: posix
gcc version 4.6.0 20100612 (experimental) [trunk revision 160655] (GCC)
Need i file a PR?
Thanks,
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [inliner] g++ -O[123] generates undefined symbol
2010-06-13 19:57 [inliner] g++ -O[123] generates undefined symbol Дмитрий Дьяченко
@ 2010-06-14 5:27 ` Ian Lance Taylor
2010-06-14 11:58 ` Дмитрий Дьяченко
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2010-06-14 5:27 UTC (permalink / raw)
To: Дмитрий
Дьяченко
Cc: gcc
Дмитрий Дьяченко <dimhen@gmail.com> writes:
> Trunk g++/x86/160655 with -O0 compile test w/o errors, but with
> -O[123] generates undefined symbol
> Need i file a PR?
It certainly looks like a bug. Please do open a bug report. Thanks.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [inliner] g++ -O[123] generates undefined symbol
2010-06-14 5:27 ` Ian Lance Taylor
@ 2010-06-14 11:58 ` Дмитрий Дьяченко
0 siblings, 0 replies; 3+ messages in thread
From: Дмитрий Дьяченко @ 2010-06-14 11:58 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc
Done. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
Thanks.
Dmitry
2010/6/14 Ian Lance Taylor <iant@google.com>:
> Дмитрий Дьяченко <dimhen@gmail.com> writes:
>
>> Trunk g++/x86/160655 with -O0 compile test w/o errors, but with
>> -O[123] generates undefined symbol
>
>> Need i file a PR?
>
> It certainly looks like a bug. Please do open a bug report. Thanks.
>
> Ian
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-14 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-13 19:57 [inliner] g++ -O[123] generates undefined symbol Дмитрий Дьяченко
2010-06-14 5:27 ` Ian Lance Taylor
2010-06-14 11:58 ` Дмитрий Дьяченко
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).