https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65803
--- Comment #3 from Chen Gang <gang.chen.5i5j at gmail dot com> --- It is about JUMP_LABEL, gcc should set the JUMP_LABEL before use it. If we set the label as soon as it is generated, it can build the issue code successfully. diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index dc24ed5..b8c9567 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -3777,7 +3777,8 @@ hwloop_optimize (hwloop_info loop) } else { - emit_jump_insn (gen_jump (label)); + rtx_insn * ret = emit_jump_insn (gen_jump (label)); + JUMP_LABEL(ret) = label; seq_end = emit_barrier (); } } So we can say, it must be the direct cause (but may be not the root cause). I shall continue analyzing: "why gcc did not set JUMP_LABEL before using it". Welcome any others' ideas, suggestions and completions. Thanks.