This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR tree-optimization/17697
- From: Jason Merrill <jason at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Sep 2004 14:16:09 -0400
- Subject: Re: [PATCH] Fix PR tree-optimization/17697
- References: <20040928195217.GL31909@devserv.devel.redhat.com>
On Tue, 28 Sep 2004 15:52:17 -0400, Jakub Jelinek <jakub@redhat.com> wrote:
> I'd still appreciate if C++ frontend folks looked at duplicate_decls
> and fixed the bogus clearing of TREE_NOTHROW flag if both the builtin
> is throw () and declaration in program too.
Fixed thus. Tested x86_64-pc-linux-gnu, applied to trunk.
2004-09-29 Jason Merrill <jason@redhat.com>
PR tree-optimization/17697
* decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
*** cp/decl.c.~1~ 2004-09-28 14:17:20.000000000 -0400
--- cp/decl.c 2004-09-29 11:49:18.887533042 -0400
*************** duplicate_decls (tree newdecl, tree oldd
*** 1719,1724 ****
--- 1719,1726 ----
TREE_READONLY (olddecl) = 1;
if (TREE_THIS_VOLATILE (newdecl))
TREE_THIS_VOLATILE (olddecl) = 1;
+ if (TREE_NOTHROW (newdecl))
+ TREE_NOTHROW (olddecl) = 1;
/* Merge the initialization information. */
if (DECL_INITIAL (newdecl) == NULL_TREE