public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol
@ 2010-06-14 10:01 dimhen at gmail dot com
2010-06-14 10:19 ` [Bug c++/44535] " dimhen at gmail dot com
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: dimhen at gmail dot com @ 2010-06-14 10:01 UTC (permalink / raw)
To: gcc-bugs
g++/trunk/x86/rev.160690 -O0 compile test w/o errors, but with -O[ 123]
generates undefined symbol
# g++ -O0 -c 2010_06_13.cpp && nm -uAC 2010_06_13.o | grep OnProv
# g++ -O -c 2010_06_13.cpp && nm -uAC 2010_06_13.o | grep OnProv
2010_06_13.o: U FOO::A<char>::OnProv()
# cat 2010_06_13.cpp
namespace FOO {
template <typename T>
class A
{
public:
A();
void Enum();
virtual void OnProv() = 0;
virtual ~A() { }
};
typedef A<char> B;
template<typename T>
inline A<T>::A()
{
}
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++ -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 20100613 (experimental) [trunk revision 160690] (GCC)
--
Summary: g++ -O[ 123] generates undefined symbol
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dimhen at gmail dot com
GCC build triplet: i686-redhat-linux
GCC host triplet: i686-redhat-linux
GCC target triplet: i686-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] g++ -O[ 123] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
@ 2010-06-14 10:19 ` dimhen at gmail dot com
2010-06-14 11:23 ` [Bug c++/44535] [4.6 Regression] g++ -O[ 23] " rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dimhen at gmail dot com @ 2010-06-14 10:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dimhen at gmail dot com 2010-06-14 10:19 -------
simplified testcase FAIl with -O[23]
namespace FOO {
template <typename T>
class A
{
public:
void Enum();
virtual void OnProv() = 0;
virtual ~A() { }
};
typedef A<char> B;
template<typename T>
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();
}
--
dimhen at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dimhen at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
2010-06-14 10:19 ` [Bug c++/44535] " dimhen at gmail dot com
@ 2010-06-14 11:23 ` rguenth at gcc dot gnu dot org
2010-06-15 17:12 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-14 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-06-14 11:23 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2010-06-14 11:23:28
date| |
Summary|g++ -O[ 123] generates |[4.6 Regression] g++ -O[ 23]
|undefined symbol |generates undefined symbol
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
2010-06-14 10:19 ` [Bug c++/44535] " dimhen at gmail dot com
2010-06-14 11:23 ` [Bug c++/44535] [4.6 Regression] g++ -O[ 23] " rguenth at gcc dot gnu dot org
@ 2010-06-15 17:12 ` jakub at gcc dot gnu dot org
2010-06-15 17:55 ` jamborm at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-15 17:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-06-15 17:12 -------
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159362
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
` (2 preceding siblings ...)
2010-06-15 17:12 ` jakub at gcc dot gnu dot org
@ 2010-06-15 17:55 ` jamborm at gcc dot gnu dot org
2010-06-16 16:26 ` jamborm at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-15 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jamborm at gcc dot gnu dot org 2010-06-15 17:55 -------
We seem to be folding the virtual call to the wrong method. I'm
investigating...
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jamborm at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2010-06-14 11:23:28 |2010-06-15 17:55:11
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
` (3 preceding siblings ...)
2010-06-15 17:55 ` jamborm at gcc dot gnu dot org
@ 2010-06-16 16:26 ` jamborm at gcc dot gnu dot org
2010-06-28 15:42 ` jamborm at gcc dot gnu dot org
2010-06-28 17:01 ` jamborm at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-16 16:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jamborm at gcc dot gnu dot org 2010-06-16 16:25 -------
Patch posted to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01653.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
` (4 preceding siblings ...)
2010-06-16 16:26 ` jamborm at gcc dot gnu dot org
@ 2010-06-28 15:42 ` jamborm at gcc dot gnu dot org
2010-06-28 17:01 ` jamborm at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-28 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jamborm at gcc dot gnu dot org 2010-06-28 15:42 -------
Subject: Bug 44535
Author: jamborm
Date: Mon Jun 28 15:42:01 2010
New Revision: 161498
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161498
Log:
2010-06-28 Martin Jambor <mjambor@suse.cz>
PR c++/44535
* gimple-fold.c (get_first_base_binfo_with_virtuals): New function.
(gimple_get_relevant_ref_binfo): Use get_first_base_binfo_with_virtuals
instead of BINFO_BASE_BINFO.
* testsuite/g++.dg/torture/pr44535.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr44535.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/44535] [4.6 Regression] g++ -O[ 23] generates undefined symbol
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
` (5 preceding siblings ...)
2010-06-28 15:42 ` jamborm at gcc dot gnu dot org
@ 2010-06-28 17:01 ` jamborm at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jamborm at gcc dot gnu dot org @ 2010-06-28 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jamborm at gcc dot gnu dot org 2010-06-28 17:00 -------
Fixed.
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44535
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-06-28 17:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14 10:01 [Bug c++/44535] New: g++ -O[ 123] generates undefined symbol dimhen at gmail dot com
2010-06-14 10:19 ` [Bug c++/44535] " dimhen at gmail dot com
2010-06-14 11:23 ` [Bug c++/44535] [4.6 Regression] g++ -O[ 23] " rguenth at gcc dot gnu dot org
2010-06-15 17:12 ` jakub at gcc dot gnu dot org
2010-06-15 17:55 ` jamborm at gcc dot gnu dot org
2010-06-16 16:26 ` jamborm at gcc dot gnu dot org
2010-06-28 15:42 ` jamborm at gcc dot gnu dot org
2010-06-28 17:01 ` jamborm at gcc dot gnu dot org
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).