2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc %s -verify -fheinous-gnu-extensions
|
2009-03-14 01:38:01 +08:00
|
|
|
|
2009-07-22 08:43:08 +08:00
|
|
|
void foo() {
|
|
|
|
int a;
|
|
|
|
// PR3788
|
|
|
|
asm("nop" : : "m"((int)(a))); // expected-warning {{cast in a inline asm context requiring an l-value}}
|
|
|
|
// PR3794
|
|
|
|
asm("nop" : "=r"((unsigned)a)); // expected-warning {{cast in a inline asm context requiring an l-value}}
|
2009-03-14 01:38:01 +08:00
|
|
|
}
|