Comment 2 for bug 771903

Revision history for this message
Michael Hope (michaelh1) wrote :

Thank you for the bug report. I've confirmed this with gcc-linaro-4.5-2011.04-0 on ARM:

michaelh@ursa1:~/linaro/bugs$ /tools/toolchains/arch/armv7l/gcc-linaro-4.5-2011.04-0-armv7l-maverick-cbuild112-ursa3-cortexa8r1/bin/gcc -O3 -c arm_bit_extract.c
/tmp/ccl0OX6a.s: Assembler messages:
/tmp/ccl0OX6a.s:97: Error: bit-field extends past end of register -- `ubfx r0,r0,#30,#10'

The assembler is correct - the instruction attempts to extract bits 30 to 39 from a 32 bit register.

The fault also exists in gcc-4.5.2. It does not exist in gcc-4.6.0. Could you please also report this in GCC bugzilla and attach it to this ticket?

I've set it to low priority as it is a ftbfs, occurs at high optimisation levels, the fault exists upstream, and the code uses undefined behavior by shifting by a negative amount.