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++/99899] [11 Regression] ICE: in do_auto_deduction, at cp/pt.c:29630
Date: Tue, 06 Apr 2021 03:37:53 +0000	[thread overview]
Message-ID: <bug-99899-4-nAFLmzMVka@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99899-4@http.gcc.gnu.org/bugzilla/>

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

--- 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:66de517b1c1dd22df7914f8e9a083cd5a73adbe2

commit r11-7997-g66de517b1c1dd22df7914f8e9a083cd5a73adbe2
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Apr 5 23:35:56 2021 -0400

    c++: placeholder type constraint in structured binding [PR99899]

    In this PR, we're crashing because the constraint handling inside
    do_auto_deduction doesn't expect to see an adc_decomp_type context.
    This patch fixes this by treating adc_decomp_type like adc_variable_type
    or adc_return_type during placeholder type constraint checking.

    Meanwhile, I noticed we weren't checking constraints at all when binding
    an array via a structured binding, since do_auto_deduction would exit
    early and bypass the constraint check.  This patch fixes this by
    replacing the early exit with an appropriate setup of the 'targs'
    vector.

    gcc/cp/ChangeLog:

            PR c++/99899
            * pt.c (do_auto_deduction): Don't exit early when deducing the
            array type of a structured binding.  Also handle adc_decomp_type
            during constraint checking.

    gcc/testsuite/ChangeLog:

            PR c++/99899
            * g++.dg/cpp2a/concepts-placeholder7.C: New test.
            * g++.dg/cpp2a/concepts-placeholder8.C: New test.

  parent reply	other threads:[~2021-04-06  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03 17:50 [Bug c++/99899] New: " hewillk at gmail dot com
2021-04-05 15:24 ` [Bug c++/99899] [11 Regression] " ppalka at gcc dot gnu.org
2021-04-06  3:37 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-06  3:39 ` 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-99899-4-nAFLmzMVka@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).