summaryrefslogtreecommitdiffstats
path: root/test/Sema/heinous-extensions-off.c
blob: 3a9880ce7f7583eb274fe9ea35fc6b1967321bf2 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: clang-cc %s -verify

int foo() {
        int a;
        // PR3788
        asm("nop" : : "m"((int)(a))); // expected-error {{cast in a inline asm context requiring an l-value}}
        // PR3794
        asm("nop" : "=r"((unsigned)a)); // expected-error {{cast in a inline asm context requiring an l-value}}
}