Closed Quuxplusone closed 14 years ago
Attached compatibility.cc
(2546 bytes, text/x-c++src): test case
Reduced testcase:
class basic_ios {};
template<typename T>
class basic_fstreamXX : virtual public basic_ios {
void is_open() const { }
};
template void basic_fstreamXX<char>::is_open() const;
gcc produces only the _ZNK15basic_fstreamXXIcE7is_openEv. Clang gets confused
and produces the VTT and Vtable.
It looks like the bug is in the code that handles the VTT codegen. Replacing
the virtual inheritance with a plain one an adding virtual methods removes the
bug.
I was wrong, we also produce a vtable for
template<typename T>
class basic_fstreamXX {
virtual void foo(){}
void is_open() const { }
};
template void basic_fstreamXX<char>::is_open() const;
Attached PR6738.patch
(2246 bytes, text/plain): patch
fixed in r99900.
compatibility.cc
(2546 bytes, text/x-c++src)PR6738.patch
(2246 bytes, text/plain)