https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97777

--- Comment #3 from qinzhao at gcc dot gnu.org ---
This does not look like a bug in the new -fzero-call-used-regs implemenation.

it's more likely an existing bug in data flow analysis. 

I made the following change in gcc/function.c to make the new pass to do
nothing except a df_analyze:

qinzhao@gcc10:~/Work/write_gcc/gcc$ git diff function.c
diff --git a/gcc/function.c b/gcc/function.c
index 004fa389207..658b08ae215 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6658,13 +6658,14 @@ pass_zero_call_used_regs::execute (function *fun)
   /* Iterate over the function's return instructions and insert any
      register zeroing required by the -fzero-call-used-regs command-line
      option or the "zero_call_used_regs" function attribute.  */
+#if 0
   FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR_FOR_FN (cfun)->preds)
     {
       rtx_insn *insn = BB_END (e->src);
       if (JUMP_P (insn) && ANY_RETURN_P (JUMP_LABEL (insn)))
        gen_call_used_regs_seq (insn, zero_regs_type);
     }
-
+#endif
   return 0;
 }

with this gcc, the exactly same ICE still there.

Reply via email to