builtins.c (expand_builtin_sprintf): Use c_getstr and strlen to obtain the format string instead of using...
* builtins.c (expand_builtin_sprintf): Use c_getstr and strlen to
obtain the format string instead of using TREE_STRING_POINTER and
TREE_STRING_LENGTH. Only optimize sprintf(dst,"%s",src) when the
return value is unused or the length of src is a known constant.
* gcc.c-torture/execute/string-opt-16.c: Remove test for disabled
sprintf(dst,"%s",src) optimization.
* gcc.c-torture/execute/
20030626-1.c: New test case.
* gcc.c-torture/execute/
20030626-2.c: New test case.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r68555