public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-94223-4-c4g2pbHSXZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94223-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94223

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:158cccea0d097d9f181bf4e35fdeb97865c960f7

commit r10-7367-g158cccea0d097d9f181bf4e35fdeb97865c960f7
Author: Jakub Jelinek <jakub@redhat.com>
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 between
    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 compare
    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 point
    (furthermore C++ FE uses a different set_decl_assembler_name hook and this
    one is something only the gimplifier calls on C.NNNN temporaries.

    2020-03-25  Jakub Jelinek  <jakub@redhat.com>

            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.

  parent reply	other threads:[~2020-03-25  8:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 11:49 [Bug c++/94223] New: " zhroma at gcc dot gnu.org
2020-03-19 12:33 ` [Bug c++/94223] " jakub at gcc dot gnu.org
2020-03-20  8:41 ` rguenth at gcc dot gnu.org
2020-03-20  8:47 ` jakub at gcc dot gnu.org
2020-03-20 11:47 ` rguenth at gcc dot gnu.org
2020-03-24 15:09 ` jakub at gcc dot gnu.org
2020-03-25  8:19 ` cvs-commit at gcc dot gnu.org [this message]
2020-03-25  8:23 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-94223-4-c4g2pbHSXZ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).