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

            Bug ID: 88394
           Summary: [8/9 Regression] g++ ICE (Segmentation fault) in
                    insert_capture_proxy
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at debian dot org
  Target Milestone: ---

$ cat crash.cpp 
void crash_me(unsigned short sz)
{
  if (sz == 0) return;

  short iov[sz];
  auto fce = [&iv = iov](short value) { iv[0] = 0; };
  fce(1);
}

$ /usr/lib/gcc-snapshot/bin/g++ -c crash.cpp 
crash.cpp: In lambda function:
crash.cpp:6:37: internal compiler error: Segmentation fault
    6 |   auto fce = [&iv = iov](short value) { iv[0] = 0; };
      |                                     ^
Please submit a full bug report,
with preprocessed source if appropriate.

Program received signal SIGSEGV, Segmentation fault.
0x00000000009273a0 in insert_capture_proxy(tree_node*) ()
(gdb) bt
#0  0x00000000009273a0 in insert_capture_proxy(tree_node*) ()
#1  0x0000000000927e1e in ?? ()
#2  0x000000000092b0d8 in start_lambda_function(tree_node*, tree_node*) ()
#3  0x0000000000976a73 in ?? ()
#4  0x000000000097b1c3 in ?? ()
#5  0x000000000098887b in ?? ()
#6  0x0000000000965400 in ?? ()
#7  0x0000000000965bda in ?? ()
#8  0x0000000000966aa8 in ?? ()
#9  0x000000000096648e in ?? ()
#10 0x0000000000966a42 in ?? ()
#11 0x000000000096a870 in ?? ()
#12 0x000000000098eaca in ?? ()
#13 0x0000000000972953 in ?? ()
#14 0x000000000097449a in ?? ()
#15 0x0000000000974f2c in ?? ()
#16 0x0000000000975f09 in ?? ()
#17 0x0000000000975fe9 in ?? ()
#18 0x000000000098d7b6 in ?? ()
#19 0x000000000098e06c in ?? ()
#20 0x000000000098edca in ?? ()
#21 0x0000000000972953 in ?? ()
#22 0x0000000000995641 in ?? ()
#23 0x0000000000995dbd in c_parse_file() ()
#24 0x0000000000a980ec in c_common_parse_file() ()
#25 0x0000000000f21440 in ?? ()
#26 0x0000000000864568 in toplev::main(int, char**) ()
#27 0x0000000000867bef in main ()

Reply via email to