Hi Jakub,
This should fix PR 59834
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59834) on i686-linux.
Thanks,
Balaji V. Iyer.
> -----Original Message-----
> From: Jakub Jelinek [mailto:[email protected]]
> Sent: Friday, February 7, 2014 6:51 PM
> To: Iyer, Balaji V; Richard Biener
> Cc: [email protected]
> Subject: [PATCH] Fix Cilk+ catch_exc.cc
>
> Hi!
>
> install_builtin calls build_fn_decl, which sets TREE_NOTHROW by default.
> In most cases I think that is desirable, but __cilkrts_rethrow apparently
> conditionally throws an exception, thus marking it TREE_NOTHROW is very
> much undesirable and the fact that the testcase happened to work (except
> for i?86
> recently) must have been by pure accident (that the call was between two
> instructions belonging to the right EH region?).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2014-02-08 Jakub Jelinek <[email protected]>
>
> * cilk-common.c (cilk_init_builtins): Clear TREE_NOTHROW
> flag on __cilkrts_rethrow builtin.
>
> --- gcc/cilk-common.c.jj 2014-02-06 23:06:47.000000000 +0100
> +++ gcc/cilk-common.c 2014-02-07 11:11:15.253128977 +0100
> @@ -285,6 +285,7 @@ cilk_init_builtins (void)
> /* __cilkrts_rethrow (struct stack_frame *); */
> cilk_rethrow_fndecl = install_builtin ("__cilkrts_rethrow", fptr_fun,
> BUILT_IN_CILK_RETHROW, false);
> + TREE_NOTHROW (cilk_rethrow_fndecl) = 0;
>
> /* __cilkrts_save_fp_ctrl_state (__cilkrts_stack_frame *); */
> cilk_save_fp_fndecl = install_builtin ("__cilkrts_save_fp_ctrl_state",
>
> Jakub