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++/51812] [4.7 regression] Virtual public inheritance and thunks leads to "undefined reference" in header files.


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.


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