> On Mon, 17 Jun 2019, Jan Hubicka wrote: > > > > > > > get_alias_set already handles VCEs properly. Btw I've said > > > > I see - i keep thinking of get_alias_set as a simple accessor to type's > > alias set which it is not. It may make sense to separate these two > > later. > > > > > BIT_FIELD_REF has the same issue but you didn't include that > > > case below. > > > > Sorry, missed that in your reply. I am testing the fix. > > > > What about aliasing_component_refs. When I have VCE in the the path, > > I suppose I do not want to consider the stuff after VCE as part of path > > and also while testing whether one path can be continuation from other > > I want to start from outermost VCE rather than ref_type, right? > > Yeah, when searching for base1/2 you want to initialize ref1/2p > like > > while (handled_component_p (base1)) > { > if (TREE_CODE (base1) == VIEW_CONVERT_EXPR > || TREE_CODE (base1) == BIT_FIELD_REF) > ref1p = &TREE_OPERAND (base1, 0); > base1 = TREE_OPERAND (base1, 0); > } > > and then instead of refp = &ref1/2 do refp = ref1/2p for the searches. > > So not use the type of the innermost(!) VIEW_CONVERT_EXPR but its > base (same for BIT_FIELD_REF).
Yep, that is what I had in mind. I will test the patch. Also will remove the ref pointers - we always just read them. Thanks, Honza