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

            Bug ID: 96132
           Summary: ice in is_really_empty_class
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For recent gcc trunk, with this C++ source code:

template <int> class a;
template <int b> class c {
  a<b> e;
  void operator=(c d) { e = d; }
};

does this:

$ /home/dcb/gcc/results.20200709/bin/g++ -c -w bug629.cc
bug629.cc: In member function ‘void c<b>::operator=(c<b>)’:
bug629.cc:4:29: internal compiler error: Segmentation fault
    4 |   void operator=(c d) { e = d; }
      |                             ^
0x119d2e7 crash_signal
        ../../trunk.git/gcc/toplev.c:328
0x945778 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../trunk.git/gcc/tree.h:3302
0x945778 is_really_empty_class(tree_node*, bool)
        ../../trunk.git/gcc/cp/class.c:8719
0x94583d is_really_empty_class(tree_node*, bool)
        ../../trunk.git/gcc/cp/class.c:8727

Yet a couple of days ago, it was fine:

$ /home/dcb/gcc/results.20200707/bin/g++ -c -w bug629.cc
$

Reply via email to