From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7850) id 5E4CE3857C65; Tue, 6 Jul 2021 00:47:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E4CE3857C65 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Indu Bhagat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2044] CTF, BTF testsuite: Use -gdwarf-4 for restrict type qualifier [PR101283] X-Act-Checkin: gcc X-Git-Author: Indu Bhagat X-Git-Refname: refs/heads/master X-Git-Oldrev: 6d53e6f9c7ab06510953b9881550b54a24137d4d X-Git-Newrev: a3543b5e8002c033b2304d7ac1d1e58218eebb51 Message-Id: <20210706004736.5E4CE3857C65@sourceware.org> Date: Tue, 6 Jul 2021 00:47:36 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jul 2021 00:47:36 -0000 https://gcc.gnu.org/g:a3543b5e8002c033b2304d7ac1d1e58218eebb51 commit r12-2044-ga3543b5e8002c033b2304d7ac1d1e58218eebb51 Author: Indu Bhagat Date: Mon Jul 5 17:28:24 2021 -0700 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 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. Diff: --- gcc/testsuite/gcc.dg/debug/btf/btf-cvr-quals-1.c | 1 + gcc/testsuite/gcc.dg/debug/ctf/ctf-cvr-quals-1.c | 1 + 2 files changed, 2 insertions(+) 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 79e9f52a479..33e2f649935 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 9368d47ea0c..0137e9d45c5 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 } } */