On Fri, 4 Nov 2005, Richard Kenner wrote: > The following patch "fixes" this by imitating ref_contains_array_ref > semantics. Bootstrapped on x86_64-unknonw-linux-gnu, regtest in > progress, ok for mainline if it succeeds? > > Wouldn't this be simpler: > > static inline bool > ref_contains_indirect_ref (tree ref) > { > while (handled_component_p (ref)) > ref = TREE_OPERAND (ref, 0); > > return TREE_CODE (ref) == INDIRECT_REF; > }
Yes, this would work, if INDIRECT_REF can be only innermost, i.e. we are applying the predicate to GIMPLE trees only. Richard.