Land test case.

llvm-svn: 94362
This commit is contained in:
Anders Carlsson 2010-01-24 05:50:37 +00:00
parent aaeef07280
commit c0ebb9412c
1 changed files with 13 additions and 0 deletions

View File

@ -112,3 +112,16 @@ void test_call_operator(CallOperator call_op, int i, double d) {
int &ir = test_call_operator<int&>(call_op, i);
double &dr = test_call_operator<double&>(call_op, d);
}
template<typename T>
void test_asm(T t) {
asm ("nop" : "=a"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}}
}
void test_asm() {
int* a;
test_asm(a);
int b;
test_asm(b); // expected-note {{in instantiation of function template specialization 'test_asm<int>' requested here}}
}