Index: lto-wrapper.c =================================================================== --- lto-wrapper.c (revision 204343) +++ lto-wrapper.c (working copy) @@ -409,6 +409,7 @@ merge_and_complain (struct cl_decoded_op case OPT_fpie: case OPT_fcommon: case OPT_fexceptions: + case OPT_fnon_call_exceptions: case OPT_fgnu_tm: /* Do what the old LTO code did - collect exactly one option setting per OPT code, we pick the first we encounter. @@ -573,6 +574,7 @@ run_gcc (unsigned argc, char *argv[]) case OPT_fpie: case OPT_fcommon: case OPT_fexceptions: + case OPT_fnon_call_exceptions: case OPT_fgnu_tm: case OPT_freg_struct_return: case OPT_fpcc_struct_return: Index: c-family/c-common.c =================================================================== --- c-family/c-common.c (revision 204343) +++ c-family/c-common.c (working copy) @@ -358,6 +358,7 @@ static tree handle_vector_size_attribute bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *); +static tree handle_nothrowcall_attribute (tree *, tree, tree, int, bool *); static tree handle_cleanup_attribute (tree *, tree, tree, int, bool *); static tree handle_warn_unused_result_attribute (tree *, tree, tree, int, bool *); @@ -708,6 +709,10 @@ const struct attribute_spec c_common_att handle_nonnull_attribute, false }, { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute, false }, + /* For internal use only. The name contains a space to prevent its + use in source code. */ + { "nothrow call", 0, 0, true, false, false, + handle_nothrowcall_attribute, false }, { "may_alias", 0, 0, false, true, false, NULL, false }, { "cleanup", 1, 1, true, false, false, handle_cleanup_attribute, false }, @@ -8788,6 +8793,29 @@ handle_nothrow_attribute (tree *node, tr return NULL_TREE; } +/* Handle a "nothrow call" attribute: arguments as in struct + attribute_spec.handler. This attribute means that the function is + to be treated as not throwing, unless -fnon-call-exceptions is + being used. + + This attribute is only used for builtin functions defined by the + compiler. If a builtin function indirects through an unknown + pointer, and the builtin function is replaced by inline code, we + need to know that that inline code might trap. This attribute can + not be specified by user code, because user code can not write a + function that is replaced by inline code by the backend. */ + +static tree +handle_nothrowcall_attribute (tree *node, tree name, tree args, int flags, + bool *no_add_attrs) +{ + gcc_assert (TREE_CODE (*node) == FUNCTION_DECL); + if (!flag_non_call_exceptions) + return handle_nothrow_attribute (node, name, args, flags, no_add_attrs); + *no_add_attrs = true; + return NULL_TREE; +} + /* Handle a "cleanup" attribute; arguments as in struct attribute_spec.handler. */ Index: testsuite/g++.dg/ext/sync-4.C =================================================================== --- testsuite/g++.dg/ext/sync-4.C (revision 0) +++ testsuite/g++.dg/ext/sync-4.C (revision 0) @@ -0,0 +1,121 @@ +/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */ +/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */ + +/* Verify that the builtin functions are correctly marked as trapping + when using -fnon-call-exceptions. */ + +#include +#include + +typedef int int32_t __attribute__ ((mode (SI))); +typedef int int64_t __attribute__ ((mode (DI))); + +#define FN(IDX, RET, CALL) \ +static RET f ## IDX (void *p) __attribute__ ((noinline)); \ +static RET \ +f ## IDX (void *p) \ +{ \ + return CALL; \ +} \ +static void \ +t ## IDX () \ +{ \ + try \ + { \ + f ## IDX(0); \ + } \ + catch (...) \ + { \ + return; \ + } \ + abort(); \ +} + +FN(1, int64_t, (__sync_fetch_and_add((int64_t*)p, 1))) +FN(2, int64_t, (__sync_fetch_and_sub((int64_t*)p, 1))) +FN(3, int64_t, (__sync_fetch_and_or((int64_t*)p, 1))) +FN(4, int64_t, (__sync_fetch_and_and((int64_t*)p, 1))) +FN(5, int64_t, (__sync_fetch_and_xor((int64_t*)p, 1))) +FN(6, int64_t, (__sync_fetch_and_nand((int64_t*)p, 1))) + +FN( 7, int64_t, (__sync_add_and_fetch((int64_t*)p, 1))) +FN( 8, int64_t, (__sync_sub_and_fetch((int64_t*)p, 1))) +FN( 9, int64_t, (__sync_or_and_fetch((int64_t*)p, 1))) +FN(10, int64_t, (__sync_and_and_fetch((int64_t*)p, 1))) +FN(11, int64_t, (__sync_xor_and_fetch((int64_t*)p, 1))) +FN(12, int64_t, (__sync_nand_and_fetch((int64_t*)p, 1))) + +FN(13, bool, (__sync_bool_compare_and_swap((int64_t*)p, 1, 2))) +FN(14, int64_t, (__sync_val_compare_and_swap((int64_t*)p, 1, 2))) + +FN(15, int64_t, (__sync_lock_test_and_set((int64_t*)p, 1))) +FN(16, void, (__sync_lock_release((int64_t*)p))) + +FN(17, bool, (__atomic_test_and_set((int64_t*)p, __ATOMIC_SEQ_CST))) +FN(18, void, (__atomic_clear((int64_t*)p, __ATOMIC_SEQ_CST))) + +FN(19, void, (__atomic_exchange((int64_t*)p, (int64_t*)0, (int64_t*)0, __ATOMIC_SEQ_CST))) +FN(20, int64_t, (__atomic_exchange_n((int64_t*)p, 1, 2))) + +FN(21, void, (__atomic_load((int64_t*)p, (int64_t*)0, __ATOMIC_SEQ_CST))) +FN(22, int64_t, (__atomic_load_n((int64_t*)p, __ATOMIC_SEQ_CST))) + +FN(23, bool, (__atomic_compare_exchange((int64_t*)p, (int64_t*)0, (int64_t*)0, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST))) +FN(24, bool, (__atomic_compare_exchange_n((int64_t*)p, (int64_t*)0, 1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST))) + +FN(25, void, (__atomic_store((int64_t*)p, (int64_t*)0, __ATOMIC_SEQ_CST))) +FN(26, void, (__atomic_store_n((int64_t*)p, 1, __ATOMIC_SEQ_CST))) + +FN(27, int64_t, (__atomic_add_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(28, int64_t, (__atomic_sub_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(29, int64_t, (__atomic_and_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(30, int64_t, (__atomic_nand_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(31, int64_t, (__atomic_xor_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(32, int64_t, (__atomic_or_fetch((int64_t*)p, 1, __ATOMIC_SEQ_CST))) + +FN(33, int64_t, (__atomic_fetch_add((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(34, int64_t, (__atomic_fetch_sub((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(35, int64_t, (__atomic_fetch_and((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(36, int64_t, (__atomic_fetch_nand((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(37, int64_t, (__atomic_fetch_xor((int64_t*)p, 1, __ATOMIC_SEQ_CST))) +FN(38, int64_t, (__atomic_fetch_or((int64_t*)p, 1, __ATOMIC_SEQ_CST))) + +static void +handler(int) +{ + sigset_t clear; + + sigfillset (&clear); + sigprocmask (SIG_UNBLOCK, &clear, NULL); + throw 0; +} + +int +main () +{ + signal (SIGSEGV, handler); + signal (SIGBUS, handler); + + t1(); + t2(); + t3(); + t4(); + t5(); + t6(); + t7(); + t8(); + t9(); + t10(); + t11(); + t12(); + t13(); + t14(); + t15(); + t16(); + t17(); + t18(); + t19(); + t20(); + + exit(0); +} Index: builtin-attrs.def =================================================================== --- builtin-attrs.def (revision 204343) +++ builtin-attrs.def (working copy) @@ -91,6 +91,7 @@ DEF_ATTR_IDENT (ATTR_MALLOC, "malloc") DEF_ATTR_IDENT (ATTR_NONNULL, "nonnull") DEF_ATTR_IDENT (ATTR_NORETURN, "noreturn") DEF_ATTR_IDENT (ATTR_NOTHROW, "nothrow") +DEF_ATTR_IDENT (ATTR_NOTHROWCALL, "nothrow call") DEF_ATTR_IDENT (ATTR_LEAF, "leaf") DEF_ATTR_IDENT (ATTR_FNSPEC, "fn spec") DEF_ATTR_IDENT (ATTR_PRINTF, "printf") @@ -119,6 +120,11 @@ DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LIST, A DEF_ATTR_TREE_LIST (ATTR_NOTHROW_LEAF_LIST, ATTR_LEAF, ATTR_NULL, ATTR_NOTHROW_LIST) +DEF_ATTR_TREE_LIST (ATTR_NOTHROWCALL_LIST, ATTR_NOTHROWCALL, \ + ATTR_NULL, ATTR_NULL) +DEF_ATTR_TREE_LIST (ATTR_NOTHROWCALL_LEAF_LIST, ATTR_LEAF, \ + ATTR_NULL, ATTR_NOTHROWCALL_LIST) + DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LIST, ATTR_CONST, \ ATTR_NULL, ATTR_NOTHROW_LIST) DEF_ATTR_TREE_LIST (ATTR_CONST_NOTHROW_LEAF_LIST, ATTR_CONST, \ Index: sync-builtins.def =================================================================== --- sync-builtins.def (revision 204343) +++ sync-builtins.def (working copy) @@ -29,559 +29,565 @@ along with GCC; see the file COPYING3. "_1" through "_16" versions, plus some extra casts. */ DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_N, "__sync_fetch_and_add", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_1, "__sync_fetch_and_add_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_2, "__sync_fetch_and_add_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_4, "__sync_fetch_and_add_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_8, "__sync_fetch_and_add_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_16, "__sync_fetch_and_add_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_N, "__sync_fetch_and_sub", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_1, "__sync_fetch_and_sub_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_2, "__sync_fetch_and_sub_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_4, "__sync_fetch_and_sub_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_8, "__sync_fetch_and_sub_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_16, "__sync_fetch_and_sub_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_N, "__sync_fetch_and_or", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_1, "__sync_fetch_and_or_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_2, "__sync_fetch_and_or_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_4, "__sync_fetch_and_or_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_8, "__sync_fetch_and_or_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_16, "__sync_fetch_and_or_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_N, "__sync_fetch_and_and", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_1, "__sync_fetch_and_and_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_2, "__sync_fetch_and_and_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_4, "__sync_fetch_and_and_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_8, "__sync_fetch_and_and_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_16, "__sync_fetch_and_and_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_N, "__sync_fetch_and_xor", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_1, "__sync_fetch_and_xor_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_2, "__sync_fetch_and_xor_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_4, "__sync_fetch_and_xor_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_8, "__sync_fetch_and_xor_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_16, "__sync_fetch_and_xor_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_N, "__sync_fetch_and_nand", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_1, "__sync_fetch_and_nand_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_2, "__sync_fetch_and_nand_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_4, "__sync_fetch_and_nand_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_8, "__sync_fetch_and_nand_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_16, "__sync_fetch_and_nand_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_N, "__sync_add_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_1, "__sync_add_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_2, "__sync_add_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_4, "__sync_add_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_8, "__sync_add_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_16, "__sync_add_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_N, "__sync_sub_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_1, "__sync_sub_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_2, "__sync_sub_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_4, "__sync_sub_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_8, "__sync_sub_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_16, "__sync_sub_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_N, "__sync_or_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_1, "__sync_or_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_2, "__sync_or_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_4, "__sync_or_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_8, "__sync_or_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_16, "__sync_or_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_N, "__sync_and_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_1, "__sync_and_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_2, "__sync_and_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_4, "__sync_and_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_8, "__sync_and_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_16, "__sync_and_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_N, "__sync_xor_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_1, "__sync_xor_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_2, "__sync_xor_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_4, "__sync_xor_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_8, "__sync_xor_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_16, "__sync_xor_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_N, "__sync_nand_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_1, "__sync_nand_and_fetch_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_2, "__sync_nand_and_fetch_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_4, "__sync_nand_and_fetch_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_8, "__sync_nand_and_fetch_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_16, "__sync_nand_and_fetch_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_N, "__sync_bool_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_1, "__sync_bool_compare_and_swap_1", - BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_2, "__sync_bool_compare_and_swap_2", - BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4, "__sync_bool_compare_and_swap_4", - BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8, "__sync_bool_compare_and_swap_8", - BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_16, "__sync_bool_compare_and_swap_16", - BT_FN_BOOL_VPTR_I16_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N, "__sync_val_compare_and_swap", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_1, "__sync_val_compare_and_swap_1", - BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_2, "__sync_val_compare_and_swap_2", - BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4, "__sync_val_compare_and_swap_4", - BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8, "__sync_val_compare_and_swap_8", - BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16, "__sync_val_compare_and_swap_16", - BT_FN_I16_VPTR_I16_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_N, "__sync_lock_test_and_set", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_1, "__sync_lock_test_and_set_1", - BT_FN_I1_VPTR_I1, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_2, "__sync_lock_test_and_set_2", - BT_FN_I2_VPTR_I2, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_4, "__sync_lock_test_and_set_4", - BT_FN_I4_VPTR_I4, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_8, "__sync_lock_test_and_set_8", - BT_FN_I8_VPTR_I8, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_16, "__sync_lock_test_and_set_16", - BT_FN_I16_VPTR_I16, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_N, "__sync_lock_release", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_1, "__sync_lock_release_1", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_2, "__sync_lock_release_2", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_4, "__sync_lock_release_4", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_8, "__sync_lock_release_8", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_16, "__sync_lock_release_16", - BT_FN_VOID_VPTR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SYNCHRONIZE, "__sync_synchronize", - BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID, ATTR_NOTHROWCALL_LEAF_LIST) /* __sync* builtins for the C++ memory model. */ DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_TEST_AND_SET, "__atomic_test_and_set", - BT_FN_BOOL_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_CLEAR, "__atomic_clear", BT_FN_VOID_VPTR_INT, - ATTR_NOTHROW_LEAF_LIST) + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE, "__atomic_exchange", - BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_N, "__atomic_exchange_n", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_1, "__atomic_exchange_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_2, "__atomic_exchange_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_4, "__atomic_exchange_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_8, "__atomic_exchange_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_16, "__atomic_exchange_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD, "__atomic_load", - BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_N, "__atomic_load_n", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_1, "__atomic_load_1", - BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_2, "__atomic_load_2", - BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_4, "__atomic_load_4", - BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_8, "__atomic_load_8", - BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_16, "__atomic_load_16", - BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE, "__atomic_compare_exchange", BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT, - ATTR_NOTHROW_LEAF_LIST) + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N, "__atomic_compare_exchange_n", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_1, "__atomic_compare_exchange_1", - BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_2, "__atomic_compare_exchange_2", - BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4, "__atomic_compare_exchange_4", - BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_8, "__atomic_compare_exchange_8", - BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_16, "__atomic_compare_exchange_16", - BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT, + ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE, "__atomic_store", - BT_FN_VOID_SIZE_VPTR_PTR_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_SIZE_VPTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_N, "__atomic_store_n", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_1, "__atomic_store_1", - BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_2, "__atomic_store_2", - BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_4, "__atomic_store_4", - BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_8, "__atomic_store_8", - BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_16, "__atomic_store_16", - BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_N, "__atomic_add_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_1, "__atomic_add_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_2, "__atomic_add_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_4, "__atomic_add_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_8, "__atomic_add_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_16, "__atomic_add_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_N, "__atomic_sub_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_1, "__atomic_sub_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_2, "__atomic_sub_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_4, "__atomic_sub_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_8, "__atomic_sub_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_16, "__atomic_sub_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_N, "__atomic_and_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_1, "__atomic_and_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_2, "__atomic_and_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_4, "__atomic_and_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_8, "__atomic_and_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_16, "__atomic_and_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_N, "__atomic_nand_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_1, "__atomic_nand_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_2, "__atomic_nand_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_4, "__atomic_nand_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_8, "__atomic_nand_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_16, "__atomic_nand_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_N, "__atomic_xor_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_1, "__atomic_xor_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_2, "__atomic_xor_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_4, "__atomic_xor_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_8, "__atomic_xor_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_16, "__atomic_xor_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_N, "__atomic_or_fetch", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_1, "__atomic_or_fetch_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_2, "__atomic_or_fetch_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_4, "__atomic_or_fetch_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_8, "__atomic_or_fetch_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_16, "__atomic_or_fetch_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_N, "__atomic_fetch_add", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_1, "__atomic_fetch_add_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_2, "__atomic_fetch_add_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_4, "__atomic_fetch_add_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_8, "__atomic_fetch_add_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_16, "__atomic_fetch_add_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_N, "__atomic_fetch_sub", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_1, "__atomic_fetch_sub_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_2, "__atomic_fetch_sub_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_4, "__atomic_fetch_sub_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_8, "__atomic_fetch_sub_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_16, "__atomic_fetch_sub_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_N, "__atomic_fetch_and", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_1, "__atomic_fetch_and_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_2, "__atomic_fetch_and_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_4, "__atomic_fetch_and_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_8, "__atomic_fetch_and_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_16, "__atomic_fetch_and_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_N, "__atomic_fetch_nand", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_1, "__atomic_fetch_nand_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_2, "__atomic_fetch_nand_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_4, "__atomic_fetch_nand_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_8, "__atomic_fetch_nand_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_16, "__atomic_fetch_nand_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_N, "__atomic_fetch_xor", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_1, "__atomic_fetch_xor_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_2, "__atomic_fetch_xor_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_4, "__atomic_fetch_xor_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_8, "__atomic_fetch_xor_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_16, "__atomic_fetch_xor_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_N, "__atomic_fetch_or", - BT_FN_VOID_VAR, ATTR_NOTHROW_LEAF_LIST) + BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_1, "__atomic_fetch_or_1", - BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_2, "__atomic_fetch_or_2", - BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4, "__atomic_fetch_or_4", - BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_8, "__atomic_fetch_or_8", - BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_16, "__atomic_fetch_or_16", - BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROW_LEAF_LIST) + BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST) DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE, "__atomic_always_lock_free", Index: lto-opts.c =================================================================== --- lto-opts.c (revision 204343) +++ lto-opts.c (working copy) @@ -77,7 +77,7 @@ lto_write_options (void) obstack_init (&temporary_obstack); - /* Output options that affect GIMPLE IL semantics and are implicitely + /* Output options that affect GIMPLE IL semantics and are implicitly enabled by the frontend. This for now includes an explicit set of options that we also handle explicitly in lto-wrapper.c. In the end the effects on GIMPLE IL @@ -88,8 +88,13 @@ lto_write_options (void) if (global_options.x_flag_exceptions) append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fexceptions"); + /* -fnon-call-exceptions changes the generation of exception + regions. It is enabled implicitly by the Go frontend. */ + if (global_options.x_flag_non_call_exceptions) + append_to_collect_gcc_options (&temporary_obstack, &first_p, + "-fnon-call-exceptions"); - /* Output explicitely passed options. */ + /* Output explicitly passed options. */ for (i = 1; i < save_decoded_options_count; ++i) { struct cl_decoded_option *option = &save_decoded_options[i]; Index: ada/gcc-interface/utils.c =================================================================== --- ada/gcc-interface/utils.c (revision 204343) +++ ada/gcc-interface/utils.c (working copy) @@ -84,6 +84,7 @@ tree gnat_raise_decls_ext[(int) LAST_REA /* Forward declarations for handlers of attributes. */ static tree handle_const_attribute (tree *, tree, tree, int, bool *); static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *); +static tree handle_nothrowcall_attribute (tree *, tree, tree, int, bool *); static tree handle_pure_attribute (tree *, tree, tree, int, bool *); static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); @@ -109,6 +110,8 @@ const struct attribute_spec gnat_interna false }, { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute, false }, + { "nothrow call", 0, 0, true, false, false, handle_nothrowcall_attribute, + false }, { "pure", 0, 0, true, false, false, handle_pure_attribute, false }, { "no vops", 0, 0, true, false, false, handle_novops_attribute, @@ -6021,6 +6024,29 @@ handle_nothrow_attribute (tree *node, tr return NULL_TREE; } +/* Handle a "nothrow call" attribute: arguments as in struct + attribute_spec.handler. This attribute means that the function is + to be treated as not throwing, unless -fnon-call-exceptions is + being used. + + This attribute is only used for builtin functions defined by the + compiler. If a builtin function indirects through an unknown + pointer, and the builtin function is replaced by inline code, we + need to know that that inline code might trap. This attribute can + not be specified by user code, because user code can not write a + function that is replaced by inline code by the backend. */ + +static tree +handle_nothrowcall_attribute (tree *node, tree name, tree args, int flags, + bool *no_add_attrs) +{ + gcc_assert (TREE_CODE (*node) == FUNCTION_DECL); + if (!flag_non_call_exceptions) + return handle_nothrow_attribute (node, name, args, flags, no_add_attrs); + *no_add_attrs = true; + return NULL_TREE; +} + /* Handle a "pure" attribute; arguments as in struct attribute_spec.handler. */ Index: lto/lto-lang.c =================================================================== --- lto/lto-lang.c (revision 204343) +++ lto/lto-lang.c (working copy) @@ -47,6 +47,7 @@ static tree handle_pure_attribute (tree static tree handle_novops_attribute (tree *, tree, tree, int, bool *); static tree handle_nonnull_attribute (tree *, tree, tree, int, bool *); static tree handle_nothrow_attribute (tree *, tree, tree, int, bool *); +static tree handle_nothrowcall_attribute (tree *, tree, tree, int, bool *); static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *); static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *); static tree handle_transaction_pure_attribute (tree *, tree, tree, int, bool *); @@ -79,6 +80,10 @@ const struct attribute_spec lto_attribut handle_nonnull_attribute, false }, { "nothrow", 0, 0, true, false, false, handle_nothrow_attribute, false }, + /* For internal use only. The name contains a space to prevent its + use in source code. */ + { "nothrow call", 0, 0, true, false, false, + handle_nothrowcall_attribute, false }, { "returns_twice", 0, 0, true, false, false, handle_returns_twice_attribute, false }, { "sentinel", 0, 1, false, true, true, @@ -387,6 +392,30 @@ handle_nothrow_attribute (tree *node, tr return NULL_TREE; } + +/* Handle a "nothrow call" attribute: arguments as in struct + attribute_spec.handler. This attribute means that the function is + to be treated as not throwing, unless -fnon-call-exceptions is + being used. + + This attribute is only used for builtin functions defined by the + compiler. If a builtin function indirects through an unknown + pointer, and the builtin function is replaced by inline code, we + need to know that that inline code might trap. This attribute can + not be specified by user code, because user code can not write a + function that is replaced by inline code by the backend. */ + +static tree +handle_nothrowcall_attribute (tree *node, tree name, tree args, int flags, + bool *no_add_attrs) +{ + gcc_assert (TREE_CODE (*node) == FUNCTION_DECL); + if (!flag_non_call_exceptions) + return handle_nothrow_attribute (node, name, args, flags, no_add_attrs); + *no_add_attrs = true; + return NULL_TREE; +} + /* Handle a "sentinel" attribute. */