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 c++/41354] g++: Inlining constructors puts wrong vtable in objects



------- 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


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