Fix null pointer crash and a merge error
authorBernd Schmidt <bernds@redhat.com>
Tue, 30 Jul 2002 21:48:13 +0000 (21:48 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 30 Jul 2002 21:48:13 +0000 (21:48 +0000)
From-SVN: r55884

gcc/ChangeLog
gcc/ifcvt.c

index cc50ca838ab1e27714e34b6c26e7297d1443bde8..5158ec0a8b6e542b9e8924e010a28f55bddca3c9 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-30  Bernd Schmidt  <bernds@redhat.com>
+
+       * ifcvt.c (cond_exec_process_if_block): Fix a merging error.
+       Bail out early if false_expr is NULL and we'd crash due to this.
+
 2002-07-30  David Edelsohn  <edelsohn@gnu.org>
            Zack Weinberg  <zack@codesourcery.com>
 
index 61dd48d7ce35fad8e01aa640085cb2e092879148..3ce996f8edde5d37b8e69806a659d4532b1e5a14 100644 (file)
@@ -423,17 +423,6 @@ cond_exec_process_if_block (ce_info, do_multiple_p)
   else
     false_expr = NULL_RTX;
 
-#ifdef IFCVT_MODIFY_TESTS
-  /* If the machine description needs to modify the tests, such as setting a
-     conditional execution register from a comparison, it can do so here.  */
-  IFCVT_MODIFY_TESTS (true_expr, false_expr, test_bb, then_bb, else_bb,
-                     join_bb);
-
-  /* See if the conversion failed */
-  if (!true_expr || !false_expr)
-    goto fail;
-#endif
-
 #ifdef IFCVT_MODIFY_TESTS
   /* If the machine description needs to modify the tests, such as setting a
      conditional execution register from a comparison, it can do so here.  */
@@ -460,6 +449,9 @@ cond_exec_process_if_block (ce_info, do_multiple_p)
       basic_block bb = test_bb;
       basic_block last_test_bb = ce_info->last_test_bb;
 
+      if (! false_expr)
+       goto fail;
+
       do
        {
          rtx start, end;