public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a
@ 2020-12-05 22:49 michael_knoerzer at gmx dot net
  2020-12-06 10:05 ` [Bug c++/98157] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4 marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: michael_knoerzer at gmx dot net @ 2020-12-05 22:49 UTC (permalink / raw)
  To: gcc-bugs

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
@ 2020-12-06 10:05 ` marxin at gcc dot gnu.org
  2020-12-07  7:57 ` [Bug c++/98157] [10 Regression] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-06 10:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3
      Known to fail|                            |10.2.0
            Summary|internal compiler error:    |ICE: tree check: expected
                   |Segmentation, gcc 10.2,     |tree that contains ‘decl
                   |-std=gnu++2a                |minimal’ structure, have
                   |                            |‘tree_list’ in
                   |                            |add_candidates, at
                   |                            |cp/call.c:5803 since
                   |                            |r10-6219-g8b91e848130e45b4
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |11.0
     Ever confirmed|0                           |1
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
   Last reconfirmed|                            |2020-12-06

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for the report. It was introduced in r10-6219-g8b91e848130e45b4 and got
fixed in r11-2876-g1f53d8f1d3e7519b.

Is it something we want to backport to GCC 10 branch?

Reduced test-case:
$ cat game_test.ii
struct pair {
  int second;
};
template <typename _InputIterator, typename _Function>
void for_each(_InputIterator, _Function __f) {
  _InputIterator __first;
  __f(*__first);
}
template <typename, unsigned long> struct array { int operator[](long); };
class span {
public:
  template <typename _Tp, unsigned long _ArrayExtent>
  span(array<_Tp, _ArrayExtent>);
};
enum Trans_NS_constants_gb_playerstate_t { ALLIN };
class gamecards {
  void operator==(gamecards);
};
template <int> class gamestate {
protected:
  array<Trans_NS_constants_gb_playerstate_t, 1> m_playerstate;
  void operator==(gamestate);
};
template <int N> class game : gamestate<N>, gamecards {
public:
  game(span, int);
  array<int, 1> payouts() {
    pair __trans_tmp_2;
    for_each(&__trans_tmp_2,
             [&](auto e) { this->m_playerstate[e.second] == ALLIN; });
  }
};
void TestBody() { array<int, 1> cards = game<3>(cards, 0).payouts(); }

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] [10 Regression] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
  2020-12-06 10:05 ` [Bug c++/98157] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4 marxin at gcc dot gnu.org
@ 2020-12-07  7:57 ` rguenth at gcc dot gnu.org
  2020-12-07 13:22 ` nathan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-07  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
           Keywords|                            |ice-on-valid-code

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] [10 Regression] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
  2020-12-06 10:05 ` [Bug c++/98157] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4 marxin at gcc dot gnu.org
  2020-12-07  7:57 ` [Bug c++/98157] [10 Regression] " rguenth at gcc dot gnu.org
@ 2020-12-07 13:22 ` nathan at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-07 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
I'll back port in a short while

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] [10 Regression] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
                   ` (2 preceding siblings ...)
  2020-12-07 13:22 ` nathan at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2022-06-28 10:42 ` jakub at gcc dot gnu.org
  2023-07-07  9:16 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] [10 Regression] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
                   ` (3 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2022-06-28 10:42 ` jakub at gcc dot gnu.org
  2023-07-07  9:16 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/98157] [10 Regression] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4
  2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
                   ` (4 preceding siblings ...)
  2022-06-28 10:42 ` jakub at gcc dot gnu.org
@ 2023-07-07  9:16 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.5.0
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|10.5                        |11.0
         Resolution|---                         |FIXED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-07  9:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 22:49 [Bug c++/98157] New: internal compiler error: Segmentation, gcc 10.2, -std=gnu++2a michael_knoerzer at gmx dot net
2020-12-06 10:05 ` [Bug c++/98157] ICE: tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in add_candidates, at cp/call.c:5803 since r10-6219-g8b91e848130e45b4 marxin at gcc dot gnu.org
2020-12-07  7:57 ` [Bug c++/98157] [10 Regression] " rguenth at gcc dot gnu.org
2020-12-07 13:22 ` nathan at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07  9:16 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).