[LLVMbugs] [Bug 7869] New: clang issues spurious errors on input/output constraints of an inline asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 10 17:02:41 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7869

           Summary: clang issues spurious errors on input/output
                    constraints of an inline asm
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: fjahanian at apple.com
                CC: llvmbugs at cs.uiuc.edu


This broke sometimes today in clang's TOT:

% cat pr20314-2.c
int a, b, c, d, e, f, g, h, i, j, k, l;

void
f1 (void)
{
  __asm__ volatile (""
            : [a] "+r" (a), [b] "+r" (b), [c] "+r" (c), [d] "+r" (d),
              [e] "+r" (e), [f] "+r" (f), [g] "+r" (g), [h] "+r" (h),
              [i] "+r" (i), [j] "+r" (j), [k] "+r" (k), [l] "+r" (l));
}

void
f2 (void)
{
  __asm__ volatile (""
            : [a] "+r,m" (a), [b] "+r,m" (b), [c] "+r,m" (c), [d] "+r,m" (d),
              [e] "+r,m" (e), [f] "+r,m" (f), [g] "+r,m" (g), [h] "+r,m" (h),
              [i] "+r,m" (i), [j] "+r,m" (j), [k] "+r,m" (k), [l] "+r,m" (l));
}

void
f3 (void)
{
  __asm__ volatile (""
            : [a] "=r" (a), [b] "=r" (b), [c] "=r" (c), [d] "=r" (d),
              [e] "=r" (e), [f] "=r" (f), [g] "=r" (g), [h] "=r" (h),
              [i] "=r" (i), [j] "=r" (j), [k] "=r" (k), [l] "=r" (l)
            : "[a]" (a), "[b]" (b), "[c]" (c), "[d]" (d),
              "[e]" (e), "[f]" (f), "[g]" (g), "[h]" (h),
              "[i]" (i), "[j]" (j), "[k]" (k), "[l]" (l));
}

void
f4 (void)
{
  __asm__ volatile (""
            : [a] "=r,m" (a), [b] "=r,m" (b), [c] "=r,m" (c), [d] "=r,m" (d),
              [e] "=r,m" (e), [f] "=r,m" (f), [g] "=r,m" (g), [h] "=r,m" (h),
              [i] "=r,m" (i), [j] "=r,m" (j), [k] "=r,m" (k), [l] "=r,m" (l)
            : "[a],m" (a), "[b],m" (b), "[c],m" (c), "[d],m" (d),
              "[e],m" (e), "[f],m" (f), "[g],m" (g), "[h],m" (h),
              "[i],m" (i), "[j],m" (j), "[k],m" (k), "[l],m" (l));
}


% c;ang -c pr20314-2.c
pr20314-2.c:16:13: error: invalid output constraint '+r,m' in asm
                    : [a] "+r,m" (a), [b] "+r,m" (b), [c] "+r,m" (c), [d]
"+r,m" (d),
                          ^
pr20314-2.c:37:13: error: invalid output constraint '=r,m' in asm
                    : [a] "=r,m" (a), [b] "=r,m" (b), [c] "=r,m" (c), [d]
"=r,m" (d),
                          ^
2 errors generated.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list