https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123542

--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The consistency check that we end up cloning for the expected value failed
because it expected a float 2 but got a double 2.  The following fixes it:

diff --git a/gcc/ipa-cp.cc b/gcc/ipa-cp.cc
index 9f61f682d58..d3869a62e8c 100644
--- a/gcc/ipa-cp.cc
+++ b/gcc/ipa-cp.cc
@@ -1628,7 +1628,7 @@ ipa_value_from_jfunc (class ipa_node_params *info, struct
ipa_jump_func *jfunc,
                      tree parm_type)
 {
   if (jfunc->type == IPA_JF_CONST)
-    return ipa_get_jf_constant (jfunc);
+    return ipacp_value_safe_for_type (parm_type, ipa_get_jf_constant (jfunc));
   else if (jfunc->type == IPA_JF_PASS_THROUGH
           || jfunc->type == IPA_JF_ANCESTOR)
     {

Reply via email to