aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2021-07-06 16:11:47 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2021-07-06 16:13:29 -0700
commitd9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f (patch)
tree8bb1c1718bfd52223faff60c3cacb93f8248abf8 /gcc
parent97bcacfb5ac49afa4e305489dd110cc446451549 (diff)
downloadgcc-d9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f.zip
gcc-d9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f.tar.gz
gcc-d9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c
index 5e68416..0e00f2b 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c
@@ -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;