/* { dg-do compile } */
/* { dg-options "-O2 -fpic" { target fpic } } */

int f0 (int, int, int, int, int);
int f1 (void);

void
f2 (void)
{
  unsigned v1, v2, v3, v4;
  __asm__ ("" : "=a" (v1), "=d" (v2), "=c" (v3), "=r" (v4));
  f0 (f1 (), f1 (), f1 (), f1 (), (v4 >> 8) & 0xff);
}
used to compile with -m32 -O2 -fpic in 4.3, but starting with 4.4 fails with:
/tmp/u.c: In function 'void f2()':
/tmp/u.c:11:60: error: can't find a register in class 'CLOBBERED_REGS' while
reloading 'asm'
/tmp/u.c:11:60: error: 'asm' operand has impossible constraints

while it should be fine to use esi or edi for that.


-- 
           Summary: [4.4/4.5/4.6 Regression] can't find a register in class
                    'CLOBBERED_REGS' while reloading 'asm'
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: i686-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44174

Reply via email to