From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7CD3B3858430; Thu, 14 Apr 2022 17:37:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7CD3B3858430 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/105089] CTF for a defined extern variable is ambiguous Date: Thu, 14 Apr 2022 17:37:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ibhagat at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2022 17:37:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105089 --- Comment #7 from CVS Commits --- The master branch has been updated by Indu Bhagat : https://gcc.gnu.org/g:d634c5d7c78c6ec0fa39d96984460475564519c8 commit r12-8164-gd634c5d7c78c6ec0fa39d96984460475564519c8 Author: Indu Bhagat Date: Thu Apr 14 10:02:45 2022 -0700 Refactor and update CTF testcases [PR105089] This commit splits the ctf-array-2.c into ctf-array-5.c and ctf-variables.c with the following responsibilities: [1] ctf-array-2.c: Test CTF generation for unsized arrays. [2] ctf-array-5.c: Test CTF generation for unsized but initialized arra= y. [3] ctf-variables-3.c: Test CTF generation for extern variable with defining decl. Earlier all three tests above were being done in ctf-array-2.c. The checks around [3] were very loose in the original version of ctf-array-= 2.c in that the testcase was only checking that the types are as expected. = The compiler was emitting two CTF variable records as follows: Variables: _CTF_NEWSTR -> 5: const const char [0] (size 0x0) -> 4: const char [= 0] (size 0x0) _CTF_NEWSTR -> 8: const const char [8] (size 0x8) -> 7: const char [= 8] (size 0x8) This is incorrect behaviour as it creates ambiguity. The testcase ctf-variables-3.c now has added checks that only one CTF variable record is expected. 2022-04-14 Indu Bhagat gcc/testsuite/ChangeLog: PR debug/105089 * gcc.dg/debug/ctf/ctf-array-2.c: Refactor testcase. Move some checks ... * gcc.dg/debug/ctf/ctf-array-5.c: ... to here. * gcc.dg/debug/ctf/ctf-variables-3.c: ... and here. Add additional checks for one CTF variable and one CTF object info record.=