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 middle-end/46212] Segfault in reg_nonzero_bits_for_combine


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46212

--- Comment #3 from Ryan Mansfield <rmansfield at qnx dot com> 2010-10-28 18:45:10 UTC ---
Reduced testcase:

static __inline__ unsigned foo(void *__ptr) {
   unsigned __val = *(volatile unsigned *)(__ptr);
   return (((__val) >> 24) | (((__val) >> 8) & 0xff00) |  (((__val) & 0xff00)
<< 8) | ((__val) << 24));
}

void bar(void *dst, void *src, int pixels) {
  unsigned c;
  while (pixels--) {
   c = foo(src);
   *(unsigned *)dst = (c & 0xf80000) >> 9 | (c & 0xf800) >> 6 | (c & 0xf8) >> 3
| (c & 0x80000000) >> 16;
  }
}

Looks like the same bug. Sorry for the dup. I only searched bugzilla for PRs
about reg_nonzero_bits_for_combine.


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