1  /* Test BTF generation for struct with 0 size bitfield.
       2  
       3     We expect a struct with 2 members to be generated. The size 0 bitfield
       4     should not have any entry in the member list.  */
       5  
       6  /* { dg-do compile )  */
       7  /* { dg-options "-O0 -gbtf -dA" } */
       8  
       9  /* Struct with bitfield members, and 2 members.  */
      10  /* { dg-final { scan-assembler-times "\[\t \]0x84000002\[\t \]+\[^\n\]*btt_info" 1 } } */
      11  
      12  /* Bitfield size 31 (0x1f) at offset 0.  */
      13  /* { dg-final { scan-assembler-times "\[\t \]0x1f000000\[\t \]+\[^\n\]*btm_offset" 1 } } */
      14  
      15  /* Bitfield size 32 (0x20) at offset 32.  */
      16  /* { dg-final { scan-assembler-times "\[\t \]0x20000020\[\t \]+\[^\n\]*btm_offset" 1 } } */
      17  
      18  /* Only 2 members.  */
      19  /* { dg-final { scan-assembler-times "btm_name" 2 } } */
      20  
      21  struct foo
      22  {
      23    unsigned a : 31;
      24    unsigned   : 0;
      25    unsigned c : 32;
      26  } myfoo;