Fix folding of memcmp("a", "a", 2) (PR
authorMartin Liska <mliska@suse.cz>
Wed, 9 Nov 2016 14:07:32 +0000 (15:07 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 9 Nov 2016 14:07:32 +0000 (14:07 +0000)
commit68c937083c9bea6f91357e60e39db22750908506
tree6fa075f129fb6d4844864c444b14a69a8f3c35a4
parent6fa161dc80d26369400b891ad2435dbcc9aaf67f
Fix folding of memcmp("a", "a", 2) (PR

* fold-const-call.c (fold_const_call): Fix the folding.
* gcc.dg/tree-ssa/builtins-folding-generic.c (main): Add new
test-case for memcmp.
* gcc.dg/tree-ssa/builtins-folding-gimple.c: Likewise.

From-SVN: r242000
gcc/ChangeLog
gcc/fold-const-call.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-generic.c
gcc/testsuite/gcc.dg/tree-ssa/builtins-folding-gimple.c