BTF testsuite: Remove explicit check on btm_type
The value of btm_type is the BTF type ID of the referred type. The order in which the BTF types are added can change across platforms and also as the code evolves, hence changing the BTF type ID. As there is no direct and portable method of testing that a BTF type refers to another BTF type of a specific kind, remove the explicit check on btm_type. This patch adjusts the testcase without affecting the test coverage as other testcases already have similar constructs. It also fixes a subset of failures as seen on Darwin. 2021-07-06 Indu Bhagat <indu.bhagat@oracle.com> gcc/testsuite/ChangeLog: PR debug/101283 * gcc.dg/debug/btf/btf-bitfields-3.c: Remove the check on btm_type.
This commit is contained in:
parent
97bcacfb5a
commit
d9e9532bb3
@ -11,7 +11,6 @@
|
||||
[2] int 'unsigned int' size=4 offset=0 bits=32
|
||||
[3] struct 'bitt' size=4
|
||||
member 'f' type=1 bitfield_size=2 bit_offset=0
|
||||
member 'data' type=2 bitfield_size=14 bit_offset=2
|
||||
*/
|
||||
|
||||
/* { dg-do compile } */
|
||||
@ -19,15 +18,12 @@
|
||||
|
||||
/* Enum with 4 members. */
|
||||
/* { dg-final { scan-assembler-times "\[\t \]0x6000004\[\t \]+\[^\n\]*btt_info" 1 } } */
|
||||
/* Struct with bitfield members, and 2 members. */
|
||||
/* { dg-final { scan-assembler-times "\[\t \]0x84000002\[\t \]+\[^\n\]*btt_info" 1 } } */
|
||||
/* Struct with 1 bitfield member. */
|
||||
/* { dg-final { scan-assembler-times "\[\t \]0x84000001\[\t \]+\[^\n\]*btt_info" 1 } } */
|
||||
|
||||
/* Bitfield "f" points to type ID 1. */
|
||||
/* { dg-final { scan-assembler-times "\[\t \]0x1\[\t \]+\[^\n\]*btm_type" 1 } } */
|
||||
|
||||
/* Bitfield "data" points to type ID 2. */
|
||||
/* { dg-final { scan-assembler-times "\[\t \]0x2\[\t \]+\[^\n\]*btm_type" 1 } } */
|
||||
|
||||
enum foo
|
||||
{
|
||||
BAR = 0,
|
||||
@ -39,5 +35,4 @@ enum foo
|
||||
struct bitt
|
||||
{
|
||||
enum foo f : 2;
|
||||
unsigned data : 14;
|
||||
} bitty;
|
||||
|
Loading…
Reference in New Issue
Block a user