[cfe-commits] r65256 - in /cfe/trunk: lib/Sema/SemaStmt.cpp test/CodeGen/asm.c
Anders Carlsson
andersca at mac.com
Sat Feb 21 18:11:26 PST 2009
Author: andersca
Date: Sat Feb 21 20:11:23 2009
New Revision: 65256
URL: http://llvm.org/viewvc/llvm-project?rev=65256&view=rev
Log:
Match gcc and always perform array/function conversion for asm input exprs. Fixes PR3641.
Modified:
cfe/trunk/lib/Sema/SemaStmt.cpp
cfe/trunk/test/CodeGen/asm.c
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=65256&r1=65255&r2=65256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sat Feb 21 20:11:23 2009
@@ -915,9 +915,9 @@
<< InputExpr->getType() << InputConstraint
<< InputExpr->getSubExpr()->getSourceRange());
}
-
- DefaultFunctionArrayConversion(Exprs[i]);
}
+
+ DefaultFunctionArrayConversion(Exprs[i]);
}
// Check that the clobbers are valid.
Modified: cfe/trunk/test/CodeGen/asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/asm.c?rev=65256&r1=65255&r2=65256&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/asm.c (original)
+++ cfe/trunk/test/CodeGen/asm.c Sat Feb 21 20:11:23 2009
@@ -27,3 +27,9 @@
{
asm("nop" : "=r"(i) : "0"(t5));
}
+
+// PR3641
+void t6(void)
+{
+ __asm__ volatile("" : : "i" (t6));
+}
More information about the cfe-commits
mailing list