From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DB5E38582AE; Tue, 5 Mar 2024 23:40:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DB5E38582AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709682056; bh=I9lJbBxiz/OUEu+L4YsE4rwEawYupaRYnlKxrPGABHU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AjGR6UMAKJEq/s6gSUdSdXc395J6jB2/fIvTEQy8dr41vUzfgCNWlbDJV4mgVvi5R 8QO7zAwIbz0XZlI0bnbucnra+x34Dq6xjPQsykxu2RPygtyYHYcwYoY/RA4zY0u4oN UPbcvd1diLBEZrU9MF0gxSfEESZoEgvn5NcyrJqo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/114186] Incorrect CTF generated for multidimensional array Date: Tue, 05 Mar 2024 23:40:55 +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: 14.0 X-Bugzilla-Keywords: ctf-debug, wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114186 --- Comment #2 from GCC Commits --- The master branch has been updated by Indu Bhagat : https://gcc.gnu.org/g:5d24bf3afd1bea3e51b87fb7ff24c21e29913999 commit r14-9325-g5d24bf3afd1bea3e51b87fb7ff24c21e29913999 Author: Cupertino Miranda Date: Thu Feb 29 10:56:13 2024 -0800 ctf: fix incorrect CTF for multi-dimensional array types PR debug/114186 DWARF DIEs of type DW_TAG_subrange_type are linked together to represent the information about the subsequent dimensions. The CTF processing was so far working through them in the opposite (incorrect) order. While fixing the issue, refactor the code a bit for readability. co-authored-By: Indu Bhagat gcc/ PR debug/114186 * dwarf2ctf.cc (gen_ctf_array_type): Invoke the ctf_add_array () in the correct order of the dimensions. (gen_ctf_subrange_type): Refactor out handling of DW_TAG_subrange_type DIE to here. gcc/testsuite/ PR debug/114186 * gcc.dg/debug/ctf/ctf-array-6.c: Add test.=