Debian Codegraph @

gcc/testsuite/gdc.dg/pr121477.d

raw
1 // { dg-do compile }
2 // { dg-additional-options "-fpreview=bitfields" }
3 struct S121477
4 {
5 int x : 4;
6 }
7
8 void f121477(S121477 s)
9 {
10 asm {"%0" :: "m" (s.x); } // { dg-error "cannot take address of bit-field" }
11 asm {"%0" : "=m" (s.x); } // { dg-error "cannot take address of bit-field" }
12 }