This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree0ssa] Dead const/pure function removal take II


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]