> Ah, no. We _did_ that in CCP but now we only adjust the OBJ_TYPE_REF > expr in CCP and defer to fold_stmt to eventually "devirtualize" it. > See PR45878. Then rev.165435 was necessary, as we dropped OBJ_TYPE_REF > for the non-devirtualized call as well. As both cases were because
Hmm, sounds slipperly. In any case OBJ_TYPE_REF of constant argument should be banned, or we would need to extend gimple_call_fndecl to return contained fndecl. Devirtualization without enabling an inlining is essentially useless transform and it is precisely what we do now on this testcase... > of type conversion issues this should be fixed with separating the > call function type as we do now. > > I'll look into handling copyprop and FRE similarly. Thanks, I would not even mind having some automatic check that the constant OBJ_TYPE_REFs don't leak at cgraph edge construction time... Honza > > Richard.