/* Set kflag if this member is a representable bitfield. */
if (btf_dmd_representable_bitfield_p (ctfc, dmd))
btf_kflag = 1;
-
- /* Struct members that refer to unsupported types or bitfield formats
- shall be skipped. These are marked during preprocessing. */
- else if (!btf_emit_id_p (dmd->dmd_type))
- btf_vlen -= 1;
}
}
In this test, we construct a structure such that the bitfield will have
an offset so large as to be unrepresentable in BTF. We expect that the
resulting BTF will describe the rest of the structure, ignoring the
- non-representable bitfield. */
+ non-representable bitfield by simply using void data type for the same. */
/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
/* { dg-require-effective-target size32plus } */
-/* Struct with 3 members and no bitfield (kind_flag not set). */
-/* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */
+/* Struct with 4 members and no bitfield (kind_flag not set). */
+/* { dg-final { scan-assembler-times "\[\t \]0x4000004\[\t \]+\[^\n\]*btt_info" 1 } } */
struct bigly
{
unsupported type.
BTF does not support vector types (among other things). When
- generating BTF for a struct (or union) type, members which refer to
- unsupported types should be skipped. */
+ generating BTF for a struct (or union) type. Members which refer to
+ unsupported types should not be skipped, however. */
/* { dg-do compile } */
/* { dg-options "-O0 -gbtf -dA" } */
-/* Expect a struct with only 2 members - 'f' should not be present. */
-/* { dg-final { scan-assembler-times "\[\t \]0x4000002\[\t \]+\[^\n\]*btt_info" 1 } } */
+/* Expect a struct with 3 members - 'f' is present but is of data type void. */
+/* { dg-final { scan-assembler-times "\[\t \]0x4000003\[\t \]+\[^\n\]*btt_info" 1 } } */
+/* { dg-final { scan-assembler-times " MEMBER 'f' idx=1\[\\r\\n\]+\[^\\r\\n\]*0\[\t \]+\[^\n\]*btm_type: void" 1 } } */
struct with_float
{