This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCHES][TUPLES] Fix libobjc build and objc bootstrapping
- From: "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>
- To: "Diego Novillo" <dnovillo at google dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Apr 2008 19:23:28 -0700
- Subject: [PATCHES][TUPLES] Fix libobjc build and objc bootstrapping
Hi Diego,
Could you please review this? This fixes the configure problem of
libobjc. Once the problem is fixed, we have a clean bootstrap.
-Doug
--------
008-04-30 Doug Kwan <dougkwan@google.com>
* cfgexpand.c (gimple_to_tree): Change code to annotate EH region
numbers only if numbers are greater than zero. Also propagate EH
region number to CALL_EXPRs nested in assignments.
------
Index: gcc/gcc/cfgexpand.c
===================================================================
--- gcc/gcc/cfgexpand.c (revision 134839)
+++ gcc/gcc/cfgexpand.c (working copy)
@@ -280,8 +280,21 @@ gimple_to_tree (gimple stmt)
/* If STMT is inside an exception region, record it in the generated
expression. */
rn = lookup_stmt_eh_region (stmt);
- ann = get_tree_common_ann (t);
- ann->rn = rn;
+ if (rn >= 0)
+ {
+ tree call = get_call_expr_in (t);
+
+ ann = get_tree_common_ann (t);
+ ann->rn = rn;
+
+ /* For a CALL_EXPR on the RHS of an assignment, calls.c looks up
+ the CALL_EXPR not the assignment statment for EH region number. */
+ if (call && call != t)
+ {
+ ann = get_tree_common_ann (call);
+ ann->rn = rn;
+ }
+ }
/* Set EXPR_LOCATION in all the embedded expressions. */
loc = gimple_location (stmt);