On Tue, Nov 3, 2026 at 5:15 PM Andrew MacLeod <[email protected]> wrote:
>
> verify_ssa should check the range for prange as well now in addition to the
> pt_solution field. Turns out frange wasn't being verified either.
>
> Bootstraps on x86_64-pc-linux-gnu with no regressions. OK for trunk?
OK.
> Andrew
> ------------------------
>
>
>
> The current ssa-name verifier is not checking frange nor prange, and
> can now verify pt_solution seperately.
>
> * tree-ssa.cc (verify_ssa): Verify ranges and pt_solution.
> ---
> gcc/tree-ssa.cc | 23 ++++++++++++++++++-----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/gcc/tree-ssa.cc b/gcc/tree-ssa.cc
> index 1be5290c85f..e1c15283e5c 100644
> --- a/gcc/tree-ssa.cc
> +++ b/gcc/tree-ssa.cc
> @@ -1093,11 +1093,24 @@ verify_ssa (bool check_modified_stmt, bool
> check_ssa_operands)
> goto err;
> }
>
> - const void *info = NULL;
> - if (POINTER_TYPE_P (TREE_TYPE (name)))
> - info = ssa_name_pt_solution (name);
> - else if (INTEGRAL_TYPE_P (TREE_TYPE (name)))
> - info = SSA_NAME_RANGE_INFO (name);
> + const pt_solution *pt_info = ssa_name_pt_solution (name);
> + if (pt_info)
> + {
> + bool existed;
> + tree &val = ssa_info.get_or_insert (pt_info, &existed);
> + if (existed)
> + {
> + error ("shared SSA name pt_solution info");
> + print_generic_expr (stderr, val);
> + fprintf (stderr, " and ");
> + print_generic_expr (stderr, name);
> + fprintf (stderr, "\n");
> + goto err;
> + }
> + else
> + val = name;
> + }
> + const void *info = SSA_NAME_RANGE_INFO (name);
> if (info)
> {
> bool existed;
> --
> 2.56.0
>