public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "johelegp at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107276] ICE Deducing return type from ill-formed structured binding name
Date: Wed, 19 Oct 2022 18:35:37 +0000	[thread overview]
Message-ID: <bug-107276-4-C3kGQ2yG71@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107276-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
I just compiled GCC and it still ICEs:

```cli
$ ../root/gcc/bin/g++ --version
g++ (GCC) 13.0.0 20221019 (experimental)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat x.cpp 
auto f(auto x) {
  auto [y] = x;
  return y;
}
int i = f(0);
$ ../root/gcc/bin/g++ -std=c++23 -c x.cpp 
x.cpp: In instantiation of ‘auto f(auto:1) [with auto:1 = int]’:
x.cpp:5:10:   required from here
x.cpp:2:8: error: cannot decompose non-array non-class type ‘int’
    2 |   auto [y] = x;
      |        ^~~
x.cpp:3:10: internal compiler error: tree check: expected non_lvalue_expr or
static_cast_expr, have error_mark in set_implicit_rvalue_p, at
cp/cp-tree.h:8689
    3 |   return y;
      |          ^
0x22ea70c internal_error(char const*, ...)
        ???:0
0x8e3b63 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ???:0
0xbb8768 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ???:0
0xc6d039 check_return_expr(tree_node*, bool*)
        ???:0
0xc101f3 finish_return_stmt(tree_node*)
        ???:0
0xbee0a3 instantiate_decl(tree_node*, bool, bool)
        ???:0
0xa9b5f5 maybe_instantiate_decl(tree_node*)
        ???:0
0xa9cfa0 mark_used(tree_node*, int)
        ???:0
0x9dcd4b build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0xc16768 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ???:0
0xb9949b c_parse_file()
        ???:0
0xcde1f1 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
```

  parent reply	other threads:[~2022-10-19 18:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16  0:48 [Bug c++/107276] New: ICE Deducting " johelegp at gmail dot com
2022-10-17 11:29 ` [Bug c++/107276] ICE Deducing " marxin at gcc dot gnu.org
2022-10-19 18:35 ` johelegp at gmail dot com [this message]
2022-10-20 11:10 ` [Bug c++/107276] ICE Deducing return type from ill-formed structured binding name since r13-2905-g772d532e0ba1e4b2 marxin at gcc dot gnu.org
2022-10-20 12:57 ` mpolacek at gcc dot gnu.org
2022-10-24 18:07 ` cvs-commit at gcc dot gnu.org
2022-10-24 18:08 ` mpolacek 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-107276-4-C3kGQ2yG71@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).