This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41354] g++: Inlining constructors puts wrong vtable in objects
- From: "erik at arbat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2009 09:00:39 -0000
- Subject: [Bug c++/41354] g++: Inlining constructors puts wrong vtable in objects
- References: <bug-41354-13921@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from erik at arbat dot com 2009-09-14 09:00 -------
Created an attachment (id=18581)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18581&action=view)
Test case.
The following file illustrates the bug. Compiling with
g++ -O1 -fno-strict-aliasing -c codegen.cc
to see the bug. Compile with
g++ -O1 -fno-strict-aliasing -fno-tree-sink -c codegen.cc
to make the bug go away. If you disassemble the two versions you can see that
in the buggy version both instances get the same vtable. In the correct
version the constant pool is one word larger, as the two instances have two
different vtables.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41354