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++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb
Date: Thu, 22 Oct 2020 11:34:22 +0000	[thread overview]
Message-ID: <bug-97511-4-5dP0RdnsHO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97511-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:b083a14dfe1f53446722f488885078e419238d24

commit r11-4229-gb083a14dfe1f53446722f488885078e419238d24
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Oct 22 07:27:55 2020 -0400

    c++: Check DECL_TEMPLATE_PARM_P in duplicate_decls [PR97511]

    This makes duplicate_decls differentiate a TYPE_DECL for an alias
    template from a TYPE_DECL for one of its template parameters.  The
    recently added assert in template_parm_to_arg revealed this latent issue
    because merging of the two TYPE_DECLs cleared the DECL_TEMPLATE_PARM_P
    flag.

    With this patch, we now also correctly diagnose the name shadowing in
    the below testcase (as required by [temp.local]/6).

    gcc/cp/ChangeLog:

            PR c++/97511
            * decl.c (duplicate_decls): Return NULL_TREE if
            DECL_TEMPLATE_PARM_P differ.

    gcc/testsuite/ChangeLog:

            PR c++/97511
            * g++.dg/template/shadow3.C: New test.

  parent reply	other threads:[~2020-10-22 11:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
2020-10-21 10:33 ` [Bug c++/97511] " rguenth at gcc dot gnu.org
2020-10-21 12:54 ` [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb marxin at gcc dot gnu.org
2020-10-21 18:20 ` ppalka at gcc dot gnu.org
2020-10-22 11:34 ` cvs-commit at gcc dot gnu.org [this message]
2020-10-22 11:42 ` ppalka 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-97511-4-5dP0RdnsHO@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).