2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %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
|
|
|
}
|