aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-06-09 10:17:59 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-06-09 12:31:20 -0400
commit5612aa4d06594166c0ee848dc733bb9458c1bdbf (patch)
tree2acb5e5caf73b748f35194189c7cb63914c92034
parentc570818b436fde04bbb86755601c741711fd72a0 (diff)
downloadgcc-5612aa4d06594166c0ee848dc733bb9458c1bdbf.zip
gcc-5612aa4d06594166c0ee848dc733bb9458c1bdbf.tar.gz
gcc-5612aa4d06594166c0ee848dc733bb9458c1bdbf.tar.bz2
Also check type being cast to
before casting into an irange, make sure the type being cast into is also supported. PR ipa/109886 * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Check param type as well.
-rw-r--r--gcc/ipa-prop.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc
index ab6de9f..4e9a307 100644
--- a/gcc/ipa-prop.cc
+++ b/gcc/ipa-prop.cc
@@ -2405,6 +2405,7 @@ ipa_compute_jump_functions_for_edge (struct ipa_func_body_info *fbi,
of this file uses value_range's, which only hold
integers and pointers. */
&& irange::supports_p (TREE_TYPE (arg))
+ && irange::supports_p (param_type)
&& get_range_query (cfun)->range_of_expr (vr, arg)
&& !vr.undefined_p ())
{