aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-10-31 11:04:47 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-10-31 11:04:47 +0100
commit6773658a809fbebcdb68483cb929207150ac7e5f (patch)
treec9817b2d821102662da597e911e8cc2ab92d9092 /gcc/tree.h
parent1297712fb4af6c6bfd827e0f0a9695b14669f87d (diff)
downloadgcc-6773658a809fbebcdb68483cb929207150ac7e5f.zip
gcc-6773658a809fbebcdb68483cb929207150ac7e5f.tar.gz
gcc-6773658a809fbebcdb68483cb929207150ac7e5f.tar.bz2
re PR middle-end/92231 (ICE in gimple_fold_stmt_to_constant_1)
PR middle-end/92231 * tree.h (fndecl_built_in_p): Use fndecl_built_in_p instead of DECL_BUILT_IN in comment. Remove redundant ()s around return argument. * tree.c (free_lang_data_in_decl): Check if var is FUNCTION_DECL before calling fndecl_built_in_p. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Check if TREE_OPERAND (fn, 0) is a FUNCTION_DECL before calling fndecl_built_in_p on it. lto/ * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p on *node that is not FUNCTION_DECL. testsuite/ * gcc.c-torture/compile/pr92231.c: New test. From-SVN: r277660
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 18d6c0e..8135154 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -6119,12 +6119,12 @@ type_has_mode_precision_p (const_tree t)
Note that it is different from the DECL_IS_BUILTIN accessor. For
instance, user declared prototypes of C library functions are not
- DECL_IS_BUILTIN but may be DECL_BUILT_IN. */
+ DECL_IS_BUILTIN but may be fndecl_built_in_p. */
inline bool
fndecl_built_in_p (const_tree node)
{
- return (DECL_BUILT_IN_CLASS (node) != NOT_BUILT_IN);
+ return DECL_BUILT_IN_CLASS (node) != NOT_BUILT_IN;
}
/* Return true if a FUNCTION_DECL NODE is a GCC built-in function
@@ -6133,7 +6133,7 @@ fndecl_built_in_p (const_tree node)
inline bool
fndecl_built_in_p (const_tree node, built_in_class klass)
{
- return (fndecl_built_in_p (node) && DECL_BUILT_IN_CLASS (node) == klass);
+ return fndecl_built_in_p (node) && DECL_BUILT_IN_CLASS (node) == klass;
}
/* Return true if a FUNCTION_DECL NODE is a GCC built-in function