gcc/testsuite/c-c++-common/pr100785.c
raw| 1 | /* PR inline-asm/100785 */ |
| 2 | |
| 3 | struct S { int a : 1; }; |
| 4 | |
| 5 | void |
| 6 | foo (struct S *x) |
| 7 | { |
| 8 | __asm__ ("" : "+m" (x->a)); /* { dg-error "address of bit-field" } */ |
| 9 | } |
| 10 | |
| 11 | void |
| 12 | bar (struct S *x) |
| 13 | { |
| 14 | __asm__ ("" : "=m" (x->a)); /* { dg-error "address of bit-field" } */ |
| 15 | } |
| 16 | |
| 17 | void |
| 18 | baz (struct S *x) |
| 19 | { |
| 20 | __asm__ ("" : : "m" (x->a)); /* { dg-error "address of bit-field" } */ |
| 21 | } |