Verify range and pt_solution pointers
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap |
fail
|
Patch failed to apply
|
Commit Message
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?
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(-)
Comments
On Tue, Nov 3, 2026 at 5:15 PM Andrew MacLeod <amacleod@redhat.com> 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
>
@@ -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;