From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 183FE385E022; Wed, 25 Mar 2020 08:19:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 183FE385E022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585124351; bh=YwowRRIdhkjoNmJ0oCXcMFAF1D0UIrQpnPTJvlnqDl8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=leCCkxcHL/nvDw98QBU+8129MhAI2T+y0iRff1o9LLAkahTg8tYGC3LIViZSOLTNy m3WQrdxVr1cXKzF0ElV2fqYby2GakeNt+qcMLMw5R1h+xSzrInVFs7uBOO9TTlTUpJ X4uew8k6xCyzh5GQnnYgpHZ9psEOCBItVKSAWwa4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94223] [10 Regression] -fcompare-debug -O0 failure on cpp1z/init-statement6.C Date: Wed, 25 Mar 2020 08:19:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.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: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 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: Wed, 25 Mar 2020 08:19:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94223 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:158cccea0d097d9f181bf4e35fdeb97865c960f7 commit r10-7367-g158cccea0d097d9f181bf4e35fdeb97865c960f7 Author: Jakub Jelinek Date: Wed Mar 25 09:18:33 2020 +0100 middle-end: Avoid using DECL_UID in ASM_FORMAT_PRIVATE_NAME [PR94223] As mentioned in the PR, we don't guarantee DECL_UID to be the same betw= een corresponding decls in -g and -g0 builds, -g can create more decls and = all that is guaranteed is that the DECL_UIDs of the corresponding decls com= pare the same. The following testcase gets a -fcompare-debug failure because these functions use DECL_UID as the number in ASM_FORMAT_PRIVATE_NAME. The patch fixes it by using just a sequential number there instead. I don't think this can be called during PCH writing, this only happens = for non-public decls and the C/C++ FEs shouldn't mangling those at that poi= nt (furthermore C++ FE uses a different set_decl_assembler_name hook and t= his one is something only the gimplifier calls on C.NNNN temporaries. 2020-03-25 Jakub Jelinek PR c++/94223 * langhooks.c (lhd_set_decl_assembler_name): Use a static ulong counter instead of DECL_UID. * lto-lang.c (lto_set_decl_assembler_name): Use a static ulong counter instead of DECL_UID. * g++.dg/opt/pr94223.C: New test.=