]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/builtins.c
PR rtl-optimization/66152
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Feb 2019 11:20:33 +0000 (11:20 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Feb 2019 11:20:33 +0000 (11:20 +0000)
commit78a0882d682782bdd1ddae3014aba4550b55bcb0
tree81cea5780c130ecb2ea39b2cddc613799d6e31dc
parentc2008037f26cd3e3189ab5def87f24562ce7dabc
PR rtl-optimization/66152
* builtins.h (c_readstr): Declare.
* builtins.c (c_readstr): Remove forward declaration.  Add
null_terminated_p argument, if false, read all bytes from the
string instead of stopping after '\0'.
* expr.c (string_cst_read_str): New function.
(store_expr): Use string_cst_read_str instead of
builtin_strncpy_read_str.  Try to store by pieces the whole
exp_len first, and only if that fails, split it up into
store by pieces followed by clear_storage.  Formatting fix.

* gcc.target/i386/pr66152.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268957 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/builtins.h
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr66152.c [new file with mode: 0644]