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
|
2012-10-26 15:02:46 +08:00
|
|
|
asm("nop" : : "m"((int)(a))); // expected-warning {{cast in an inline asm context requiring an l-value}}
|
2009-07-22 08:43:08 +08:00
|
|
|
// PR3794
|
2012-10-26 15:02:46 +08:00
|
|
|
asm("nop" : "=r"((unsigned)a)); // expected-warning {{cast in an inline asm context requiring an l-value}}
|
2009-03-14 01:38:01 +08:00
|
|
|
}
|