[Bug middle-end/105533] UBSAN: gcc/expmed.cc:3272:26: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long int'
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 31 03:32:38 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105533
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
Target| |x86_64-pc-linux-gnu
Host|x86_64-pc-linux-gnu |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
choose_mult_variant (machine_mode mode, HOST_WIDE_INT val,
...
synth_mult (&alg2, val - 1, &limit, mode);
But slsr should not be processing any of these IR I don't think.
_7 = _4 * Inf;
c$imag_8 = (long intD.8) _7;
# VUSE <.MEM_16>
i.1_9 = iD.1980;
# RANGE [-2147483648, 2147483647]
_10 = (long intD.8) i.1_9;
c$real_23 = c$real_6 * _10;
c$imag_24 = c$imag_8 * _10;
Huh? This does not make sense at all.
float _4;
float _7;
if (tree_fits_shwi_p (rhs2))
return mult_by_coeff_cost (tree_to_shwi (rhs2), lhs_mode, speed);
But I don't see that even call that.
bool
tree_fits_shwi_p (const_tree t)
{
return (t != NULL_TREE
&& TREE_CODE (t) == INTEGER_CST
&& wi::fits_shwi_p (wi::to_widest (t)));
}
More information about the Gcc-bugs
mailing list