This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/65803] blackfin: internal compiler error: segment fault linux kernel


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]