From: Andrew MacLeod Date: Fri, 9 Jun 2023 14:17:59 +0000 (-0400) Subject: Also check type being cast to X-Git-Tag: basepoints/gcc-15~8477 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5612aa4d06594166c0ee848dc733bb9458c1bdbf;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/ipa-prop.cc b/gcc/ipa-prop.cc index ab6de9f10da9..4e9a307ad4dd 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 ()) {