This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46212] Segfault in reg_nonzero_bits_for_combine
- From: "rmansfield at qnx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Oct 2010 18:45:18 +0000
- Subject: [Bug middle-end/46212] Segfault in reg_nonzero_bits_for_combine
- Auto-submitted: auto-generated
- References: <bug-46212-4@http.gcc.gnu.org/bugzilla/>
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.