]> granicus.if.org Git - clang/commitdiff
Replace inline asm constraint "=a" by the more general constraint "=r".
authorSimon Atanasyan <satanasyan@mips.com>
Tue, 22 May 2012 11:03:10 +0000 (11:03 +0000)
committerSimon Atanasyan <satanasyan@mips.com>
Tue, 22 May 2012 11:03:10 +0000 (11:03 +0000)
That extend a range of platforms support this test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157247 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/nullptr.cpp
test/SemaTemplate/instantiate-expr-1.cpp

index 3119b4fc390c28c117118a19961c6ff317842f00..050c3f8dc56a533aeed0d54e7ec4edc0881db86a 100644 (file)
@@ -55,7 +55,7 @@ void zoo2() {
   int **a = 0;
   int **b = 0;
   asm ("nop"
-      :"=a"(*a)
+      :"=r"(*a)
       :"0"(*b) // expected-warning{{Dereference of null pointer}}
       );
 }
index 9395117e9ce4871573f2c75d2a937c316ff139e7..e7772435865d3d52f4d3bf8acef9569ea3112569 100644 (file)
@@ -127,7 +127,7 @@ void test_call_operator(CallOperator call_op, int i, double d) {
 
 template<typename T>
 void test_asm(T t) {
-  asm ("nop" : "=a"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}}
+  asm ("nop" : "=r"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}}
 }
 
 void test_asm() {