public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17182] New: [3.5 regression] virtual destructor not in shared library
@ 2004-08-25 13:07 Ralf dot Wildenhues at gmx dot de
2004-08-25 13:17 ` [Bug c++/17182] " Ralf dot Wildenhues at gmx dot de
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2004-08-25 13:07 UTC (permalink / raw)
To: gcc-bugs
This example fails on CVS HEAD gcc (as of yesterday), but not 3.4, neither does
the original problem from which I stripped this example fail with CVS from 6
weeks ago.
/* Save this as a.cc
g++ -fPIC -DPIC -c -o a.o a.cc
g++ -shared a.o -o libfoo.so
Now, link a trivial program against it (int main(void) { }).
g++ -o b b.cc -L. -lfoo
*/
struct B {
virtual ~B () { }
virtual void dummy() { }
};
void bar()
{
struct C : public B {
C (const B& b) : B(b) { }
};
B b;
new C(b);
}
The error given is
./libfoo.so: undefined reference to `bar()::C::~C()'
./libfoo.so: undefined reference to `bar()::C::~C()'
with current gcc.
BTW, the 'new C(b);' line is not necessary with CVS HEAD to expose the bug.
With 3.4, however, class C is optimized away completely without this line.
Regards,
Ralf
--
Summary: [3.5 regression] virtual destructor not in shared
library
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Ralf dot Wildenhues at gmx dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17182] [3.5 regression] virtual destructor not in shared library
2004-08-25 13:07 [Bug c++/17182] New: [3.5 regression] virtual destructor not in shared library Ralf dot Wildenhues at gmx dot de
@ 2004-08-25 13:17 ` Ralf dot Wildenhues at gmx dot de
2004-08-25 13:18 ` Ralf dot Wildenhues at gmx dot de
2004-08-25 15:06 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2004-08-25 13:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Ralf dot Wildenhues at gmx dot de 2004-08-25 13:17 -------
Created an attachment (id=6985)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6985&action=view)
nm output of good object
nm output of object generated by gcc-3.4.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17182] [3.5 regression] virtual destructor not in shared library
2004-08-25 13:07 [Bug c++/17182] New: [3.5 regression] virtual destructor not in shared library Ralf dot Wildenhues at gmx dot de
2004-08-25 13:17 ` [Bug c++/17182] " Ralf dot Wildenhues at gmx dot de
@ 2004-08-25 13:18 ` Ralf dot Wildenhues at gmx dot de
2004-08-25 15:06 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2004-08-25 13:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Ralf dot Wildenhues at gmx dot de 2004-08-25 13:18 -------
Created an attachment (id=6986)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6986&action=view)
nm output of bad object
this is what CVS HEAD generates.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17182
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17182] [3.5 regression] virtual destructor not in shared library
2004-08-25 13:07 [Bug c++/17182] New: [3.5 regression] virtual destructor not in shared library Ralf dot Wildenhues at gmx dot de
2004-08-25 13:17 ` [Bug c++/17182] " Ralf dot Wildenhues at gmx dot de
2004-08-25 13:18 ` Ralf dot Wildenhues at gmx dot de
@ 2004-08-25 15:06 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-25 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-25 15:06 -------
*** This bug has been marked as a duplicate of 17155 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17182
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-25 15:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-25 13:07 [Bug c++/17182] New: [3.5 regression] virtual destructor not in shared library Ralf dot Wildenhues at gmx dot de
2004-08-25 13:17 ` [Bug c++/17182] " Ralf dot Wildenhues at gmx dot de
2004-08-25 13:18 ` Ralf dot Wildenhues at gmx dot de
2004-08-25 15:06 ` pinskia 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).