[LLVMbugs] [Bug 22941] New: [asm inline] integer template parameter as immediate 'I' expects an integer constant

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 17 09:39:25 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=22941

            Bug ID: 22941
           Summary: [asm inline] integer template parameter as immediate
                    'I' expects an integer constant
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gravemind2a at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This compiles on gcc 4.9.2, and used to compile on clang 3.5:

template <int N>
void    test(int value)
{
    asm("rol %1, %0" :"=r"(value): "I"(N + 1));
}
int        main()
{
    test<2>(10);
}

Now with clang version 3.6.0 (tags/RELEASE_360/final), I get:

asmimm.cpp:5:37: error: constraint 'I' expects an integer constant expression
        asm("rol %1, %0" :"=r"(value): "I"(N + 1));

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150317/3fac4b0c/attachment.html>


More information about the llvm-bugs mailing list