[Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a

michael_knoerzer at gmx dot net gcc-bugzilla@gcc.gnu.org
Sat Dec 5 22:49:18 GMT 2020


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

            Bug ID: 98157
           Summary: internal compiler error: Segmentation, gcc 10.2,
                    -std=gnu++2a
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michael_knoerzer at gmx dot net
  Target Milestone: ---

Created attachment 49690
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49690&action=edit
game_test.ii (zipped)

Here is the console output with -v -save-temps. I hope I attached the correct
file (it was 3MB so I zipped it).
Compiled on ubuntu-20.04, everything works fine with clang11(libstdc++) on
ubuntu-20.04 and msvc 19.28 on windows
you can find additional stuff (github CI runs) here, in case it might prove
useful:
https://github.com/MichaelUnknown/mkpoker/runs/1504169550?check_suite_focus=true
- mike

Scanning dependencies of target game_test
[ 60%] Building CXX object test/CMakeFiles/game_test.dir/game_test.cpp.o
Using built-in specs.
COLLECT_GCC=/usr/bin/g++-10
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
10.2.0-5ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-WJNXnb/gcc-10-10.2.0/debian/tmp-gcn/usr,hsa
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Ubuntu 10.2.0-5ubuntu1~20.04)
COLLECT_GCC_OPTIONS='-I' '/home/mike/github/mkpoker/include' '-isystem'
'/home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest/include'
'-isystem' '/home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest'
'-v' '-save-temps' '-g' '-Wall' '-Wextra' '-Wpedantic' '-std=gnu++2a' '-o'
'CMakeFiles/game_test.dir/game_test.cpp.o' '-c' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus -E -quiet -v -I
/home/mike/github/mkpoker/include -imultiarch x86_64-linux-gnu -D_GNU_SOURCE
-isystem
/home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest/include
-isystem /home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest
/home/mike/github/mkpoker/test/game_test.cpp -mtune=generic -march=x86-64
-std=gnu++2a -Wall -Wextra -Wpedantic -g -fworking-directory -fpch-preprocess
-fasynchronous-unwind-tables -fstack-protector-strong -Wformat-security
-fstack-clash-protection -fcf-protection -o game_test.ii
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/10"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/10/include-fixed"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/mike/github/mkpoker/include
 /home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest/include
 /home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest
 /usr/include/c++/10
 /usr/include/x86_64-linux-gnu/c++/10
 /usr/include/c++/10/backward
 /usr/lib/gcc/x86_64-linux-gnu/10/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-I' '/home/mike/github/mkpoker/include' '-isystem'
'/home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest/include'
'-isystem' '/home/mike/github/mkpoker/buildgcc/_deps/googletest-src/googletest'
'-v' '-save-temps' '-g' '-Wall' '-Wextra' '-Wpedantic' '-std=gnu++2a' '-o'
'CMakeFiles/game_test.dir/game_test.cpp.o' '-c' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus -fpreprocessed game_test.ii -quiet
-dumpbase game_test.cpp -mtune=generic -march=x86-64 -auxbase-strip
CMakeFiles/game_test.dir/game_test.cpp.o -g -Wall -Wextra -Wpedantic
-std=gnu++2a -version -fasynchronous-unwind-tables -fstack-protector-strong
-Wformat-security -fstack-clash-protection -fcf-protection -o game_test.s
GNU C++17 (Ubuntu 10.2.0-5ubuntu1~20.04) version 10.2.0 (x86_64-linux-gnu)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++17 (Ubuntu 10.2.0-5ubuntu1~20.04) version 10.2.0 (x86_64-linux-gnu)
        compiled by GNU C version 10.2.0, GMP version 6.2.0, MPFR version
4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d716f9df9d1b12ebc8fe860554136f35
In file included from /home/mike/github/mkpoker/test/game_test.cpp:1:
/home/mike/github/mkpoker/include/mkpoker/game/game.hpp: In instantiation of
‘mkp::game<N, <anonymous> >::payouts<3, 0>::<lambda(const auto:22&)> [with
auto:22 = std::pair<int, unsigned int>]’:
/usr/include/c++/10/bits/stl_algo.h:3839:5:   required from ‘constexpr _Funct
std::for_each(_IIter, _IIter, _Funct) [with _IIter = const std::pair<int,
unsigned int>*; _Funct = mkp::game<N, <anonymous> >::payouts<3,
0>::<lambda(const auto:22&)>]’
/home/mike/github/mkpoker/include/mkpoker/game/game.hpp:679:21:   required from
‘std::array<int, N> mkp::game<N, <anonymous> >::payouts() const [with long
unsigned int N = 3; typename std::enable_if<((N >= 2) && (N <= 6)), int>::type
<anonymous> = 0]’
/home/mike/github/mkpoker/test/game_test.cpp:290:19:   required from here
/home/mike/github/mkpoker/include/mkpoker/game/game.hpp:685:64: internal
compiler error: Segmentation fault
  685 |                         else if (this->m_playerstate[e.second] ==
gb_playerstate_t::ALLIN)
      |                                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
make[2]: *** [test/CMakeFiles/game_test.dir/build.make:63:
test/CMakeFiles/game_test.dir/game_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:343: test/CMakeFiles/game_test.dir/all]
Error 2
make: *** [Makefile:141: all] Error 2


More information about the Gcc-bugs mailing list