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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-04-21
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |segher at gcc dot gnu.org
   Target Milestone|---                         |10.4
           Priority|P3                          |P2

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

#1  0x000000000142c6af in simplify_context::simplify_subreg (
    this=0x7fffffffb3b8, outermode=E_SImode, op=0x7ffff668b5d0, 
    innermode=E_VOIDmode, byte=...)
(gdb) p debug_rtx( op)
(const_wide_int 0x0fffffffffffffffe)

(gdb) bt
#0  fancy_abort (
    file=0x2e7a200 "/home/rguenther/src/gcc3/gcc/simplify-rtx.cc", line=7346, 
    function=0x2e7e100 <simplify_context::simplify_subreg(machine_mode,
rtx_def*, machine_mode, poly_int<1u, unsigned long>)::__FUNCTION__>
"simplify_subreg")
    at /home/rguenther/src/gcc3/gcc/diagnostic.cc:2024
#1  0x000000000142c6af in simplify_context::simplify_subreg (
    this=0x7fffffffb3b8, outermode=E_SImode, op=0x7ffff668b5d0, 
    innermode=E_VOIDmode, byte=...)
    at /home/rguenther/src/gcc3/gcc/simplify-rtx.cc:7346
#2  0x000000000142cf56 in simplify_context::simplify_subreg (
    this=0x7fffffffb3b8, outermode=E_SImode, op=0x7ffff668b660, 
    innermode=E_DImode, byte=...)
    at /home/rguenther/src/gcc3/gcc/simplify-rtx.cc:7444
#3  0x000000000142dfd9 in simplify_context::simplify_gen_subreg (
    this=0x7fffffffb3b8, outermode=E_SImode, op=0x7ffff668b660, 
    innermode=E_DImode, byte=...)
    at /home/rguenther/src/gcc3/gcc/simplify-rtx.cc:7624
...
#7  0x00000000028becb7 in gen_lowpart_for_combine (omode=E_SImode, 
    x=0x7ffff668b660) at /home/rguenther/src/gcc3/gcc/combine.cc:11684
11684     result = gen_lowpart_common (omode, x);
#8  0x0000000001410622 in simplify_context::simplify_unary_operation_1 (
    this=0x7fffffffc988, code=TRUNCATE, mode=E_SImode, op=0x7ffff668b660)
    at /home/rguenther/src/gcc3/gcc/simplify-rtx.cc:1243

which does

      if (GET_MODE (op) != VOIDmode)
        {
          temp = simplify_truncation (mode, op, GET_MODE (op));
          if (temp)
            return temp;
        }

      /* If we know that the value is already truncated, we can
         replace the TRUNCATE with a SUBREG.  */
      if (known_eq (GET_MODE_NUNITS (mode), 1)
          && (TRULY_NOOP_TRUNCATION_MODES_P (mode, GET_MODE (op))
              || truncated_to_mode (mode, op)))
        {
          temp = rtl_hooks.gen_lowpart_no_emit (mode, op);

so we know 'op' is VOIDmode here but gen_lowpart_for_combine isn't
prepared for this?

Reply via email to