diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 3a34f92..947b0af 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4956,6 +4956,14 @@ gimplify_addr_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) break; default: + /* If we see a call to a declared builtin or see its address + being taken (we can unify those cases here) then we can mark + the builtin for implicit generation by GCC. */ + if (TREE_CODE (op0) == FUNCTION_DECL + && DECL_BUILT_IN_CLASS (op0) == BUILT_IN_NORMAL + && builtin_decl_declared_p (DECL_FUNCTION_CODE (op0))) + set_builtin_decl_implicit_p (DECL_FUNCTION_CODE (op0), true); + /* We use fb_either here because the C frontend sometimes takes the address of a call that returns a struct; see gcc.dg/c99-array-lval-1.c. The gimplifier will correctly make |