This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/79636] New: ICE in assign_by_spills, at lra-assigns.c:1457


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

            Bug ID: 79636
           Summary: ICE in assign_by_spills, at lra-assigns.c:1457
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With -O0 for versions down to at least 4.8 (on x86_64 GNU/Linux)
and file ./gcc/testsuite/gcc.target/i386/pr65693.c


$ cat pr65693.c
int a;

void
foo (int (*fn) (int, int, int), unsigned int b)
{
  unsigned long *c = (unsigned long *) __builtin_alloca (b);
  a = *c;
  register int d asm ("edx") = fn (0, 0, d);
}


$ gcc-7-20170219 -O1 -c pr65693.c
$ gcc-7-20170219 -O0 -c pr65693.c
pr65693.c: In function 'foo':
pr65693.c:9:1: error: unable to find a register to spill
 }
 ^
pr65693.c:9:1: error: this is the insn:
(insn 11 35 12 2 (parallel [
            (set (reg:DI 96)
                (udiv:DI (reg:DI 94)
                    (reg:DI 106)))
            (set (reg:DI 107 [97])
                (umod:DI (reg:DI 94)
                    (reg:DI 106)))
            (clobber (reg:CC 17 flags))
        ]) "pr65693.c":6 368 {*udivmoddi4}
     (expr_list:REG_UNUSED (reg:DI 107 [97])
        (expr_list:REG_DEAD (reg:DI 106)
            (expr_list:REG_DEAD (reg:DI 94)
                (expr_list:REG_UNUSED (reg:CC 17 flags)
                    (nil))))))
pr65693.c:9:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1457
0xb8a8a8 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        ../../gcc/rtl-error.c:108
0xa79431 assign_by_spills
        ../../gcc/lra-assigns.c:1457
0xa79b4e lra_assign()
        ../../gcc/lra-assigns.c:1643
0xa751a6 lra(_IO_FILE*)
        ../../gcc/lra.c:2451
0xa2b339 do_reload
        ../../gcc/ira.c:5452
0xa2b339 execute
        ../../gcc/ira.c:5636

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]