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++/97878] [8/9 Regression] ICE in cxx_eval_outermost_constant_expr, at cp/constexpr.c:6825
Date: Tue, 20 Apr 2021 23:32:07 +0000	[thread overview]
Message-ID: <bug-97878-4-cEcyYDf6Wo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-97878-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:5c85df8968b00acc934396d7461a4a5ac6ddedd1

commit r9-9416-g5c85df8968b00acc934396d7461a4a5ac6ddedd1
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Feb 5 10:22:07 2021 +0100

    c++: Fix ICE with structured binding initialized to incomplete array
[PR97878]

    We ICE on the following testcase, for incomplete array a on auto [b] { a };
without
    giving any kind of diagnostics, with auto [c] = a; during error-recovery.
    The problem is that we get too far through check_initializer and e.g.
    store_init_value -> constexpr stuff can't deal with incomplete array types.

    As the type of the structured binding artificial variable is always
deduced,
    I think it is easiest to diagnose this early, even if they have array types
    we'll need their deduced type to be complete rather than just its element
    type.

    2021-02-05  Jakub Jelinek  <jakub@redhat.com>

            PR c++/97878
            * decl.c (check_array_initializer): For structured bindings,
require
            the array type to be complete.

            * g++.dg/cpp1z/decomp54.C: New test.

    (cherry picked from commit 8b7f2d3eae16dd629ae7ae40bb76f4bb0099f441)

  parent reply	other threads:[~2021-04-20 23:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 17:37 [Bug c++/97878] New: [9/10/11 " gscfq@t-online.de
2020-11-17 18:00 ` [Bug c++/97878] " mpolacek at gcc dot gnu.org
2020-11-17 19:18 ` mpolacek at gcc dot gnu.org
2020-11-18  8:18 ` [Bug c++/97878] [8/9/10/11 " rguenth at gcc dot gnu.org
2021-02-03 14:41 ` jakub at gcc dot gnu.org
2021-02-03 15:45 ` jakub at gcc dot gnu.org
2021-02-05  9:23 ` cvs-commit at gcc dot gnu.org
2021-02-05  9:23 ` [Bug c++/97878] [8/9/10 " jakub at gcc dot gnu.org
2021-03-19 23:28 ` cvs-commit at gcc dot gnu.org
2021-03-20  8:07 ` [Bug c++/97878] [8/9 " jakub at gcc dot gnu.org
2021-04-20 23:32 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:07 ` 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-97878-4-cEcyYDf6Wo@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).