https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83178
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jamborm at gcc dot gnu.org --- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- Difference is that a new specialized clone is created with the revision: --- /tmp/before/devirt-22.C.075i.cp 2018-01-09 13:30:36.973652893 +0100 +++ /tmp/after/devirt-22.C.075i.cp 2018-01-09 13:30:07.333100054 +0100 @@ -114,12 +114,12 @@ Node: void lookupSourceDone()/8: Node: void sort(C&, C&)/7: param [0]: VARIABLE - ctxs: Outer type:struct C offset 0 [loc_time: 0, loc_size: 0, prop_time: 0, prop_size: 0] + ctxs: Outer type:struct C offset 0 [loc_time: 0, loc_size: 0, prop_time: 32, prop_size: 13] Bits: value = 0x0, mask = 0xfffffffffffffff8 ~[0, 0] ref offset 0: &MEM[(void *)&_ZTV1C + 16B] [loc_time: 0, loc_size: 0, prop_time: 0, prop_size: 0] - param [1]: &b [loc_time: 0, loc_size: 0, prop_time: 0, prop_size: 0] - ctxs: Outer type:struct C offset 0 [loc_time: 0, loc_size: 0, prop_time: 0, prop_size: 0] + param [1]: &b [loc_time: 0, loc_size: 0, prop_time: 70, prop_size: 32] + ctxs: Outer type:struct C offset 0 [loc_time: 0, loc_size: 0, prop_time: 64, prop_size: 26] Bits: value = 0x0, mask = 0xfffffffffffffff8 ~[0, 0] AGGS VARIABLE @@ -156,6 +156,10 @@ replacing param #1 p1 with const 0 ipa-prop: Discovered a virtual call to a known target (operator[].constprop/21 -> virtual int C::m_fn1()/0), for stmt OBJ_TYPE_REF(_2;this_4(D)->0) (this_4(D)); Speculative call turned into direct call. + Creating a specialized node of A& C::operator[](int)/1. + replacing param #1 p1 with const 0 +ipa-prop: Discovered a virtual call to a known target (operator[].constprop/22 -> virtual int C::m_fn1()/0), for stmt OBJ_TYPE_REF(_2;this_4(D)->0) (this_4(D)); +Speculative call turned into direct call. Creating a specialized node of virtual int C::m_fn1()/0. replacing param #0 this with const &b - Creating a specialized node of virtual int C::m_fn1()/0 for all known contexts. Martin can you please take a look and adjust expected scan output?