public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
@ 2021-02-09 17:36 gscfq@t-online.de
  2021-02-09 17:51 ` [Bug c++/99030] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2021-02-09 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99030
           Summary: [11 Regression] ICE in finish_expr_stmt, at
                    cp/semantics.c:776
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed somewhere between 20200823 and 20201004 :


$ cat z1.cc
void foo ()
{
  extern int a;
  [] (auto b) { a; } (1);
}


$ g++-11-20200823 -c z1.cc
$
$ g++-11-20210207 -c z1.cc
z1.cc: In instantiation of 'foo()::<lambda(auto:1)> [with auto:1 = int]':
z1.cc:4:24:   required from here
z1.cc:4:17: internal compiler error: in finish_expr_stmt, at cp/semantics.c:776
    4 |   [] (auto b) { a; } (1);
      |                 ^
0x7e11cc finish_expr_stmt(tree_node*)
        ../../gcc/cp/semantics.c:776
0x7c72b9 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18158
0x7c5c17 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18475
0x7c5c17 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:18475
0x7ba4f3 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/cp/pt.c:25835
0x7ba4f3 instantiate_body
        ../../gcc/cp/pt.c:25835
0x7bb580 instantiate_decl(tree_node*, bool, bool)
        ../../gcc/cp/pt.c:26124
0x6ea4d3 maybe_instantiate_decl(tree_node*)
        ../../gcc/cp/decl2.c:5463
0x6ead54 mark_used(tree_node*, int)
        ../../gcc/cp/decl2.c:5691
0x674792 build_over_call
        ../../gcc/cp/call.c:9357
0x678b73 build_op_call_1
        ../../gcc/cp/call.c:4957
0x678b73 build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
        ../../gcc/cp/call.c:4986
0x7e4c72 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/cp/semantics.c:2762
0x783995 cp_parser_postfix_expression
        ../../gcc/cp/parser.c:7715
0x793d35 cp_parser_unary_expression
        ../../gcc/cp/parser.c:8818
0x76d96f cp_parser_cast_expression
        ../../gcc/cp/parser.c:9722
0x76e1a2 cp_parser_binary_expression
        ../../gcc/cp/parser.c:9824
0x76e900 cp_parser_assignment_expression
        ../../gcc/cp/parser.c:10128
0x76f77c cp_parser_expression
        ../../gcc/cp/parser.c:10298
0x772317 cp_parser_expression_statement
        ../../gcc/cp/parser.c:11965

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99030] [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
  2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
@ 2021-02-09 17:51 ` mpolacek at gcc dot gnu.org
  2021-02-09 18:25 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-09 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
   Last reconfirmed|                            |2021-02-09
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r11-3100.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99030] [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
  2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
  2021-02-09 17:51 ` [Bug c++/99030] " mpolacek at gcc dot gnu.org
@ 2021-02-09 18:25 ` mpolacek at gcc dot gnu.org
  2021-02-10  7:20 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-02-09 18:25 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99030] [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
  2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
  2021-02-09 17:51 ` [Bug c++/99030] " mpolacek at gcc dot gnu.org
  2021-02-09 18:25 ` mpolacek at gcc dot gnu.org
@ 2021-02-10  7:20 ` rguenth at gcc dot gnu.org
  2021-02-10 13:34 ` cvs-commit at gcc dot gnu.org
  2021-02-10 13:35 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-02-10  7:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99030] [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
  2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-02-10  7:20 ` rguenth at gcc dot gnu.org
@ 2021-02-10 13:34 ` cvs-commit at gcc dot gnu.org
  2021-02-10 13:35 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-10 13:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

https://gcc.gnu.org/g:f8fac476b5ce4b9a37ea2b257d9da810f8c507be

commit r11-7170-gf8fac476b5ce4b9a37ea2b257d9da810f8c507be
Author: Nathan Sidwell <nathan@acm.org>
Date:   Wed Feb 10 05:29:39 2021 -0800

    c++: generic lambdas and local-externs from outer scopes [PR 99030]

    Lambdas can refer to local externs from their enclosing scope.  When
    the lambda's generic but the containing function is not a temploid,
    we'll never have tsubsted the declaring decl so won't have a local
    specialization.  But in that case we can just use the decl we
    tsubsting directly -- it's not dependent.

            PR c++/99030
            gcc/cp
            * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
            answer if there's no local specialization.
            gcc/testsuite/
            * g++.dg/lookup/pr99030.C: New.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99030] [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776
  2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-02-10 13:34 ` cvs-commit at gcc dot gnu.org
@ 2021-02-10 13:35 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-02-10 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
f8fac476b5c 2021-02-10 | c++: generic lambdas and local-externs from outer
scopes [PR 99030]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-10 13:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 17:36 [Bug c++/99030] New: [11 Regression] ICE in finish_expr_stmt, at cp/semantics.c:776 gscfq@t-online.de
2021-02-09 17:51 ` [Bug c++/99030] " mpolacek at gcc dot gnu.org
2021-02-09 18:25 ` mpolacek at gcc dot gnu.org
2021-02-10  7:20 ` rguenth at gcc dot gnu.org
2021-02-10 13:34 ` cvs-commit at gcc dot gnu.org
2021-02-10 13:35 ` nathan at gcc dot gnu.org

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).