This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082, take 2)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2014 22:56:52 +0100
- Subject: [PATCH] Fix up __builtin_setjmp_receiver handling (PR c++/60082, take 2)
- Authentication-results: sourceware.org; auth=none
- References: <20140206073732 dot GQ12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061008370 dot 29326 at zhemvz dot fhfr dot qr> <20140206092242 dot GR12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061027540 dot 29326 at zhemvz dot fhfr dot qr> <20140206094705 dot GS12671 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1402061048500 dot 29326 at zhemvz dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 06, 2014 at 11:00:14AM +0100, Richard Biener wrote:
> Ah, so __builtin_setjmp_receiver is like setjmp in this regard
> and setjmp is LEAF (it's a stmt that doesn't direct control-flow
> anywhere else). So __builtin_setjmp_receiver should be LEAF as well
> (and so should __builtin_setjmp_setup).
>
> Doesn't sound dangerous at all to me ...
This passed bootstrap/regtest and fixed the timeouts too. Ok for trunk?
2014-02-06 Jakub Jelinek <jakub@redhat.com>
PR c++/60082
* tree.c (build_common_builtin_nodes): Set ECF_LEAF for
__builtin_setjmp_receiver.
Revert
2014-02-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* g++.dg/cilk-plus/CK/catch_exc.cc: Disable test for -O1.
* c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.
--- gcc/tree.c.jj 2014-02-04 10:30:15.010121513 +0100
+++ gcc/tree.c 2014-02-06 17:03:49.034656060 +0100
@@ -9980,7 +9980,7 @@ build_common_builtin_nodes (void)
ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE);
local_define_builtin ("__builtin_setjmp_receiver", ftype,
BUILT_IN_SETJMP_RECEIVER,
- "__builtin_setjmp_receiver", ECF_NOTHROW);
+ "__builtin_setjmp_receiver", ECF_NOTHROW | ECF_LEAF);
ftype = build_function_type_list (ptr_type_node, NULL_TREE);
local_define_builtin ("__builtin_stack_save", ftype, BUILT_IN_STACK_SAVE,
--- gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc (revision 207519)
+++ gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc (revision 207518)
@@ -1,7 +1,6 @@
/* { dg-options "-fcilkplus" } */
/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
-/* { dg-skip-if "" { *-*-* } { "-O1" } { "" } } */
#include <assert.h>
#include <unistd.h>
--- gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c (revision 207519)
+++ gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c (revision 207518)
@@ -1,7 +1,6 @@
/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-fcilkplus" } */
/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
-/* { dg-skip-if "" { *-*-* } { "-O1" } { "" } } */
#include <stdlib.h>
#define DEFAULT_VALUE 30
Jakub