https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113372
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #14)
> Created attachment 57085 [details]
> gcc14-pr113372.patch
>
> The non-propagation workaround which seems to fix^H^H^Hworkaround all those
> 4 issues (PR90348 testcase actually doesn't FAIL anymore, but I've verified
> the patch results in in and buf no longer being shared) can look like this.
+ || (INTEGRAL_TYPE_P (TREE_TYPE (use))
+ && TYPE_PRECISION (TREE_TYPE (use)) == POINTER_SIZE)))
ptrofftype_p (TREE_TYPE (use))
+ {
+ gimple *g = SSA_NAME_DEF_STMT (use);
+ if (is_gimple_assign (g))
+ for (unsigned i = 1; i < gimple_num_ops (g); ++i)
+ {
+ tree op = gimple_op (g, i);
+ if (op && TREE_CODE (op) == ADDR_EXPR)
I think it should be enough to look at gimple_assing_rhs1, that works
for single non-invariant &a[i], for conversions and for offsetting of
an invariant address (pointer-plus).
I'd say OK with those changes.