2 /* { dg-do compile } */
3 /* { dg-options "" } */
10 __asm
volatile ("" : : "r" (*x
)); /* { dg-warning "dereferencing" "deref" } */
11 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 10 } */
16 __asm
volatile ("" : "=r" (*x
)); /* { dg-warning "dereferencing" "deref" } */
17 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 16 } */
18 /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 16 } */
22 __asm
volatile ("" : : "m" (*x
)); /* { dg-warning "dereferencing" } */
28 __asm
volatile ("" : "=m" (*x
)); /* { dg-warning "dereferencing" } */
34 __asm
volatile ("" : : "g" (*x
)); /* { dg-warning "dereferencing" "deref" } */
35 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 34 } */
40 __asm
volatile ("" : "=g" (*x
)); /* { dg-warning "dereferencing" "deref" } */
41 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } 40 } */
42 /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 40 } */
46 __asm
volatile ("" : : "r" (*x
)); /* { dg-error "dereferencing pointer to incomplete type" } */
52 __asm
volatile ("" : "=r" (*x
)); /* { dg-error "dereferencing pointer to incomplete type" "incomplete" } */
53 } /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } 52 } */