]> granicus.if.org Git - clang/commitdiff
Match gcc and always perform array/function conversion for asm input exprs. Fixes...
authorAnders Carlsson <andersca@mac.com>
Sun, 22 Feb 2009 02:11:23 +0000 (02:11 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 22 Feb 2009 02:11:23 +0000 (02:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65256 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmt.cpp
test/CodeGen/asm.c

index c2c1a0f56f66bb76db73ce5a0650ad7e3ae28789..990e951c3b62d29e3bacb704a95471b551be59cc 100644 (file)
@@ -915,9 +915,9 @@ Sema::OwningStmtResult Sema::ActOnAsmStmt(SourceLocation AsmLoc,
           << InputExpr->getType() << InputConstraint 
           << InputExpr->getSubExpr()->getSourceRange());
       }
-      
-      DefaultFunctionArrayConversion(Exprs[i]);
     }
+    
+    DefaultFunctionArrayConversion(Exprs[i]);
   }
 
   // Check that the clobbers are valid.
index 26aa3bd61b3a73d4763caa3993fbaf7fe4982a25..e8088d40b13b4d62dd48d5dafc68d801e1c01f46 100644 (file)
@@ -27,3 +27,9 @@ void t5(int i)
 {
   asm("nop" : "=r"(i) : "0"(t5));
 }
+
+// PR3641
+void t6(void)
+{
+  __asm__ volatile("" : : "i" (t6));
+}