https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63762
Bug ID: 63762 Summary: [ARM]GCC generates UNPREDICTABLE STR with Rn = Rt when hard-float abi is used Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: renlin.li at arm dot com CC: marcus.shawcroft at arm dot com, ramana.radhakrishnan at arm dot com Target: arm* Created attachment 33910 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33910&action=edit test case This was reported on a public mailing list on 2014-10-25: http://lists.debian.org/debian-arm/2014/10/msg00057.html The problem is reproducible with a recent FSF compiler: $arm-none-eabi-gcc -mfloat-abi=hard -O2 -c unpreditable-str.c or $arm-none-linux-gnueabihf-gcc -O2 -c unpreditable-str.c /tmp/ccWQsFwY.s: Assembler messages: /tmp/ccWQsFwY.s:176: Warning: source register same as write-back base In this case the assembler is giving a warning rather than an error but the instruction ("str r2, [r2], #4" in this case) is UNPREDICTABLE.