http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Bug #: 52294 Summary: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: b...@arklinux.org Created attachment 26693 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26693 Preprocessed source triggering this issue [bero@localhost ~]$ /opt/android-toolchain-4.7/bin/arm-linux-androideabi-g++ -mcpu=cortex-a9 -mthumb -Os -o agc2_amr_wb.o -c agc2_amr_wb.i /tmp/ccBg0Qr8.s: Assembler messages: /tmp/ccBg0Qr8.s:110: Error: branch out of range The problem disappears when taking out -mcpu=cortex-a9 or replacing -Os with any other optimization level. Reproducable with arm-linux-androideabi, arm-eabi and arm-linux-gnueabi compilers.