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

             Bug #: 56148
           Summary: [4.8 Regression] inline asm matching constraint with
                    different mode
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ja...@gcc.gnu.org


void
foo (void)
{
  unsigned char e[16];
  unsigned long a, b, c, d;
  __asm__ __volatile__ ("" : "=d" (a), "=&c" (c), "=&D" (d), "=&a" (b)
               : "0" (-1U), "mr" (e), "1" (128 >> 5), "2" (e), "3" (-1U));
}

is rejected since LRA merge on x86_64-linux at -O2:
rh905862.i: In function ‘foo’:
rh905862.i:6:3: error: ‘asm’ operand has impossible constraints
   __asm__ __volatile__ ("" : "=d" (a), "=&c" (c), "=&D" (d), "=&a" (b)
   ^

The testcase is questionable, because a, c and b are DImode, while -1U, 128 >>
5
and -1U are all SImode using 0/1/3 constraints matching those DImodes.
But we accept it with reload or with -O0 even with LRA.

Reply via email to