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]

[tree-ssa] PATCH to make_catch_expr_blocks


A CATCH_EXPR does not fall through to the next handler; it falls through to
the successor of the try block.

Fixes 22_locale/numpunct/members/pod/2.cc.

Tested athlon-pc-linux-gnu, applied to tree-ssa branch.

2003-08-05  Jason Merrill  <jason@redhat.com>

	* tree-cfg.c (make_catch_expr_blocks): Don't change next_block_link.
	(make_eh_filter_expr_blocks): Likewise.

Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.140
diff -c -p -r1.1.4.140 tree-cfg.c
*** tree-cfg.c	5 Aug 2003 16:10:52 -0000	1.1.4.140
--- tree-cfg.c	5 Aug 2003 20:16:39 -0000
*************** make_catch_expr_blocks (tree *expr_p, tr
*** 700,708 ****
    while (!tsi_end_p (si) && tsi_stmt (si) == NULL)
      tsi_next (&si);
  
-   if (!tsi_end_p (si) && tsi_stmt (si) != NULL_TREE)
-     next_block_link = *(tsi_container (si));
- 
    STRIP_CONTAINERS (expr);
    make_blocks (&CATCH_BODY (expr), next_block_link, expr, NULL);
  }
--- 700,705 ----
*************** make_eh_filter_expr_blocks (tree *expr_p
*** 724,732 ****
    /* Ignore any empty statements at the tail of this tree.  */
    while (!tsi_end_p (si) && tsi_stmt (si) == NULL)
      tsi_next (&si);
- 
-   if (!tsi_end_p (si) && tsi_stmt (si) != NULL_TREE)
-     next_block_link = *(tsi_container (si));
  
    STRIP_CONTAINERS (expr);
    make_blocks (&EH_FILTER_FAILURE (expr), next_block_link, expr, NULL);
--- 721,726 ----

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