https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65304
Bug ID: 65304 Summary: [4.9] [ARM] incorrect "asm operand has impossible constraints" error Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: cbaylis at gcc dot gnu.org Target: arm-unknown-linux-gnueabihf Created attachment 34940 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34940&action=edit Original test case The attached test case, and reduced variant result in an error: "asm operand has impossible constraints". This is a regression since 4.8. $ arm-unknown-linux-gnueabihf-gcc -O2 -S orig.c -mbig-endian -mthumb -march=armv7-a -mtune=cortex-a8 orig.c: In function ‘rpc_print_iostats’: orig.c:169:4: error: ‘asm’ operand has impossible constraints asm ( "umlal %R0, %Q0, %R2, %Q3\n\t" \ ^ orig.c:215:2: note: in expansion of macro ‘do_div’ do_div(t, 1000000); ^ ----- or $ arm-unknown-linux-gnueabihf-gcc -O2 -S reduced.c -mbig-endian -mthumb -march=armv7-a -mtune=cortex-a8 reduced.c: In function ‘fn2’: reduced.c:26:7: error: ‘asm’ operand has impossible constraints asm(" @asm2 %R0 %Q0 %R1 %R2 %Q2 %R3 %Q3" : "+&r"(n), "+&r"(q) : "r"(o), "r"(p)); ^ This does not occur on trunk, due to commit r209615: 2014-04-22 Ramana Radhakrishnan <ramana.radhakrish...@arm.com> * config/arm/arm.c (arm_hard_regno_mode_ok): Loosen restrictions on core registers for DImode values in Thumb2. However, since similar restrictions still exist in ARM state, it is possible that there remains a latent bug on trunk. This bug was originally reported in Linaro bugzilla https://bugs.linaro.org/show_bug.cgi?id=1199