[backport gcc-4.9/trunk r201454 ] gcc/ 2013-08-02 Vladimir Makarov PR rtl-optimization/58048 * lra-constraints.c (process_alt_operands): Don't check asm operand on register. gcc/testsuite/ 2013-08-02 Vladimir Makarov PR rtl-optimization/58048 * gcc.target/i386/pr58048.c: New. --- gcc-4.8.1/gcc/lra-constraints.c.~1~ 2013-05-02 21:16:29.000000000 +0200 +++ gcc-4.8.1/gcc/lra-constraints.c 2013-08-03 11:59:18.009826860 +0200 @@ -1871,7 +1871,7 @@ process_alt_operands (int only_alternati /* For asms, verify that the class for this alternative is possible for the mode that is specified. */ - if (!no_regs_p && REG_P (op) && INSN_CODE (curr_insn) < 0) + if (!no_regs_p && INSN_CODE (curr_insn) < 0) { int i; for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) --- gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58048.c.~1~ 1970-01-01 01:00:00.000000000 +0100 +++ gcc-4.8.1/gcc/testsuite/gcc.target/i386/pr58048.c 2013-08-03 11:59:17.999826870 +0200 @@ -0,0 +1,11 @@ +/* PR target/58048 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void +div3 (void) +{ + double tmp1; + + asm volatile ("fscale":"=t" (tmp1):"0" (0), "u" (0)); /* { dg-error "inconsistent operand constraints in an 'asm'" } */ +}