https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83111
Bug ID: 83111 Summary: [sh] stack smashing detected in gen_udivsi3 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org Target Milestone: --- During a sh-linux-gnu build, I run into a build breaker: ... sh/build/./gcc/xgcc -Bsh/build/./gcc/ -Bsh/install/sh-linux-gnu/bin/ -Bsh/install/sh-linux-gnu/lib/ -isystem sh/install/sh-linux-gnu/include -isystem sh/install/sh-linux-gnu/sys-include -g -O2 -mb -O2 -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -DNO_FPSCR_VALUES -w -Wno-sync-nand -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fpic -DNO_FPSCR_VALUES -w -Wno-sync-nand -I. -I. -I../../.././gcc -I/src/libgcc -I/src/libgcc/. -I/src/libgcc/../gcc -I/src/libgcc/../include -o _moddi3.o -MT _moddi3.o -MD -MP -MF _moddi3.dep -DL_moddi3 -c /src/libgcc/libgcc2.c -fexceptions -fnon-call-exceptions -fvisibility=hidden -DHIDE_EXPORTS *** stack smashing detected ***: sh/build/./gcc/cc1 terminated during RTL pass: expand /src/libgcc/libgcc2.c: In function ‘__moddi3’: /src/libgcc/libgcc2.c:1092:9: internal compiler error: Aborted d0 = 1 / d0; /* Divide intentionally by zero. */ ~~~^~~~~~~~ 0x109919b crash_signal /src/gcc/toplev.c:325 0x175dbbe gen_udivsi3(rtx_def*, rtx_def*, rtx_def*) sh/build/gcc/insn-emit.c:12919 0xdd4687 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*) const /src/gcc/recog.h:302 0xe85b15 maybe_gen_insn(insn_code, unsigned int, expand_operand*) /src/gcc/optabs.c:7103 0xe733e3 expand_binop_directly /src/gcc/optabs.c:1071 0xe738b2 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) /src/gcc/optabs.c:1159 0xe75ead sign_expand_binop(machine_mode, optab_tag, optab_tag, rtx_def*, rtx_def*, rtx_def*, int, optab_methods) /src/gcc/optabs.c:1879 0xb097aa expand_divmod(int, tree_code, machine_mode, rtx_def*, rtx_def*, rtx_def*, int) /src/gcc/expmed.c:5091 0xb362c8 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) /src/gcc/expr.c:8844 0x9747a9 expand_gimple_stmt_1 /src/gcc/cfgexpand.c:3713 0x974ad1 expand_gimple_stmt /src/gcc/cfgexpand.c:3773 0x97e208 expand_gimple_basic_block /src/gcc/cfgexpand.c:5774 0x97fa5e execute /src/gcc/cfgexpand.c:6375 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. ...