xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/inline-asm-validate.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple arm64-apple-macosx10.8.0 -fsyntax-only -verify %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc unsigned t, r, *p;
4*0a6a1f1dSLionel Sambuc 
foo(void)5*0a6a1f1dSLionel Sambuc int foo (void) {
6*0a6a1f1dSLionel Sambuc   __asm__ __volatile__( "stxr   %w[_t], %[_r], [%[_p]]" : [_t] "=&r" (t) : [_p] "p" (p), [_r] "r" (r) : "memory"); // expected-warning{{value size does not match register size specified by the constraint and modifier}} expected-note {{use constraint modifier "w"}}
7*0a6a1f1dSLionel Sambuc   return 1;
8*0a6a1f1dSLionel Sambuc }
9