Created attachment 26944 [details] Reduced testcase GMP cannot be compiled anymore on IA-64/Linux, the error being: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_redc_2 -O2 -pedantic -c redc_2.c -o redc_2.o redc_2.c: In function '__gmpn_redc_2': redc_2.c:87:7: error: 'asm' operand requires impossible reload redc_2.c:87:7: error: 'asm' operand requires impossible reload redc_2.c:87:7: error: 'asm' operand requires impossible reload redc_2.c:87:7: error: 'asm' operand requires impossible reload make[2]: *** [redc_2.lo] Error 1 The error is issued by this very old piece of code in reload_as_needed: /* If this was an ASM, make sure that all the reload insns we have generated are valid. If not, give an error and delete them. */ if (asm_noperands (PATTERN (insn)) >= 0) for (p = NEXT_INSN (prev); p != next; p = NEXT_INSN (p)) if (p != insn && INSN_P (p) && GET_CODE (PATTERN (p)) != USE && (recog_memoized (p) < 0 || (extract_insn (p), ! constrain_operands (1)))) { error_for_asm (insn, "%<asm%> operand requires " "impossible reload"); delete_insn (p); } Now it seems to overlook the case where the reload insns contain pseudos that didn't get hard regs and thus have equivalent memory references. They will be replaced by these memory references only _after_ reload_as_needed has run. Commenting out the piece code generates correct assembly AFAICS and the GMP testsuite is clean. But it seems quite astonishing that this issue has never surfaced until now (the code was added by Richard Kenner almost 20 years ago).
Dup of 48496.
Indeed, too bad the bug wasn't fixed. *** This bug has been marked as a duplicate of bug 48496 ***
While this is marked as duplicate of PR48496, the "fix" of PR48496 doesn't fix this bug.
Can this be re-opened please? I still get the error with gcc (GCC) 4.7.1 20120406 (prerelease) PR48496 only provided a work-around for this bug in the libffi code, it didn't actually fix the bug.
> Can this be re-opened please? I still get the error with > > gcc (GCC) 4.7.1 20120406 (prerelease) > > PR48496 only provided a work-around for this bug in the libffi code, it didn't > actually fix the bug. Sure, but it isn't marked as resolved so a fix will be provided there.