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

commit r14-9696-gf89c83aa139521804241d21e006557ac5a421f51
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Mar 27 20:22:02 2024 +0100

    btf: Fix up btf-datasec-1.c test on x86
    
    > -/* The offset entry for each variable in a DATSEC should be 0 at compile 
time.  */
    > -/* { dg-final { scan-assembler-times "0\[\t \]+\[^\n\]*bts_offset" 7 } } 
*/
    > +/* The offset entry for each variable in a DATSEC should contain a 
label.  */
    > +/* { dg-final { scan-assembler-times ".4byte\[\t \]\[a-e\]\[\t 
\]+\[^\n\]*bts_offset" 5 } } */
    
    4byte is used only on some targets, what exact assembler directive is used
    for 4byte unaligned data is heavily target dependent.
    
    2024-03-27  Jakub Jelinek  <ja...@redhat.com>
    
            * gcc.dg/debug/btf/btf-cvr-quals-1.c: Use dg-additional-options
            instead of multiple dg-options.
            * gcc.dg/debug/btf/btf-datasec-1.c: Likewise.  Accept all supported
            unaligned 4 byte assembler directives rather than assuming it must
            be .4byte.

Diff:
---
 gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c | 2 +-
 gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c 
b/gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c
index 33e2f649935..b7c99bf475a 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c
@@ -23,7 +23,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O0 -gbtf -dA" } */
-/* { dg-options "-O0 -gbtf -gdwarf-4 -dA" { target { *-*-darwin* } } } */
+/* { dg-additional-options "-gdwarf-4" { target { *-*-darwin* } } } */
 
 /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t 
\]+\[^\n\]*btf_string" 1 } } */
 
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c 
b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
index 8557c38c20d..782216d3cb1 100644
--- a/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
+++ b/gcc/testsuite/gcc.dg/debug/btf/btf-datasec-1.c
@@ -11,16 +11,16 @@
 
 /* { dg-do compile )  */
 /* { dg-options "-O0 -gbtf -dA" } */
-/* { dg-options "-O0 -gbtf -dA -msdata=none" { target { { powerpc*-*-* } && 
ilp32 } } } */
-/* { dg-options "-O0 -gbtf -dA -msmall-data-limit=0" { target { riscv*-*-* } } 
} */
-/* { dg-options "-O0 -gbtf -dA -G0" { target { nios2-*-* } } } */
+/* { dg-additional-options "-msdata=none" { target { { powerpc*-*-* } && ilp32 
} } } */
+/* { dg-additional-options "-msmall-data-limit=0" { target { riscv*-*-* } } } 
*/
+/* { dg-additional-options "-G0" { target { nios2-*-* } } } */
 
 /* Check for two DATASEC entries with vlen 3, and one with vlen 1.  */
 /* { dg-final { scan-assembler-times "0xf000003\[\t \]+\[^\n\]*btt_info" 2 } } 
*/
 /* { dg-final { scan-assembler-times "0xf000001\[\t \]+\[^\n\]*btt_info" 1 } } 
*/
 
 /* The offset entry for each variable in a DATSEC should contain a label.  */
-/* { dg-final { scan-assembler-times ".4byte\[\t \]\[a-e\]\[\t 
\]+\[^\n\]*bts_offset" 5 } } */
+/* { dg-final { scan-assembler-times 
"(?:(?:\\.4byte|\\.long|data4\\.ua|\\.ualong|\\.uaword|\\.dword|long|dc\\.l|\\.word)\[\t
 \]|\\.vbyte\t4,\[\t \]?)\[a-e\]\[\t \]+\[^\n\]*bts_offset" 5 } } */
 /* { dg-final { scan-assembler-times "my_cstruct\[\t \]+\[^\n\]*bts_offset" 1 
} } */
 /* { dg-final { scan-assembler-times "bigarr\[\t \]+\[^\n\]*bts_offset" 1 } } 
*/

Reply via email to