* builtins.c (c_strlen): Add only_value argument.
Handle COND_EXPR and COMPOUND_EXPR. (expand_builtin_strlen): Optimize also strlen (i++ ? "foo" : "bar"). Adjust c_strlen callers. (expand_builtin_strcpy, expand_builtin_strncpy, expand_builtin_strcmp, expand_builtin_strncmp, expand_builtin_fputs, expand_builtin_sprintf, fold_builtin): Adjust c_strlen callers. * gcc.c-torture/execute/builtins/string-8.c: New test. * gcc.c-torture/execute/builtins/string-8-lib.c: New. * gcc.c-torture/execute/stdio-opt-1.c (main): Add new tests. * gcc.c-torture/execute/string-opt-7.c (main): Add new test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68634 138bc75d-0d04-0410-961f-82ee72b054a4
Showing
Please register or sign in to comment