The test seems to cause all versions since 4.x to crash. $ g++tk -v Using built-in specs. COLLECT_GCC=g++tk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 9.0.1 20190130 (experimental) [trunk revision 268383] (GCC) $ $ clang++ -std=c++11 -c tmp.cpp $ $ g++tk -c tmp.cpp during RTL pass: expand tmp.cpp: In lambda function: tmp.cpp:6:22: internal compiler error: in expand_expr_real_1, at expr.c:9993 6 | [&] { __typeof (b) c; } (); | ^ 0xb4094b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-source-trunk/gcc/expr.c:9987 0xb57c2c expand_expr ../../gcc-source-trunk/gcc/expr.h:279 0xb57c2c expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc-source-trunk/gcc/expr.c:8484 0xa088c0 expand_gimple_stmt_1 ../../gcc-source-trunk/gcc/cfgexpand.c:3790 0xa088c0 expand_gimple_stmt ../../gcc-source-trunk/gcc/cfgexpand.c:3850 0xa0c44b expand_gimple_basic_block ../../gcc-source-trunk/gcc/cfgexpand.c:5886 0xa11e36 execute ../../gcc-source-trunk/gcc/cfgexpand.c:6509 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ -------------------------------- int a = 1; void f () { int b[a]; [&] { __typeof (b) c; } (); }
Likely since r152318 when lambda support has been added. Guess we'd need to capture the VLA array sizes in the lambda.
I guess it may be a duplicate of PR60855 and (or) PR86432.
Yes this is a dup of bug 60855. It has been fixed for GCC 10+. *** This bug has been marked as a duplicate of bug 60855 ***