Hi Martin,

After r247444, I saw the following two regressions in arm-linux-gnueabihf 
environment:

FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line 119)
PASS: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line 121)
FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line 121)

The warning message related to those two lines are:
testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:119:3: warning: '%9223372036854775808i' directive width out of range [-Wformat-overflow=]

testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:121:3: warning: '%.9223372036854775808i' directive precision out of range [-Wformat-overflow=]

testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:121:3: warning: '%.9223372036854775808i' directive precision out of range [-Wformat-overflow=]

Did you notice similar things from your test environment, Christophe?

Regards,
Renlin

On 03/05/17 16:02, Christophe Lyon wrote:
On 3 May 2017 at 16:54, Martin Sebor <mse...@gmail.com> wrote:
On 05/03/2017 08:22 AM, Christophe Lyon wrote:

Hi,


On 29 April 2017 at 19:56, Andreas Schwab <sch...@linux-m68k.org> wrote:

On Apr 28 2017, Martin Sebor <mse...@gmail.com> wrote:

+void test_width_and_precision_out_of_range (char *d)
+{
+#if __LONG_MAX__ == 2147483647
+#  define   MAX_P1_STR "2147483648"
+#elif __LONG_MAX__ == 9223372036854775807
+#  define MAX_P1_STR "9223372036854775808"
+#endif
+
+  T ("%" MAX_P1_STR "i", 0);    /* { dg-warning "width out of range" }
*/
+  /* { dg-warning "result to exceed .INT_MAX. " "" { target *-*-* } .-1
} */
+  T ("%." MAX_P1_STR "i", 0);   /* { dg-warning "precision out of
range" } */


FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line
123)
FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c  (test for warnings, line
125)
FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-18.c (test for excess errors)
Excess errors:

/daten/aranym/gcc/gcc-20170429/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:125:3:
warning: '%.2147483648i' directive output of 2147483648 bytes causes result
to exceed 'INT_MAX' [-Wformat-overflow=]

Andreas.


I've noticed the same errors on arm* targets, if it's easier to reproduce.


Thanks.  I committed a trivial fix for this on Monday
(https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00036.html).
I don't see the failures in recent test results for the few
ILP32 targets I've checked so I'm hoping they're gone but if
they persist on some others please let me know.

Indeed, I confirm your commit r247444 fixed the error.
I didn't notice your message because it was in a different thread.

Thanks,

Christophe

Martin

Reply via email to