Bug 20582

Summary: ip2k-elf doesn't build
Product: gcc Reporter: Kazu Hirata <kazu>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: normal CC: denisc, gcc-bugs, pinskia
Priority: P2 Keywords: build, ice-on-valid-code
Version: 4.1.0   
Target Milestone: 4.1.0   
Host: Target: ip2k-elf
Build: Known to work:
Known to fail: Last reconfirmed: 2005-03-26 18:42:21

Description Kazu Hirata 2005-03-21 22:01:17 UTC
ip2k-elf doesn't build.  The build process fails while building gcc.
Specifically, __gcc_bcmp hits an ICE like so:

/home/kazu/gnu/gcc/gcc-develop/gcc/gcc/libgcc2.c: In function $-1ער__gcc_bcmpעש:
/home/kazu/gnu/gcc/gcc-develop/gcc/gcc/libgcc2.c:1797: error: insn does not
satisfy its constraints:
(insn 120 42 103 3 /home/kazu/gnu/gcc/gcc-develop/gcc/gcc/libgcc2.c:1793 (set
(reg:HI 128 $80 [orig:280 D.1980 ] [280])
        (minus:HI (reg:HI 136 $88 [orig:285 c1 ] [285])
            (zero_extend:HI (reg/v:QI 128 $80 [orig:278 c2 ] [278])))) 48
{*subhi3_nonimm_zero_extend} (nil)
    (expr_list:REG_DEAD (reg:HI 136 $88 [orig:285 c1 ] [285])
        (nil)))
/home/kazu/gnu/gcc/gcc-develop/gcc/gcc/libgcc2.c:1797: internal compiler error:
in copyprop_hardreg_forward_1, at regrename.c:1570
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Here is a testcase, derived from a preprocessed source.

typedef unsigned int size_t;

int
__gcc_bcmp (const unsigned char *s1, const unsigned char *s2, size_t size)
{
  while (size > 0)
    {
      const unsigned char c1 = *s1++, c2 = *s2++;
      if (c1 != c2)
	return c1 - c2;
      size--;
    }
  return 0;
}
Comment 1 Andrew Pinski 2005-07-20 06:44:24 UTC
Closing as will not fix as this target has been removed from the mainline for 4.1.0.