https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81639
Bug ID: 81639 Summary: ICE in rtl_verify_bb_insns, at cfgrtl.c:2669 with a naked function Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: uros at gcc dot gnu.org Target Milestone: --- Following test-case ICEs starting from r250736: $ cat /tmp/ice.i __attribute__ ((naked)) a () { b (); } $ ./xgcc -B. /tmp/ice.i -Os /tmp/ice.i:1:25: warning: return type defaults to ‘int’ [-Wimplicit-int] __attribute__ ((naked)) a () { b (); } ^ /tmp/ice.i: In function ‘a’: /tmp/ice.i:1:32: warning: implicit declaration of function ‘b’ [-Wimplicit-function-declaration] __attribute__ ((naked)) a () { b (); } ^ /tmp/ice.i:1:1: error: in basic block 2: __attribute__ ((naked)) a () { b (); } ^~~~~~~~~~~~~ /tmp/ice.i:1:1: error: flow control insn inside a basic block (insn 16 17 6 2 (trap_if (const_int 1 [0x1]) (const_int 6 [0x6])) "/tmp/ice.i":1 -1 (nil)) during RTL pass: pro_and_epilogue /tmp/ice.i:1:1: internal compiler error: in rtl_verify_bb_insns, at cfgrtl.c:2669 0x5a1de4 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../gcc/rtl-error.c:108 0x760305 rtl_verify_bb_insns ../../gcc/cfgrtl.c:2669 0x760305 rtl_verify_flow_info_1 ../../gcc/cfgrtl.c:2755 0x760322 rtl_verify_flow_info ../../gcc/cfgrtl.c:2997 0x747bde verify_flow_info() ../../gcc/cfghooks.c:257 0xab31c9 execute_function_todo ../../gcc/passes.c:2002 0xab4222 execute_todo ../../gcc/passes.c:2044