[LLVMbugs] [Bug 3788] New: asm inline : support casting on input operand
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Mar 11 12:57:43 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=3788
Summary: asm inline : support casting on input operand
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: castet.matthieu at free.fr
CC: llvmbugs at cs.uiuc.edu
Hi :
$ cat /tmp/p.c
int foo()
{
int a;
asm("nop"
:
: "m"((int)(a))
);
}
$ ./llvm/tools/clang/tools/ccc/ccc /tmp/p.c -c -o /tmp/p.o
/tmp/p.c:6:10: error: invalid lvalue in asm input for constraint 'm'
: "m"((int)(a))
^~~~~~~~
1 diagnostic generated.
The casting should be the same thing than doing :
int foo()
{
int a;
int tmp = a;
asm("nop"
:
: "m"(tmp)
);
}
--
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