]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Also check type being cast to
authorAndrew MacLeod <amacleod@redhat.com>
Fri, 9 Jun 2023 14:17:59 +0000 (10:17 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 9 Jun 2023 16:31:20 +0000 (12:31 -0400)
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.

gcc/ipa-prop.cc

index ab6de9f10da9f5d1b687da12f6eb4b936e894728..4e9a307ad4dd9d26af67c4131df18777518a5d11 100644 (file)
@@ -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 ())
            {