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]

[tree-ssa] unrecognizable insn (neg:SI (reg:DI ...))


Bug in the tree-ssa branch:

When the (preprocessed) program shown below is compiled with
     cc1 -O1 example.i
the compiler throws an internal error.

/* -------------- Begin ----------- */
int errno;

static inline void read (int fd, char * buf, long count)
{
  register long __arg1 asm("2") = (long)fd;
  register long __arg2 asm("3") = (long)buf;
  register long __arg3 asm("4") = (long)count;
  register long __res asm("2");

  __asm__ __volatile__ ( "    svc %b1\n" "    lgr  %0,2" : "=d" (__res) : "i" (3), "0" (__arg1), "d" (__arg2), "d" (__arg3) : "cc", "memory" );

  if ((unsigned long)(__res) >= (unsigned long)(-125)) {
    errno = -(__res);
  }
}

static void rd_load_image ()
{
  int i;
  char *buf;

  for (i=0; i < 3; i++) {
    read (42, buf, 1024);
  }
}
/* ------------ End ------------- */

The error message is:

 read rd_load_image
example.i: In function `rd_load_image':
example.i:25: error: unrecognizable insn:
(insn 48 75 50 3 0x40087440 (parallel [
            (set (reg:SI 49)
                (neg:SI (reg:DI 45)))
            (clobber (reg:CC 33 %cc))
        ]) -1 (nil)
    (expr_list:REG_DEAD (reg:DI 45)
        (expr_list:REG_UNUSED (reg:CC 33 %cc)
            (nil))))
example.i:25: internal compiler error: in extract_insn, at recog.c:2175
Please submit a full bug report,
with preprocessed source if appropriate.

-Mark



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