public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58201] New: [g++] Undefined reference to `B::B(void const**)'
@ 2013-08-20 13:20 aivchenk at gmail dot com
  2013-08-20 14:49 ` [Bug c++/58201] [4.7/4.8/4.9 Regression] " paolo.carlini at oracle dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: aivchenk at gmail dot com @ 2013-08-20 13:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58201

            Bug ID: 58201
           Summary: [g++] Undefined reference to `B::B(void const**)'
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aivchenk at gmail dot com

Testcase:
----ABC.h-----
class A
{
 protected:
  A();
  virtual ~A();
};

class B : virtual public A
{
 public:
  B();
  virtual ~B();
};

class C
{
 private:
  class C2 : public B
   {
   public:
     C2();
     virtual ~C2();
   };
};
----AB.cpp-----
#include "ABC.h"

A::A() { }
A::~A() { }
B::B() { }
B::~B() { }

----C.cpp------
#include "ABC.h"    

C::C2::C2(){ }      
C::C2::~C2() { }    

int main ()         
{                   
    return 0;       
}                   

---------------
Compiling the usual way:
g++ AB.cpp -c
g++ C.cpp -c
g++ AB.o C.o

C.o: In function `C::C2::C2()':
C.cpp:(.text+0x23): undefined reference to `B::B(void const**)'
C.o: In function `C::C2::C2()':
C.cpp:(.text+0x8d): undefined reference to `B::B(void const**)'
C.o: In function `C::C2::~C2()':
C.cpp:(.text+0x129): undefined reference to `B::~B(void const**)'
C.o: In function `C::C2::~C2()':
C.cpp:(.text+0x1c3): undefined reference to `B::~B(void const**)'
collect2: error: ld returned 1 exit status


We cannot right now build the Android Open Source Tree with the trunk because
of that bug. It was introduced with this commit:

Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>                  
Date:   Thu Jul 25 17:10:21 2013 +0000                                          

        * cgraph.c (release_function_body): Break out from ...                  
        (cgraph_release_function_body): ... this one; also release DECL_RESULT  
        and DECL_ARGUMENTS.                                                     
        * ipa-cp.c (get_replacement_map): Add parm_num argument; do not set     
        old_tree in the map.                                                    
        (create_specialized_node): Update.                                      
        * lto-cgraph.c (output_node_opt_summary): Do not translate old_tree     
        into index.                                                             
        * cgraphclones.c (cgraph_create_virtual_clone): Do not copy
DECL_ARGUMENTS,                
        DECL_INITIAL and DECL_RESULT.                                           
        * ipa-prop.c (ipa_populate_param_decls): Look for origin of clones.     
        * tree-inline.c (initialize_cfun): Initialize DECL_ARGUMENTS and        
        DECL_RESULT.                                                            


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201251
138bc75d-0d04-0410-961f-82ee72b054a4


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-09-07 11:15 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 13:20 [Bug c++/58201] New: [g++] Undefined reference to `B::B(void const**)' aivchenk at gmail dot com
2013-08-20 14:49 ` [Bug c++/58201] [4.7/4.8/4.9 Regression] " paolo.carlini at oracle dot com
2013-08-20 15:58 ` [Bug c++/58201] [4.9 " paolo.carlini at oracle dot com
2013-08-20 19:35 ` hubicka at gcc dot gnu.org
2013-08-28  9:17 ` rguenth at gcc dot gnu.org
2013-09-02 11:37 ` paolo.carlini at oracle dot com
2013-09-02 11:42 ` kcc at gcc dot gnu.org
2013-09-02 12:29 ` paolo.carlini at oracle dot com
2013-09-02 12:56 ` jakub at gcc dot gnu.org
2013-09-04 11:01 ` markus at trippelsdorf dot de
2013-09-04 15:35 ` hubicka at gcc dot gnu.org
2013-09-04 15:42 ` jakub at gcc dot gnu.org
2013-09-04 15:50 ` hubicka at gcc dot gnu.org
2013-09-05 23:04 ` hubicka at gcc dot gnu.org
2013-09-05 23:08 ` hubicka at gcc dot gnu.org
2013-09-06 17:48 ` paolo.carlini at oracle dot com
2013-09-07  8:54 ` hubicka at ucw dot cz
2013-09-07 11:09 ` jakub at gcc dot gnu.org
2013-09-07 11:15 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).