Created attachment 43016 [details] Test program. m32c-rtems5-gcc -O2 test.i during RTL pass: pro_and_epilogue test.c: In function 'main': test.c:16:1: internal compiler error: in leaf_function_p, at final.c:4368 } ^ 0x103e7b8b leaf_function_p() /home/sh/src/gcc/gcc/final.c:4368 0x10c3c61f m32c_leaf_function_p /home/sh/src/gcc/gcc/config/m32c/m32c.c:4023 0x10c3c61f m32c_emit_prologue() /home/sh/src/gcc/gcc/config/m32c/m32c.c:4077 0x10dfb8e3 gen_prologue() /home/sh/src/gcc/gcc/config/m32c/prologue.md:26 0x10c35e57 target_gen_prologue /home/sh/src/gcc/gcc/config/m32c/blkmov.md:359 0x1044e9d3 make_prologue_seq /home/sh/src/gcc/gcc/function.c:5912 0x1044ed67 thread_prologue_and_epilogue_insns() /home/sh/src/gcc/gcc/function.c:6029 0x1044f7af rest_of_handle_thread_prologue_and_epilogue /home/sh/src/gcc/gcc/function.c:6520 0x1044f7af execute /home/sh/src/gcc/gcc/function.c:6562 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
*** Bug 89515 has been marked as a duplicate of this bug. ***
Exposed by https://gcc.gnu.org/ml/gcc-patches/2017-05/msg01027.html . The value might already be cached by the time we call leaf_function_p in crtl->is_leaf which can be used here instead. Related to the similar issue on mmix: PR 85666.
*** Bug 95099 has been marked as a duplicate of this bug. ***
GCC 8 branch is being closed.
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
*** Bug 81804 has been marked as a duplicate of this bug. ***
GCC 9 branch is being closed
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Created attachment 53966 [details] Prevent the ICE I have no clue whether the attached patch is any good. It makes compile of libgcc continue somewhat further, but then it fails when assigning registers for a jump_ins.
Created attachment 54511 [details] ICE report This is the -freport-bug output for an m32c build on GCC 12.1.0
*** Bug 109026 has been marked as a duplicate of this bug. ***
GCC 10 branch is being closed.
GCC 11 branch is being closed.