diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2021-07-05 17:28:24 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2021-07-05 17:44:59 -0700 |
commit | a3543b5e8002c033b2304d7ac1d1e58218eebb51 (patch) | |
tree | e442981a996ec19ae085dccbe189586b8be61787 /gcc | |
parent | 6d53e6f9c7ab06510953b9881550b54a24137d4d (diff) | |
download | gcc-a3543b5e8002c033b2304d7ac1d1e58218eebb51.zip gcc-a3543b5e8002c033b2304d7ac1d1e58218eebb51.tar.gz gcc-a3543b5e8002c033b2304d7ac1d1e58218eebb51.tar.bz2 |
CTF,BTF testsuite: Use -gdwarf-4 for restrict type qualifier [PR101283]
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.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c | 1 |
2 files changed, 2 insertions, 0 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 79e9f52..33e2f64 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,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 } } */ diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c b/gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c index 9368d47..0137e9d 100644 --- a/gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c +++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c @@ -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 } } */ |