[Bug tree-optimization/95694] [9/10 Regression] ICE in trunc_int_for_mode, at explow.c:59 since r9-7156-g33579b59aaf02eb7

rsandifo at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 10 12:53:41 GMT 2020


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

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Just realised that this breaks bootstrap on arm-linux-gnueabihf.
I'd originally moved the zeroing of incorrect targets to
expand_expr_real_2, but then forgot why and undid it in the
name of going for the minimal fix.  The reason is/was code like:

      else if (target == 0)
        op0 = convert_to_mode (mode, op0,
                               TYPE_UNSIGNED (TREE_TYPE
                                              (treeop0)));
      else
        {
          convert_move (target, op0,
                        TYPE_UNSIGNED (TREE_TYPE (treeop0)));
          op0 = target;
        }

where we could convert to the mode of the supplied target
instead of “mode”.

Testing a fix.


More information about the Gcc-bugs mailing list