[PATCH] Fix Cilk+ catch_exc.cc
Richard Biener
rguenther@suse.de
Mon Feb 10 08:48:00 GMT 2014
On Sat, 8 Feb 2014, Jakub Jelinek wrote:
> 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?
Ok.
Thanks,
Richard.
> 2014-02-08 Jakub Jelinek <jakub@redhat.com>
>
> * 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
>
More information about the Gcc-patches
mailing list