> Hi > > in a patch I work on I store ipa_polymorphic_call_contexts in a vector > and thus they do not get properly constructed, merely memset to zero. > This means that I happen to be using "know nothing" contexts which > have their outer_type set to NULL but the various flags are also > false, unlike in the properly constructed ones. > > When I pass such context to possible_polymorphic_call_targets, I get > wrong complete results of size one because it sets the outer_type to > otr_type but leaves the maybe_derived_type flag cleared. So I changed > the function to reset the context using clear_outer_type(otr_type) > instead, which I believe is the proper way of doing it. However, I > had to make that method public to do so. > > Bootstrapped and tested on x86_64-linux. OK for trunk? > > Thanks, > > Martin > > > 2014-11-08 Martin Jambor <mjam...@suse.cz> > > * cgraph.h (clear_outer_type): Make public. Fix comment. > * ipa-devirt.c (possible_polymorphic_call_targets): Use
Hmm, it is kind of hack (it would be better to avoid using malformed contextes around) but OK. Honza