public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2094] BTF testsuite: Remove explicit check on btm_type
@ 2021-07-06 23:14 Indu Bhagat
  0 siblings, 0 replies; only message in thread
From: Indu Bhagat @ 2021-07-06 23:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:d9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f

commit r12-2094-gd9e9532bb3bf5db4cd6afd49d343ede5b27c3c9f
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Tue Jul 6 16:11:47 2021 -0700

    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.

Diff:
---
 gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-3.c | 9 ++-------
 1 file 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 5e68416e2c2..0e00f2b81fb 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-06 23:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 23:14 [gcc r12-2094] BTF testsuite: Remove explicit check on btm_type Indu Bhagat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).