From: Jason Merrill Date: Tue, 11 Nov 1997 02:32:50 +0000 (-0500) Subject: [multiple changes] X-Git-Tag: releases/egcs-1.0.0~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faee6a5f2fc975f3c4c4c17aef620f62324c0e06;p=thirdparty%2Fgcc.git [multiple changes] Sun Oct 19 09:07:38 1997 Richard Kenner * stmt.c (using_eh_for_cleanups_p): New variable. (using_eh_for_cleanups): New function. (expand_decl_cleanup): Don't call expand_eh_region_start_tree unless using EH for cleanups. Sun Oct 26 01:28:29 1997 Richard Kenner * decl.c (init_decl_processing): Call using_eh_for_cleanups. From-SVN: r16424 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd367f465b52..6cd456713127 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +Mon Nov 10 03:02:19 1997 Jason Merrill + + * stmt.c (expand_decl_cleanup_no_eh): New fn. + + * except.c (expand_leftover_cleanups): do_pending_stack_adjust. + + Sun Oct 19 09:07:38 1997 Richard Kenner + + * stmt.c (using_eh_for_cleanups_p): New variable. + (using_eh_for_cleanups): New function. + (expand_decl_cleanup): Don't call expand_eh_region_start_tree + unless using EH for cleanups. + Mon Nov 10 00:05:56 1997 Jeffrey A Law (law@cygnus.com) * alias.c (MAX_ALIAS_LOOP_PASSES): Define. diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 577bd4ee38e6..d138ed2dbfbd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -82,6 +82,10 @@ Fri Oct 31 01:47:57 1997 Jason Merrill when we rethrow. (expand_builtin_throw): Don't refer to empty_fndecl. +Sun Oct 26 01:28:29 1997 Richard Kenner + + * decl.c (init_decl_processing): Call using_eh_for_cleanups. + Thu Oct 23 02:01:30 1997 Jason Merrill * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 54e79dd3d52c..667f1859b384 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5575,6 +5575,9 @@ init_decl_processing () /* Prepare to check format strings against argument lists. */ init_function_format_info (); + + /* Show we use EH for cleanups. */ + using_eh_for_cleanups (); } /* initialize type descriptor type node of various rtti type. */ diff --git a/gcc/stmt.c b/gcc/stmt.c index 9416ecb74d49..4cae1ce3bf3e 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -445,6 +445,12 @@ struct label_chain struct label_chain *next; tree label; }; + + +/* Non-zero if we are using EH to handle cleanus. */ +static int using_eh_for_cleanups_p = 0; + + static void expand_goto_internal PROTO((tree, rtx, rtx)); static void bc_expand_goto_internal PROTO((enum bytecode_opcode, struct bc_label *, tree)); @@ -488,6 +494,12 @@ static struct case_node *case_tree2list PROTO((case_node *, case_node *)); extern rtx bc_allocate_local (); extern rtx bc_allocate_variable_array (); +void +using_eh_for_cleanups () +{ + using_eh_for_cleanups_p = 1; +} + void init_stmt () { @@ -3972,7 +3984,8 @@ expand_decl_cleanup (decl, cleanup) /* If this was optimized so that there is no exception region for the cleanup, then mark the TREE_LIST node, so that we can later tell if we need to call expand_eh_region_end. */ - if (expand_eh_region_start_tree (decl, cleanup)) + if (! using_eh_for_cleanups_p + || expand_eh_region_start_tree (decl, cleanup)) TREE_ADDRESSABLE (t) = 1; if (cond_context)