remove bogus asserts in expr.c
diff mbox series

Message ID 002e01d5d075$d6c93800$845ba800$@franke.ms
State New
Headers show
Series
  • remove bogus asserts in expr.c
Related show

Commit Message

Stefan Franke Jan. 21, 2020, 4:14 p.m. UTC
If running "make check-gcc" with -mcpu=m68040 you get an internal compiler
error during the combine pass in expr.c since there are checks at lines
4107/4108 which seem to be not reasonable.

It combines 

(insn 8 5 9 2 (parallel [
            (set (reg:SI 41)
                (udiv:SI (reg/v:SI 38 [ x ])
                    (reg/v:SI 39 [ y ])))
            (set (reg:SI 42)
                (umod:SI (reg/v:SI 38 [ x ])
                    (reg/v:SI 39 [ y ])))
        ]) "../gcc/gcc/testsuite/gcc.c-torture/execute/20021120-3.c":14:3
493 {*divu}
     (expr_list:REG_UNUSED (reg:SI 42)
        (nil)))
(insn 9 8 10 2 (set (mem:SI (pre_dec:SI (reg/f:SI 15 %sp)) [2  S4 A16])
        (reg:SI 41))
"../gcc/gcc/testsuite/gcc.c-torture/execute/20021120-3.c":14:3 106
{*movsi_m68k2}
     (expr_list:REG_DEAD (reg:SI 41)
        (expr_list:REG_ARGS_SIZE (const_int 4 [0x4])
            (nil))))


The combine pass creates a parallel insn with auto inc, which is resolved
during reload to valid insns again.

This patch removes these checks, since they aren't helpful.


Stefan

========================
        return 0;

Patch
diff mbox series

--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1,5 +1,5 @@ 
 /* Convert tree expression to rtl instructions, for GNU compiler.
-   Copyright (C) 1988-2019 Free Software Foundation, Inc.
+   Copyright (C) 1988-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -4103,10 +4103,6 @@  find_args_size_adjust (rtx_insn *insn)
          if (dest == stack_pointer_rtx)
            break;
 
-         /* We do not expect an auto-inc of the sp in the parallel.  */
-         gcc_checking_assert (mem_autoinc_base (dest) !=
stack_pointer_rtx);
-         gcc_checking_assert (mem_autoinc_base (SET_SRC (set))
-                              != stack_pointer_rtx);
        }
       if (i < 0)