This is the mail archive of the gcc-patches@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]

[lno] fix some ICE due to tree-ssa-return


I had messed up when I applied my patch to fix a possible ICE, I applied to the wrong part of the code.

This fixes that and should fix the regressions caused by the other patch:

2004-03-15 Andrew Pinski <pinskia@physics.uc.edu>

        * tree-ssa-return.c (tree_ssa_return):
        Move check for NULL return value above check
        for a modify expr.

Thanks,
Andrew Pinski



Index: tree-ssa-return.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-return.c,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 tree-ssa-return.c
--- tree-ssa-return.c 13 Mar 2004 00:58:38 -0000 1.1.2.3
+++ tree-ssa-return.c 15 Mar 2004 15:05:25 -0000
@@ -130,6 +130,10 @@ tree_ssa_return (void)
if (!returnstmt_other || TREE_CODE (returnstmt_other) != RETURN_EXPR)
continue;


+ /* No reason to do this if we are not returning a value. */
+ if (TREE_OPERAND (returnstmt_other, 0) == NULL)
+ continue;
+
/* If we do not have a modify expression on both returns, there is no point
in doing this optimization. */
if (TREE_CODE (TREE_OPERAND (returnstmt, 0)) != MODIFY_EXPR)
@@ -137,10 +141,6 @@ tree_ssa_return (void)


if (TREE_CODE (TREE_OPERAND (returnstmt_other, 0)) != MODIFY_EXPR)
continue;
-
- /* No reason to do this if we are not returning a value. */
- if (TREE_OPERAND (returnstmt_other, 0) == NULL)
- continue;


       /* Create the new basic block.   */
       new_bb = create_empty_bb (bb_other);


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