This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree0ssa] Dead const/pure function removal take II
- From: Steven Bosscher <steven at gcc dot gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Nov 2003 01:28:58 +0100
- Subject: Re: [tree0ssa] Dead const/pure function removal take II
- Organization: SUSE Labs
Re: http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00739.html
Hi,
FYI, even though RTH has already approved this patch, it seems quite wrong to
me:
+ static void
+ update_call_expr_flags (tree call)
+ {
+ ? tree decl = get_callee_fndecl (call);
+ ? if (!decl)
+ ? ? return;
+ ? if (call_expr_flags (call) & (ECF_CONST | ECF_PURE))
+ ? ? TREE_SIDE_EFFECTS (call) = 0;
+ ? if (TREE_NOTHROW (decl))
+ ? ? TREE_NOTHROW (call) = 0;
+ }
We're now clearing the TREE_NOTHROW flag for calls to functions that actually
can throw. Instead, we probably want.
? TREE_NOTHROW (call) = TREE_NOTHROW (decl);
I already told Honza, and he said he was bootstrapping/testing a fixed patch.
Gr.
Steven