public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/97878] [8/9/10/11 Regression] ICE in cxx_eval_outermost_constant_expr, at cp/constexpr.c:6825
Date: Wed, 03 Feb 2021 14:41:40 +0000	[thread overview]
Message-ID: <bug-97878-4-8SJSzbIh9G@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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
With
extern int a[];
auto [b] = a;
it is just error-recovery bug rather than ice-on-invalid-code:
pr97878-3.C:2:12: error: initializer fails to determine size of ‘<structured
bindings>’
    2 | auto [b] = a;
      |            ^
pr97878-3.C:2:12: internal compiler error: in cxx_eval_outermost_constant_expr,
at cp/constexpr.c:7127
0xaa8260 cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.c:7127
0xaa9a81 maybe_constant_init_1
        ../../gcc/cp/constexpr.c:7593
0xaa9b0b maybe_constant_init(tree_node*, tree_node*, bool)
        ../../gcc/cp/constexpr.c:7610
0xaa98e5 fold_non_dependent_init(tree_node*, int, bool, tree_node*)
        ../../gcc/cp/constexpr.c:7564
0xe4f994 store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.c:767
0xb3807b check_initializer
        ../../gcc/cp/decl.c:7028
0xb3d512 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        ../../gcc/cp/decl.c:7946
0xcbda72 cp_parser_decomposition_declaration
        ../../gcc/cp/parser.c:14663
The clang++ diagnostics doesn't make any sense either:
error: cannot decompose non-class, non-array type 'int *'
but doesn't crash the compiler.

  parent reply	other threads:[~2021-02-03 14:41 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 [this message]
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
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-8SJSzbIh9G@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).