[Bug c++/58201] [4.9 Regression] Undefined reference to `B::B(void const**)'

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 4 15:35:00 GMT 2013


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

--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, the destructor is used as:
_ZN1BD2EPPKv/21 (B::~B()) @0x7f56014ecd10
  Type: function
  Visibility: external public
  References:
  Referring:
  Availability: not_available
  Function flags:
  Called by: _ZN1C2C2D2Ev/4 (1.00 per call) (can throw external) _ZN1C2C2D1Ev/5
(1.00 per call)
  Calls:


_ZN1C2C2D2Ev/4 (C::C2::~C2()) @0x7f56014d2d10
  Type: function definition analyzed
  Visibility: public
  Aux: @0x7f56014d2e40  References: __gxx_personality_v0/18 (addr)
  Referring:
  Function flags: body
  Called by:
  Calls: A::~A()/20 (1.00 per call) void operator delete(void*)/22 (1.00 per
call) A::~A()/20 (1.00 per call) B::~B()/21 (1.00 per call)


Now with older GCC we do not output _ZN1C2C2D2Ev

Older GCC gets:
C::C2::~C2()/4 @0x7f15ce0c6360 (asm: _ZN1C2C2D2Ev) analyzed needed reachable
body finalized
  called by:
  calls: A::~A()/16 (1.00 per call) void operator delete(void*)/14 (1.00 per
call) A::~A()/16 (1.00 per call) (can throw external) B::~B()/15 (1.00 per
call)
  References:  fn:<built-in>/17 (addr)
  Refering this function:
B::~B()/15 @0x7f15ce0d4000 (asm: _ZN1BD2Ev) availability:not_available
  called by: C::C2::~C2()/4 (1.00 per call) (can throw external) virtual
C::C2::~C2()/5 (1.00 per call)
  calls:
  References:
  Refering this function:

So it calls B::~B() instead of B::~B(void const**)
The extra const** parameter is however passed in both   I am not really sure
how this difference happens...



More information about the Gcc-bugs mailing list