> -----Original Message-----
> From: Alfie Richards <[email protected]>
> Sent: 24 June 2026 14:46
> To: [email protected]
> Cc: Alfie Richards <[email protected]>; [email protected]; Tamar
> Christina <[email protected]>; [email protected]; [email protected];
> [email protected]
> Subject: [PATCH v3 1/2] vect: add null check for ptr_incr optional in
> vect_create_data_ref_ptr
>
> gcc/ChangeLog:
>
> * tree-vect-data-refs.cc (vect_create_data_ref_ptr): Check for null
> pntr_incr.
OK.
Thanks,
Tamar
> ---
> gcc/tree-vect-data-refs.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
> index 3b27beb9c5b..6311e0d03df 100644
> --- a/gcc/tree-vect-data-refs.cc
> +++ b/gcc/tree-vect-data-refs.cc
> @@ -5878,7 +5878,8 @@ vect_create_data_ref_ptr (vec_info *vinfo,
> stmt_vec_info stmt_info,
> {
> gcc_assert (bb_vinfo);
> only_init = true;
> - *ptr_incr = NULL;
> + if (ptr_incr)
> + *ptr_incr = NULL;
> }
>
> /* Create an expression for the first address accessed by this load
> --
> 2.34.1