016-07-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 21 Jul 2016 19:11:26 +0000 (19:11 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Thu, 21 Jul 2016 19:11:26 +0000 (19:11 +0000)
        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.

From-SVN: r238606

gcc/ChangeLog
gcc/builtin-attrs.def
gcc/builtins.def
gcc/calls.c

index b5b24a031271e035f63833e1ca1d74468ddb9f53..5b86ead1d1576768d31f25991d61437302fbc4b3 100644 (file)
@@ -1,3 +1,12 @@
+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
index 99658883872a8ca3a4fbb009839297c573cb32a2..8dc59c9b726d6d731003080419211c30232836f9 100644 (file)
@@ -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,\
index 33a7626b70a2b4af23810c1b9f4dbb3cddbef610..1dd095f78475e484ecfd11e606b4160dbb002cf2 100644 (file)
@@ -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)
index bb954ef5b09d4921a61dee7cd8683ddbd4625cfb..c04d00f7f445fc363d144aa27eee15fd3abcc4fb 100644 (file)
@@ -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;