Commit 66b27545 by Martin Sebor Committed by Martin Sebor

As discussed in https://gcc.gnu.org/ml/gcc-patches/2017-02/msg00942.html

gcc/testsuite/ChangeLog:
	* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add a test case.

From-SVN: r246064
parent 5e12b9b5
2017-03-10 Martin Sebor <msebor@redhat.com>
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Add a test case.
2017-03-10 Bernd Schmidt <bschmidt@redhat.com>
PR rtl-optimization/78911
......
......@@ -200,6 +200,10 @@ void test_sprintf_chk_range_schar (void)
T ( 0, "%hhi", R (1024, 2035)); /* { dg-warning ".%hhi. directive writing between 1 and 4 bytes into a region of size 0" } */
/* { dg-message "using the range \\\[-128, 127\\\] for directive argument" "note" { target *-*-* } .-1 } */
T ( 2, "%#hhx", R (1234, 12345)); /* { dg-warning "'%#hhx' directive writing between 1 and 4 bytes into a region of size 2 " } */
T ( 3, "%#hhx", R (1234, 12345)); /* { dg-warning "may write a terminating nul" } */
T ( 4, "%#hhx", R (1234, 12345));
#undef R
#define R(min, max) range_schar (min, max)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment