I'll fix the paths and whitespace before pushing, but can someone review 
this rough draft patch.


test.cxx
-----------

static void foo() {}

int main() {
      try {
      }
      catch(...) {
          foo();
      }
      return 0;
}

------------------

diff --git a/GCC/gcc/passes.c b/GCC/gcc/passes.c
index b533607..ae41901 100644
--- a/GCC/gcc/passes.c
+++ b/GCC/gcc/passes.c
@@ -472,7 +472,7 @@ init_optimization_passes (void)
    /* All passes needed to lower the function into shape optimizers can
       operate on.  */
    p = &all_lowering_passes;
-  NEXT_PASS (pass_remove_useless_stmts);
+
    NEXT_PASS (pass_mudflap_1);
    NEXT_PASS (pass_lower_omp);
    NEXT_PASS (pass_lower_cf);
diff --git a/GCC/gcc/tree-cfg.c b/GCC/gcc/tree-cfg.c
index b280027..59a84ea 100644
--- a/GCC/gcc/tree-cfg.c
+++ b/GCC/gcc/tree-cfg.c
@@ -602,7 +602,7 @@ make_edges (void)
    fold_cond_expr_cond ();

    /* Clean up the graph and warn for unreachable code.  */
-  cleanup_tree_cfg ();
+
  }


diff --git a/GCC/gcc/tree-eh.c b/GCC/gcc/tree-eh.c
index d14e1ee..f17cce1 100644
--- a/GCC/gcc/tree-eh.c
+++ b/GCC/gcc/tree-eh.c
@@ -1372,7 +1372,7 @@ lower_try_finally (struct leh_state *state, tree *tp)

    /* Determine if any exceptions are possible within the try block.  */
    if (using_eh_for_cleanups_p)
-    this_tf.may_throw = get_eh_region_may_contain_throw (this_tf.region);
+    this_tf.may_throw = true;
    if (this_tf.may_throw)
      {
        this_tf.eh_label = create_artificial_label ();
@@ -1445,12 +1445,6 @@ lower_catch (struct leh_state *state, tree *tp)

    lower_eh_constructs_1 (&this_state, &TREE_OPERAND (*tp, 0));

-  if (!get_eh_region_may_contain_throw (try_region))
-    {
-      *tp = TREE_OPERAND (*tp, 0);
-      return;
-    }
-
    out_label = NULL;
    for (i = tsi_start (TREE_OPERAND (*tp, 1)); !tsi_end_p (i); )
      {
@@ -1512,12 +1506,6 @@ lower_eh_filter (struct leh_state *state, tree *tp)

    lower_eh_constructs_1 (&this_state, &TREE_OPERAND (*tp, 0));

-  if (!get_eh_region_may_contain_throw (this_region))
-    {
-      *tp = TREE_OPERAND (*tp, 0);
-      return;
-    }
-
    lower_eh_constructs_1 (state, &EH_FILTER_FAILURE (inner));
    TREE_OPERAND (*tp, 1) = EH_FILTER_FAILURE (inner);

@@ -1551,12 +1539,6 @@ lower_cleanup (struct leh_state *state, tree *tp)

    lower_eh_constructs_1 (&this_state, &TREE_OPERAND (*tp, 0));

-  if (!get_eh_region_may_contain_throw (this_region))
-    {
-      *tp = TREE_OPERAND (*tp, 0);
-      return;
-    }
-
    /* Build enough of a try-finally state so that we can reuse
       honor_protect_cleanup_actions.  */
    memset (&fake_tf, 0, sizeof (fake_tf));

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to