aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-object-size.c
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@gmail.com>2011-12-15 17:26:10 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2011-12-15 18:26:10 +0100
commitf3fc9b804a4e552a173e2d4071b2adec33178161 (patch)
treeb55d26e2a650daf51259ff6f927c4f13e216f931 /gcc/tree-object-size.c
parentee7a54c550753ba90949d1fea472e0586b6cd954 (diff)
downloadgcc-f3fc9b804a4e552a173e2d4071b2adec33178161.zip
gcc-f3fc9b804a4e552a173e2d4071b2adec33178161.tar.gz
gcc-f3fc9b804a4e552a173e2d4071b2adec33178161.tar.bz2
builtins.def (BUILT_IN_STPNCPY_CHK): New definition.
* builtins.def (BUILT_IN_STPNCPY_CHK): New definition. * builtins.c (expand_builtin, fold_builtin_4, maybe_emit_chk_warning): Add BUILT_IN_STPNCPY_CHK case. * gimple-fold.c (gimple_fold_builtin): Likewise. * tree-object-size.c (pass_through_call): Likewise. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise. * tree-ssa-structalias.c (find_func_aliases_for_builtin_call, find_func_clobbers): Likewise. * tree.h (fold_builtin_strncpy_chk): Rename to fold_builtin_stxncpy_chk * builtins.c (fold_builtin_strncpy_chk): Likewise. Rewrite stpncpy_chk calls to strncpy_chk calls if returned value is ignored. * gcc.c-torture/execute/builtins/chk.h (stpncpy, stpncpy_disallowed): New definitions. * gcc.c-torture/execute/builtins/lib/chk.c (stpncpy_disallowed): Likewise. (stpncpy, __stpncpy_chk): New functions. * gcc.c-torture/execute/builtins/stpncpy-chk-lib.c: New file. * gcc.c-torture/execute/builtins/stpncpy-chk.c: Likewise. From-SVN: r182378
Diffstat (limited to 'gcc/tree-object-size.c')
-rw-r--r--gcc/tree-object-size.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 326b2e4..d35922c 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -465,6 +465,7 @@ pass_through_call (const_gimple call)
case BUILT_IN_MEMSET_CHK:
case BUILT_IN_STRCPY_CHK:
case BUILT_IN_STRNCPY_CHK:
+ case BUILT_IN_STPNCPY_CHK:
case BUILT_IN_STRCAT_CHK:
case BUILT_IN_STRNCAT_CHK:
case BUILT_IN_ASSUME_ALIGNED: