Revert DECL_USER_ALIGN part of r241959
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48552-2.c
blobc3aca89645c33280df5a5f39df2ed7ba68190a9f
1 /* PR c/48552 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
5 struct S;
7 void
8 f1 (void *x)
10 __asm ("" : : "r" (*x)); /* { dg-warning "dereferencing" "deref" } */
11 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
13 void
14 f2 (void *x)
16 __asm ("" : "=r" (*x)); /* { dg-warning "dereferencing" "deref" } */
17 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
18 /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
19 void
20 f3 (void *x)
22 __asm ("" : : "m" (*x)); /* { dg-warning "dereferencing" } */
25 void
26 f4 (void *x)
28 __asm ("" : "=m" (*x)); /* { dg-warning "dereferencing" } */
31 void
32 f5 (void *x)
34 __asm ("" : : "g" (*x)); /* { dg-warning "dereferencing" "deref" } */
35 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
37 void
38 f6 (void *x)
40 __asm ("" : "=g" (*x)); /* { dg-warning "dereferencing" "deref" } */
41 } /* { dg-error "invalid use of void expression" "void expr" { target *-*-* } .-1 } */
42 /* { dg-error "invalid lvalue in asm output 0" "invalid lvalue" { target *-*-* } .-2 } */
43 void
44 f7 (struct S *x)
46 __asm ("" : : "r" (*x)); /* { dg-error "dereferencing pointer to incomplete type" } */
49 void
50 f8 (struct S *x)
52 __asm ("" : "=r" (*x)); /* { dg-error "invalid lvalue in asm output 0" } */