https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120929
--- Comment #23 from qinzhao at gcc dot gnu.org --- (In reply to Siddhesh Poyarekar from comment #21) > (In reply to Richard Biener from comment #20) > > so for > > > > _1 = _2; > > > > we merge from _2. For > > > > _1 = *_2; > > > > we _also_ merge from _2. But those are semantically not the same! > > Yes, it only "makes sense" in the context of .ACCESS_WITH_SIZE as Qing > originally conjectured, because .ACCESS_WITH_SIZE for _1 is stored in the > context of &_1. that's right, this propagation is NOT correct in general. It's only correct for the case when the pointers with counted_by attribute as you explained in the above. And this propagation is Needed for such cases to enable _bdos to use the counted_by information attached to pointer. > > > IMO this change was bogus and should be reverted. > > I'm testing a simple fix that constrains this to just .ACCESS_WITH_SIZE. > Hopefully that should avoid the need to revert. thanks a lot.