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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs