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

            Bug ID: 100019
           Summary: ICE Segmentation fault with try-catch block in lambda
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/WajPza5fM

void f(auto... args) {
  [] {
    try {} catch (decltype(args)) {}
  };
}

int main() {
  f(0);
}

<source>:3:19: internal compiler error: Segmentation fault
    3 |     try {} catch (decltype(args)) {}
      |                   ^~~~~~~~~~~~~~
0x1d00a79 internal_error(char const*, ...)
        ???:0
0x98c0ff finish_decltype_type(tree_node*, bool, int)
        ???:0
0x9170e3 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x9177e7 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x94acb2 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x91d61f instantiate_decl(tree_node*, bool, bool)
        ???:0
0x95f4eb instantiate_pending_templates(int)
        ???:0
0x7ccff9 c_parse_final_cleanups()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to