public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109803] New: [12 Regression] ICE with type defined in lambda inside generic lambda inside function template
@ 2023-05-10 20:17 rs2740 at gmail dot com
  2023-05-10 20:34 ` [Bug c++/109803] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rs2740 at gmail dot com @ 2023-05-10 20:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109803
           Summary: [12 Regression] ICE with type defined in lambda inside
                    generic lambda inside function template
           Product: gcc
           Version: 12.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Repro:

template<class T>
void foo(T) {
    [](auto){
        [] {
            struct X {};
        };
    };
}

template void foo(int);

<source>: In instantiation of 'void foo(T) [with T = int]':
<source>:10:22:   required from here
<source>:4:9: internal compiler error: Segmentation fault
    4 |         [] {
      |         ^
0x1bbabfe internal_error(char const*, ...)
        ???:0
0x10b0223 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ???:0
0x10b0516 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ???:0
0x10b0223 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ???:0
0x870a79 check_for_bare_parameter_packs(tree_node*, unsigned int)
        ???:0
0x8a7dfb finish_expr_stmt(tree_node*)
        ???:0
0x891a08 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x87e337 instantiate_decl(tree_node*, bool, bool)
        ???:0
0x899e8b instantiate_pending_templates(int)
        ???:0
0x7a5298 c_parse_final_cleanups()
        ???: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://gcc.gnu.org/bugs/> for instructions.

https://gcc.godbolt.org/z/sb5crbxf6

This is a regression in 12.3.0. 12.2.0 and 13.1.0 both compile this fine.

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

end of thread, other threads:[~2023-05-10 20:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 20:17 [Bug c++/109803] New: [12 Regression] ICE with type defined in lambda inside generic lambda inside function template rs2740 at gmail dot com
2023-05-10 20:34 ` [Bug c++/109803] " pinskia at gcc dot gnu.org
2023-05-10 20:40 ` mpolacek at gcc dot gnu.org
2023-05-10 20:41 ` mpolacek 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).