Hi! On Tue, Feb 11, 2014 at 09:43:52PM +0100, Jan Hubicka wrote: > *************** record_targets_from_bases (tree otr_type > *** 1286,1292 **** > HOST_WIDE_INT otr_token, > tree outer_type, > HOST_WIDE_INT offset, > ! vec <cgraph_node *> nodes, > pointer_set_t *inserted, > pointer_set_t *matched_vtables, > bool *completep) > --- 1318,1324 ---- > HOST_WIDE_INT otr_token, > tree outer_type, > HOST_WIDE_INT offset, > ! vec <cgraph_node *> &nodes, > pointer_set_t *inserted, > pointer_set_t *matched_vtables, > bool *completep)
I think this change (which has not been mentioned in the ChangeLog BTW) has fixed PR59737. I've committed the following testcase as obvious in order to close the PR. 2014-02-12 Jakub Jelinek <ja...@redhat.com> PR middle-end/59737 * g++.dg/ipa/pr59737.C: New test. --- gcc/testsuite/g++.dg/ipa/pr59737.C.jj 2014-02-12 17:47:28.123297799 +0100 +++ gcc/testsuite/g++.dg/ipa/pr59737.C 2014-02-12 17:44:43.000000000 +0100 @@ -0,0 +1,48 @@ +// PR middle-end/59737 +// { dg-do compile } +// { dg-options "-O2" } + +struct A +{ + virtual void foo (int &x); + friend void + operator>> (int &x, A &y) + { + y.foo (x); + } +}; + +struct B : public A +{ + void foo (int &x); +}; + +struct F : public B +{ + void foo (int &x); +}; + +struct G : public F +{ + void foo (int &); +}; + +struct C : A +{ + void foo (int &); + struct H : public G + { + void foo (int &); + }; + struct D : A + { + H d; + }; +}; + +void +C::foo (int &x) +{ + D a; + x >> a.d; +} Jakub