PATCH: small -freorder-block defect

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Tue Mar 14 15:37:00 GMT 2000


At 22:33 14.03.00, Jason Lee Eckhardt wrote:

> >
> >
> >On Sun, Mar 12, 2000 at 07:22:07PM -0800, Jason Eckhardt wrote:
> >> !   verify_flow_info ();
> >> !     {
> >> !       rtx x;
> >> !       for (x = get_insns(); x; x = NEXT_INSN (x))
> >> !    {
> >> !      if (GET_RTX_CLASS (GET_CODE (x)) == 'i'
> >> !          && GET_CODE (x) == JUMP_INSN
> >> !          && returnjump_p (x)
> >> !          && ! (NEXT_INSN (x) && GET_CODE (NEXT_INSN (x)) == BARRIER))
> >> !        error ("reorder_basic_blocks: RETURN not followed by 
> BARRIER!\n");
> >> !    }
> >
> >Put this check in verify_flow_info.  And we should abort rather
> >than emit an error.
> >
> >
> >r~
> >
>
>   committed with above change.
>   jason.

This causes a bootstrap fail on powerpc-linux-gnu with newppc-branch (and 
probably other HAVE_return targets.

The appended patch seems to fix it for me. Opinions?

Franz.

         * function.c (thread_prologue_and_epilogue_insns): Put a
         BARRIER behind a jump converted to a return.

Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.175
diff -u -p -r1.175 function.c
--- function.c  2000/03/14 17:48:48     1.175
+++ function.c  2000/03/14 23:28:29
@@ -6822,6 +6827,7 @@ thread_prologue_and_epilogue_insns (f)
                      delete the edge.  */
                   if (bb->succ->succ_next == NULL)
                     continue;
+                 emit_barrier_after (jump);
                 }
               else
                 continue;



More information about the Gcc-patches mailing list