https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67133

--- Comment #23 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #21)
> OTOH users like infer_nonnull_range_by_attribute cannot rely on
> gimple_call_fntype being "compatible" with the actual call (like in
> terms of number of arguments).  So
> 
> lacks a check that idx < gimple_call_num_args.

And what would happen if the nonnull attribute refers to a different argument
that still satisfies the check? For example, fntype may have more arguments
than the call and the one marked as nonnull may still satisfy the check, yet
not be the actual argument that was marked as nonnull.

There must be a way to "fix" the attributes or mark them as not "compatible".
Asking "users" of the attributes to "guess" if the attributes are compatible
seems fragile.

Reply via email to