PR middle-end/78703 - fprintf-return-value floating point handling incorrect in local...
authorMartin Sebor <msebor@redhat.com>
Thu, 26 Jan 2017 23:07:02 +0000 (23:07 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Thu, 26 Jan 2017 23:07:02 +0000 (16:07 -0700)
commit31c87a433cdbec856c6ed840482ef638ac8fc565
treea8d8e16a309d249b497cdbd3a0a383771dc5dff7
parentb0670cc0eb260ce182c7eb2c0b25bcc0b59a0e68
PR middle-end/78703 - fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point

gcc/ChangeLog:
        PR middle-end/78703
        * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
        to accept adjustment as an array.
        (get_int_range): New function.
        (struct directive): Make width and prec arrays.
        (directive::set_width, directive::set_precision): Call get_int_range.
        (format_integer, format_floating): Handle width and precision ranges.
        (format_string, parse_directive): Same.

gcc/testsuite/ChangeLog:
        PR middle-end/78703
        * gcc.dg/tree-ssa/builtin-snprintf-warn-1.c: Update
        * gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: Rename...
        * gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: ...to this.
        * gcc.dg/tree-ssa/builtin-sprintf-warn-9.c: New test.

From-SVN: r244956
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/builtin-snprintf-warn-1.c
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-9.c