Package: g++-8 Version: 8.2.0-9 Severity: important Compilation of C++ aplication crash with 'Segmentation fault' when capturing VLA by reference and also requiring name alias. Code works on ether g++-7 (Debian 7.3.0-30) and clang++ (6.0.1-9.2). Error is reproducible even on gcc-snapshot.
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); } g++ -c -o crash.o crash.cpp crash.cpp: In lambda function: crash.cpp:6:37: internal compiler error: Segmentation fault auto fce = [&iv = iov](short value) { iv[0] = 0; }; ^ 0x7ffaf18d8fbf ??? /build/glibc-aYuVJl/glibc-2.27/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x7ffaf18c5b16 __libc_start_main ../csu/libc-start.c:310 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions. make: *** [<builtin>: crash.o] Error 1 -- System Information: Distributor ID: Parrot Description: Parrot 4.3 Release: 4.3 Codename: stable Architecture: x86_64 Kernel: Linux 4.18.0-parrot10-amd64 (SMP w/6 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages g++-8 depends on: ii gcc-8 8.2.0-9 ii gcc-8-base 8.2.0-9 ii libc6 2.27-8 ii libgmp10 2:6.1.2+dfsg-3 ii libisl19 0.20-2 ii libmpc3 1.1.0-1 ii libmpfr6 4.0.1-1 ii libstdc++-8-dev 8.2.0-9 ii zlib1g 1:1.2.11.dfsg-1 g++-8 recommends no packages. Versions of packages g++-8 suggests: ii g++-8-multilib 8.2.0-9 pn gcc-8-doc <none> pn libstdc++6-8-dbg <none> -- no debconf information