diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2017-04-29 16:39:25 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2017-04-29 14:39:25 +0000 |
commit | 4212aecdf8c4bd99b681fcfc2396844303bab39d (patch) | |
tree | 003459e0c47e58a983513c0fb523ccb389c52f19 /gcc/tree-ssa-alias.c | |
parent | fe75f73248425f0f4c0d2196811ce1d7afb9c09f (diff) | |
download | gcc-4212aecdf8c4bd99b681fcfc2396844303bab39d.zip gcc-4212aecdf8c4bd99b681fcfc2396844303bab39d.tar.gz gcc-4212aecdf8c4bd99b681fcfc2396844303bab39d.tar.bz2 |
Add st[pr]ncpy to stmt_kills_ref_p
2017-04-29 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/80487
gcc/
* tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
gcc/testsuite/
* gcc.dg/tree-ssa/strncpy-1.c: New file.
From-SVN: r247408
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 0dcb273..8cab159 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -2538,6 +2538,8 @@ stmt_kills_ref_p (gimple *stmt, ao_ref *ref) case BUILT_IN_MEMPCPY_CHK: case BUILT_IN_MEMMOVE_CHK: case BUILT_IN_MEMSET_CHK: + case BUILT_IN_STRNCPY: + case BUILT_IN_STPNCPY: { /* For a must-alias check we need to be able to constrain the access properly. */ |