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

From-SVN: r246064
This commit is contained in:
Martin Sebor 2017-03-11 00:33:45 +00:00 committed by Martin Sebor
parent 5e12b9b500
commit 66b2754523
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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)