diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-21 19:11:26 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-21 19:11:26 +0000 |
commit | 8ec03a62f79d1635ad630f4a64ca6cd97f8789b8 (patch) | |
tree | e87da55ffe8047c857a077c464f26c9b98dd2be0 | |
parent | 5890598506d458bbec971978b642c77f7354c24f (diff) | |
download | gcc-8ec03a62f79d1635ad630f4a64ca6cd97f8789b8.tar.gz |
016-07-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/71876
* builtin-attrs.def (ATTR_RT_NOTHROW_LEAF_LIST): New return twice
attribute.
* builtins.def (BUILT_IN_SETJMP): Use ATTR_RT_NOTHROW_LEAF_LIST here.
* calls.c (special_function_p): Remove the special handling of the
"__builtin_" prefix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238606 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/builtin-attrs.def | 2 | ||||
-rw-r--r-- | gcc/builtins.def | 2 | ||||
-rw-r--r-- | gcc/calls.c | 8 |
4 files changed, 14 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5b24a03127..5b86ead1d15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,15 @@ 2016-07-21 Bernd Edlinger <bernd.edlinger@hotmail.de> PR middle-end/71876 + * builtin-attrs.def (ATTR_RT_NOTHROW_LEAF_LIST): New return twice + attribute. + * builtins.def (BUILT_IN_SETJMP): Use ATTR_RT_NOTHROW_LEAF_LIST here. + * calls.c (special_function_p): Remove the special handling of the + "__builtin_" prefix. + +2016-07-21 Bernd Edlinger <bernd.edlinger@hotmail.de> + + PR middle-end/71876 * calls.c (gimple_maybe_alloca_call_p): New function. Return true if STMT may be an alloca call. (gimple_alloca_call_p, alloca_call_p): Return only true for the diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def index 99658883872..8dc59c9b726 100644 --- a/gcc/builtin-attrs.def +++ b/gcc/builtin-attrs.def @@ -131,6 +131,8 @@ DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LIST, ATTR_NORETURN, \ ATTR_NULL, ATTR_NOTHROW_LIST) DEF_ATTR_TREE_LIST (ATTR_NORETURN_NOTHROW_LEAF_LIST, ATTR_NORETURN,\ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST) +DEF_ATTR_TREE_LIST (ATTR_RT_NOTHROW_LEAF_LIST, ATTR_RETURNS_TWICE,\ + ATTR_NULL, ATTR_NOTHROW_LEAF_LIST) DEF_ATTR_TREE_LIST (ATTR_COLD_NOTHROW_LEAF_LIST, ATTR_COLD,\ ATTR_NULL, ATTR_NOTHROW_LEAF_LIST) DEF_ATTR_TREE_LIST (ATTR_COLD_NORETURN_NOTHROW_LEAF_LIST, ATTR_COLD,\ diff --git a/gcc/builtins.def b/gcc/builtins.def index 33a7626b70a..1dd095f7847 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -837,7 +837,7 @@ DEF_LIB_BUILTIN (BUILT_IN_REALLOC, "realloc", BT_FN_PTR_PTR_SIZE, ATTR_NO DEF_GCC_BUILTIN (BUILT_IN_RETURN, "return", BT_FN_VOID_PTR, ATTR_NORETURN_NOTHROW_LEAF_LIST) DEF_GCC_BUILTIN (BUILT_IN_RETURN_ADDRESS, "return_address", BT_FN_PTR_UINT, ATTR_LEAF_LIST) DEF_GCC_BUILTIN (BUILT_IN_SAVEREGS, "saveregs", BT_FN_PTR_VAR, ATTR_NULL) -DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_GCC_BUILTIN (BUILT_IN_SETJMP, "setjmp", BT_FN_INT_PTR, ATTR_RT_NOTHROW_LEAF_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_STRFMON, "strfmon", BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR, ATTR_FORMAT_STRFMON_NOTHROW_3_4) DEF_LIB_BUILTIN (BUILT_IN_STRFTIME, "strftime", BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR, ATTR_FORMAT_STRFTIME_NOTHROW_3_0) DEF_GCC_BUILTIN (BUILT_IN_TRAP, "trap", BT_FN_VOID, ATTR_NORETURN_NOTHROW_LEAF_LIST) diff --git a/gcc/calls.c b/gcc/calls.c index bb954ef5b09..c04d00f7f44 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -514,14 +514,10 @@ special_function_p (const_tree fndecl, int flags) && ! strcmp (name, "alloca")) flags |= ECF_MAY_BE_ALLOCA; - /* Disregard prefix _, __, __x or __builtin_. */ + /* Disregard prefix _, __ or __x. */ if (name[0] == '_') { - if (name[1] == '_' - && name[2] == 'b' - && !strncmp (name + 3, "uiltin_", 7)) - tname += 10; - else if (name[1] == '_' && name[2] == 'x') + if (name[1] == '_' && name[2] == 'x') tname += 3; else if (name[1] == '_') tname += 2; |