public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107384] New: [13 Regression] ICE tree check: expected non_lvalue_expr or static_cast_expr, have error_mark in set_implicit_rvalue_p, at cp/cp-tree.h:8689
Date: Mon, 24 Oct 2022 17:57:00 +0000	[thread overview]
Message-ID: <bug-107384-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107384
           Summary: [13 Regression] ICE tree check: expected
                    non_lvalue_expr or static_cast_expr, have error_mark
                    in set_implicit_rvalue_p, at cp/cp-tree.h:8689
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20220925 and 20221009 :
(gcc configured with --enable-checking=yes)


$ cat z1.cc
auto a = [] { b; return b; };


$ gcc-13-20221023 -c z1.cc -std=c++2b
z1.cc: In lambda function:
z1.cc:1:15: error: 'b' was not declared in this scope
    1 | auto a = [] { b; return b; };
      |               ^
z1.cc:1:25: 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
    1 | auto a = [] { b; return b; };
      |                         ^
0x7016f0 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.cc:8836
0xb31e9a tree_check2(tree_node*, char const*, int, char const*, tree_code,
tree_code)
        ../../gcc/tree.h:3545
0xb31e9a set_implicit_rvalue_p(tree_node*)
        ../../gcc/cp/cp-tree.h:8689
0xb31e9a treat_lvalue_as_rvalue_p(tree_node*, bool)
        ../../gcc/cp/typeck.cc:10729
0xa5fb27 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/cp/pt.cc:30472
0xb4fdd4 check_return_expr(tree_node*, bool*)
        ../../gcc/cp/typeck.cc:11002
0xad660e finish_return_stmt(tree_node*)
        ../../gcc/cp/semantics.cc:1230
0xa0449d cp_parser_jump_statement
        ../../gcc/cp/parser.cc:14311
0xa0449d cp_parser_statement
        ../../gcc/cp/parser.cc:12288
0xa04c34 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.cc:12853
0xa04d17 cp_parser_compound_statement
        ../../gcc/cp/parser.cc:12805
0xa054da cp_parser_function_body
        ../../gcc/cp/parser.cc:25179
0xa054da cp_parser_lambda_body
        ../../gcc/cp/parser.cc:11762
0xa054da cp_parser_lambda_expression
        ../../gcc/cp/parser.cc:11085
0xa054da cp_parser_primary_expression
        ../../gcc/cp/parser.cc:5766
0xa08d9e cp_parser_postfix_expression
        ../../gcc/cp/parser.cc:7717
0xa20fef cp_parser_unary_expression
        ../../gcc/cp/parser.cc:9081
0x9ebd2f cp_parser_cast_expression
        ../../gcc/cp/parser.cc:9985
0x9ec65f cp_parser_binary_expression
        ../../gcc/cp/parser.cc:10087
0x9ed404 cp_parser_assignment_expression
        ../../gcc/cp/parser.cc:10427

             reply	other threads:[~2022-10-24 17:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 17:57 gscfq@t-online.de [this message]
2022-10-24 18:07 ` [Bug c++/107384] " mpolacek at gcc dot gnu.org
2022-11-28 22:45 ` pinskia 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-107384-4@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).