GCC Bugzilla – Attachment 7654 Details for
Bug 15855
[3.4/4.0/4.1 Regression] g++ crash with -O2 and -O3 on input file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
PPP
PPP (text/plain), 2.82 KB, created by
Jeffrey A. Law
on 2004-12-02 04:57:19 UTC
(
hide
)
Description:
PPP
Filename:
MIME Type:
Creator:
Jeffrey A. Law
Created:
2004-12-02 04:57:19 UTC
Size:
2.82 KB
patch
obsolete
> * tree.h (save_eptr, save_filt): Now file scoped statics. > (honor_protect_cleanup_actions): Only create save_eptr and > save_filt if they do not already exist. > (lower_eh_constructs): Wipe all knowledge of save_eptr and > save_filt before returning. > >Index: tree-eh.c >=================================================================== >RCS file: /cvs/gcc/gcc/gcc/tree-eh.c,v >retrieving revision 2.20 >diff -c -p -r2.20 tree-eh.c >*** tree-eh.c 23 Sep 2004 14:34:19 -0000 2.20 >--- tree-eh.c 2 Dec 2004 04:54:34 -0000 >*************** Boston, MA 02111-1307, USA. */ >*** 37,42 **** >--- 37,57 ---- > #include "langhooks.h" > #include "ggc.h" > >+ /* In some circumstances we have to save EH data around a nested >+ exception. The EXC_PTR_EXPR and FILTER_EXPR values are saved >+ into these _DECL nodes. >+ >+ We lazily create this pair of _DECL nodes once per function rather >+ than creating a new pair of _DECLs each time we need to save the >+ EXEC_PTR and FILTER. This can save us literally thousands of _DECL >+ nodes when we have many inline destructors with an embedded try block. >+ >+ This is safe as we know the lifetime of the values in these _DECL nodes. >+ Their lifetimes also ensure that globbing these uses into a single >+ pair of _DECL nodes requires no additional PHI_NODEs or SSA_NAMEs when >+ compared to having a pair of _DECL nodes per inline destructor with >+ an embedded try block. */ >+ static tree save_eptr, save_filt; > > /* Nonzero if we are using EH to handle cleanups. */ > static int using_eh_for_cleanups_p = 0; >*************** honor_protect_cleanup_actions (struct le >*** 807,816 **** > we never fallthru from this copy of the finally block. */ > if (finally_may_fallthru) > { >! tree save_eptr, save_filt; >! >! save_eptr = create_tmp_var (ptr_type_node, "save_eptr"); >! save_filt = create_tmp_var (integer_type_node, "save_filt"); > > i = tsi_start (finally); > x = build (EXC_PTR_EXPR, ptr_type_node); >--- 822,834 ---- > we never fallthru from this copy of the finally block. */ > if (finally_may_fallthru) > { >! /* If we have not created _DECLs for saving the EXC_PTR >! and FILTER_EXPR, create them now. */ >! if (!save_eptr) >! { >! save_eptr = create_tmp_var (ptr_type_node, "save_eptr"); >! save_filt = create_tmp_var (integer_type_node, "save_filt"); >! } > > i = tsi_start (finally); > x = build (EXC_PTR_EXPR, ptr_type_node); >*************** lower_eh_constructs (void) >*** 1644,1649 **** >--- 1662,1672 ---- > htab_delete (finally_tree); > > collect_eh_region_array (); >+ >+ /* Wipe the DECLs we use for saving the EXC_PTR and FILTER_EXPR >+ to ensure we create new ones for the next function. */ >+ save_eptr = NULL; >+ save_filt = NULL; > } > > struct tree_opt_pass pass_lower_eh =
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15855
:
6484
|
7585
|
7614
|
7628
|
7646
|
7651
| 7654 |
9484
|
9485