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

            Bug ID: 125287
           Summary: [ARM64] internal compiler error: in
                    gimplify_init_constructor, at gimplify.cc:5529
           Product: gcc
           Version: 13.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 1794833681 at qq dot com
  Target Milestone: ---

#include <cstddef>

class VirtualMachine {
public:
    using Op = unsigned char (VirtualMachine::*)();

    static constexpr std::size_t kTableSize = 127;  
    Op* dispatch_table;

    VirtualMachine() 
        : dispatch_table(new Op[kTableSize]{
            &VirtualMachine::load,
            &VirtualMachine::store,
            &VirtualMachine::add,
            &VirtualMachine::sub,
            nullptr   
          })
    {}

    unsigned char load() { return 0; }
    unsigned char store() { return 0; }
    unsigned char add() { return 0; }
    unsigned char sub() { return 0; }
};<source>: In constructor 'VirtualMachine::VirtualMachine()':
<source>:17:11: internal compiler error: in gimplify_init_constructor, at
gimplify.cc:5529
   17 |           })
      |           ^
0x78bf90a29e3f __libc_start_main
    ???
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1


int main() {
    VirtualMachine vm;
    return 0;
}

Reply via email to