diff options
author | Richard Biener <rguenther@suse.de> | 2016-11-23 10:52:25 +0000 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh3492@gcc.gnu.org> | 2016-11-23 10:52:25 +0000 |
commit | a5bb8a5ceae1bfb0fa82a58254a6539c8943d4b8 (patch) | |
tree | 5a77749307568d49ccaaa49d8f07d74ede803967 /gcc/tree.c | |
parent | e36c1cfe080b1f8150e28eb45ef8e190df1dd6ef (diff) | |
download | gcc-a5bb8a5ceae1bfb0fa82a58254a6539c8943d4b8.zip gcc-a5bb8a5ceae1bfb0fa82a58254a6539c8943d4b8.tar.gz gcc-a5bb8a5ceae1bfb0fa82a58254a6539c8943d4b8.tar.bz2 |
re PR tree-optimization/78154 (memcpy et al can be assumed to return non-null)
2016-11-23 Richard Biener <rguenther@suse.de>
Prathamesh Kulkarni <prathamesh.kulkarni@linaro.rog>
PR tree-optimization/78154
* tree-vrp.c (gimple_stmt_nonzero_warnv_p): Return true if function
returns it's argument and the argument is nonnull.
* builtin-attrs.def: Define ATTR_RETURNS_NONNULL,
ATT_RETNONNULL_NOTHROW_LEAF.
* builtins.def (BUILT_IN_MEMPCPY): Change attribute to
ATTR_RETNONNULL_NOTHROW_LEAF.
(BUILT_IN_STPCPY): Likewise.
(BUILT_IN_STPNCPY): Likewise.
(BUILT_IN_MEMPCPY_CHK): Likewise.
(BUILT_IN_STPCPY_CHK): Likewise.
(BUILT_IN_STPNCPY_CHK): Likewise.
(BUILT_IN_STRCAT): Change attribute to ATTR_RET1_NOTHROW_NONNULL_LEAF.
(BUILT_IN_STRNCAT): Likewise.
(BUILT_IN_STRNCPY): Likewise.
(BUILT_IN_MEMSET_CHK): Likewise.
(BUILT_IN_STRCAT_CHK): Likewise.
(BUILT_IN_STRCPY_CHK): Likewise.
(BUILT_IN_STRNCAT_CHK): Likewise.
(BUILT_IN_STRNCPY_CHK): Likewise.
testsuite/
* gcc.dg/tree-ssa/pr78154.c: New test.
Co-Authored-By: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
From-SVN: r242745
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions