This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/36350] New: GCC ICE with -frename-registers
- From: "raj dot khem at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2008 06:41:14 -0000
- Subject: [Bug c/36350] New: GCC ICE with -frename-registers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Attached sample (reduced from glibc cvs) caused gcc built from latest
gcc-4_3-branch to ICE on arm. It worked ok with gcc 4.2.2. If I removed
-frename-registers then the ICE would not happen.
Steps to reproduce
Compile as follows
arm-none-linux-gnueabi-gcc -c -O2 sample.c -frename-registers
sample.c: In function ?foo?:
sample.c:10: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
/* sample.c */
int foo () {
const unsigned char *inptr = 0;
unsigned char *outptr = 0;
unsigned int inval = (__extension__ ({ register unsigned int __bsx = (*(const
unsigned int *) inptr); ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) &
0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu)
<< 24)); }));
if (__builtin_expect (inval > 0x7fffffff, 0))
{
*((unsigned int *) outptr) = inval;
}
return 0;
}
--
Summary: GCC ICE with -frename-registers
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raj dot khem at gmail dot com
GCC build triplet: i686-linux
GCC host triplet: i686-linux
GCC target triplet: arm-none-linux-gnueabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36350