aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2024-06-12 09:20:20 -0400
committerAndrew MacLeod <amacleod@redhat.com>2024-06-14 15:16:38 -0400
commit80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010 (patch)
treeded7b51d1fe4bb599931a4c1ad991c3b8cb927c9 /gcc
parent1bb2535c7cb279e6aab731e79080d8486dd50cce (diff)
downloadgcc-80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010.zip
gcc-80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010.tar.gz
gcc-80c6b6a21b5d3e4f7c5fddbe88e344b608ffb010.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gimple-range-fold.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc
index 6037c29..52fc3f2 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);