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; }
My arm-none-linux-gnueabi-gcc with the patch from bug 35964 does not suffer this ICE. This is also why Debian/Ubuntu/Fedora do not see this, because they have the referenced patch applied on top of gcc-4_3-branch.
4.3.1 is being released, adjusting target milestone.
4.3.2 is released, changing milestones to 4.3.3.
CCing ARM maintainers so they can confirm the bug and look at its relation to PR35964.
Indeed, a DUP of PR35964 (which isn't marked as 4.3 regression though). http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137235 backport fixes this on 4.3 branch, on the trunk I cannot reproduce on the given testcase even with that change reverted. Andrew, do you plan to backport this fix to 4.3 branch?
GCC 4.3.3 is being released, adjusting target milestone.
This is now fixed with the fix for PR35964 which was a backport of the patch mentioned in comment #5 *** This bug has been marked as a duplicate of 36964 ***
Reopened because of a typo in the closing comment.
It's a dup of 35964 *** This bug has been marked as a duplicate of 35964 ***