re PR tree-optimization/78586 (Wrong code caused by printf-return-value)
authorJakub Jelinek <jakub@redhat.com>
Wed, 30 Nov 2016 08:01:47 +0000 (09:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 30 Nov 2016 08:01:47 +0000 (09:01 +0100)
commit053d5e0cdd2f9d08b1a7a4275b40d2930936d9f6
tree32e6db300320c3e02dd024fac38653a3c9a6b981
parentced17de64000713e99af200bb9ff468b907ec1f9
re PR tree-optimization/78586 (Wrong code caused by printf-return-value)

PR tree-optimization/78586
* gimple-ssa-sprintf.c (format_integer): Use TYPE_MAX_VALUE or
TYPE_MIN_VALUE or build_all_ones_cst instead of folding LSHIFT_EXPR.
Don't build_int_cst min/max twice.  Formatting fix.

* gcc.c-torture/execute/pr78586.c: New test.

From-SVN: r242998
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr78586.c [new file with mode: 0644]