https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89693

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
ip-cp clones thunk:
Evaluating opportunities for virtual C* C::_ZTch0_h8_N1C3TwoEv()/5.             
 - Creating a specialized node of virtual C* C::_ZTch0_h8_N1C3TwoEv()/5 for all
known contexts.
     the new node is _ZTch0_h8_N1C3TwoEv.constprop/41.

and this makes verifier unhappy. clone_of returns false for:
(gdb) p node->debug ()
_ZTchn8_h8_N1C3TwoEv/7 (virtual C* C::_ZTchn8_h8_N1C3TwoEv()) @0x7ffff70e9ca8
  Type: function definition analyzed
  Visibility: externally_visible asm_written public virtual artificial
  Address is taken.
  References: 
  Referring: _ZTV1C/25 (addr)
  Availability: available
  Function flags: indirect_call_target
  Thunk fixed offset -8 virtual value 0 indirect_offset 0 has virtual offset 0
  Called by: 
  Calls: C* C::*.LTHUNK1()/6 
$21 = void
(gdb) p node2->debug ()
_ZTch0_h8_N1C3TwoEv.constprop.0/41 (_ZTch0_h8_N1C3TwoEv.constprop)
@0x7ffff7262708
  Type: function definition analyzed
  Visibility: artificial
  References: 
  Referring: 
  Clone of _ZTch0_h8_N1C3TwoEv/5
  Availability: local
  Function flags: count:10000 (estimated locally) local
  Former thunk fixed offset 8 virtual value 0 indirect_offset 0 has virtual
offset 0
  Called by: int main()/24 (1073741824 (estimated locally),1.00 per call) 
  Calls: 

I think the bug here is that Martin's patch makes clone_of to look at thunk
target of _ZTchn8_h8_N1C3TwoEv, but _ZTch0_h8_N1C3TwoEv.constprop.0 actual
clone of _ZTchn8_h8_N1C3TwoEv.

Reply via email to