]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
CTF,BTF testsuite: Use -gdwarf-4 for restrict type qualifier [PR101283]
authorIndu Bhagat <indu.bhagat@oracle.com>
Tue, 6 Jul 2021 00:28:24 +0000 (17:28 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Tue, 6 Jul 2021 00:44:59 +0000 (17:44 -0700)
DWARF DIEs do not contain DW_TAG_restrict_type when DWARF version is 2. CTF/BTF
generation feeds off DWARF DIEs, and as such, CTF records of kind
CTF_K_RESTRICT cease to be generated when DWARF version is 2.

This patch fixes the failure of these testcases on Darwin by using an explicit
-gdwarf-4 in the dg-options. This keeps the CTF record generation for restrict
type qualifier tested.

  PR debug/101283 - Several tests fail on Darwin with -gctf/gbtf

2021-07-05  Indu Bhagat  <indu.bhagat@oracle.com>

gcc/testsuite/ChangeLog:

PR debug/101283
* gcc.dg/debug/btf/btf-cvr-quals-1.c: Use -gdwarf-4 on Darwin targets.
* gcc.dg/debug/ctf/ctf-cvr-quals-1.c: Likewise.

gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c
gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c

index 79e9f52a479e57a6c3171e4f851fe105f32b2a7a..33e2f649935e6e33101eaac5ae9e33e39ba04193 100644 (file)
@@ -23,6 +23,7 @@
 
 /* { dg-do compile } */
 /* { dg-options "-O0 -gbtf -dA" } */
+/* { dg-options "-O0 -gbtf -gdwarf-4 -dA" { target { *-*-darwin* } } } */
 
 /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*btf_string" 1 } } */
 
index 9368d47ea0cdee25e9a91a07a588dd8af14602d2..0137e9d45c5f20b61cb30e37db357776fa882c74 100644 (file)
@@ -31,6 +31,7 @@
 
 /* { dg-do compile )  */
 /* { dg-options "-O0 -gctf -dA" } */
+/* { dg-options "-O0 -gctf -gdwarf-4 -dA" { target { *-*-darwin* } } } */
 
 /* { dg-final { scan-assembler-times "ascii \"int.0\"\[\t \]+\[^\n\]*ctf_string" 1 } } */
 /* { dg-final { scan-assembler-times "\[\t \]0\[\t \]+\[^\n\]*ctt_name" 7 } } */