From: Andrew MacLeod Date: Wed, 12 Jun 2024 13:20:20 +0000 (-0400) Subject: Do not assume LHS of call is an ssa-name. X-Git-Tag: basepoints/gcc-16~8208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010;p=thirdparty%2Fgcc.git 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 --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 6037c29ce11..52fc3f2cb04 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);