This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51812] [4.7 regression] Virtual public inheritance and thunks leads to "undefined reference" in header files.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 22 Jan 2012 21:42:38 +0000
- Subject: [Bug c++/51812] [4.7 regression] Virtual public inheritance and thunks leads to "undefined reference" in header files.
- Auto-submitted: auto-generated
- References: <bug-51812-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51812
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|x86_64-linux-gnu |
CC| |hubicka at gcc dot gnu.org
Host|x86_64-linux-gnu |
Summary|[4.7 regression] Virtual |[4.7 regression] Virtual
|public inheritance leads to |public inheritance and
|"undefined reference" in |thunks leads to "undefined
|header files. |reference" in header files.
Build|x86_64-linux-gnu |
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-22 21:42:38 UTC ---
Reduced testcase:
class Object {
virtual Object* clone() const =0;
virtual char* print() const;
};
class alphabet: virtual public Object{};
class Nucleotides: public alphabet {};
class DNA: public Nucleotides {
virtual DNA* clone() const {return new DNA(*this);}
};
int main() { }
--- CUT ---
This testcase requires thunks and virtual inheritance.