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

            Bug ID: 125370
           Summary: ICE in gen_add2_insn, at optabs.cc:5579 in XGCC
                    16.1.0, host mac os 14.8.7, target RX
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 64492
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64492&action=edit
Code snippet that causes the ICE

When I attempt to compile the attached main.cc with GCC 16.1.0 rx with the
command arguments as follows:

/opt/gcc-16.1.0-rx-none-elf/libexec/gcc/rx-none-elf/16.1.0/cc1plus main.cpp
-mcpu=rx600 -mint-register=4 -g -Wall -std=gnu++14 -fpu -o main.o


... I'll get an ICE:

/opt/gcc-16.1.0-rx-none-elf/rx-none-elf/include/c++/16.1.0/bits/std_function.h:427:26:
internal compiler error: in gen_add2_insn, at optabs.cc:5579
  427 |         : _Function_base()
      |                          ^
/opt/gcc-16.1.0-rx-none-elf/libexec/gcc/rx-none-elf/16.1.0/cc1plus main.cpp
-mcpu=rx600 -mint-register=4 -g -Wall -std=gnu++14 -fpu -o main.o
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.


NOTE: I have learned that the compiler switch '-mint-register=4' will have an
impact to this. If I remove it then the ICE does not happen!

This issue is reproducible.

Reply via email to