https://gcc.gnu.org/g:80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010
commit r15-1345-g80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010 Author: Andrew MacLeod <amacl...@redhat.com> Date: Wed Jun 12 09:20:20 2024 -0400 Do not assume LHS of call is an ssa-name. gimple_range_fold makes an assumption that the LHS of a call is an ssa_name, which later in compilation may not be true. * gimple-range-fold.cc (fold_using_range::range_of_call): Ensure LHS is an SSA_NAME before invoking gimple_range_global. Diff: --- gcc/gimple-range-fold.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 6037c29ce11e..52fc3f2cb04a 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -1105,7 +1105,7 @@ fold_using_range::range_of_call (vrange &r, gcall *call, fur_source &) } // If there is an LHS, intersect that with what is known. - if (lhs) + if (gimple_range_ssa_p (lhs)) { Value_Range def (TREE_TYPE (lhs)); gimple_range_global (def, lhs);