http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48803
Summary: arm: Bad assembler produced by bit extract/shift Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: david.gilb...@linaro.org Created attachment 24123 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24123 Produces bad assembler This was originally reported as Linaro-gcc bug in Launchpad here: https://bugs.launchpad.net/gcc-linaro/+bug/771903 The attached small test case fails with the assembler error: gcc -O3 arm_bit_extract.c /tmp/ccOOK26S.s: Assembler messages: /tmp/ccOOK26S.s:97: Error: bit-field extends past end of register -- `ubfx r0,r0,#30,#10' when compiled -O3 for ARMv7 on Ubuntu's gcc 4.5.2-8ubuntu1. I'm told it also fails on vanilla 4.5.2 The shift that the source is trying to do is a bit bogus, however it shouldn't produce bad assembler. Dave