https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83443

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
          Component|c                           |target

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I can't reproduce the two failures with an x86_64-linux to
hppa-unknown-linux-gnu cross-compiler.  I can't actually run the test under
DejaGnu in my setup but when I compile it using the cross-GCC (unless I'm
overlooking something subtle) the output for the function looks the same as
with the native GCC.  I'm guessing the problem is in the interaction with the
host system but I don't have access to it to debug it.

$ /ssd/build/hppa-unknown-linux-gnu/gcc-git/gcc/xgcc -B
/ssd/build/hppa-unknown-linux-gnu/gcc-git/gcc -O2 -S -Wall -Wno-format
-Wformat-overflow -fexec-charset=IBM1047 -ftrack-macro-expansion=0
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c
...
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: In
function ‘test_width_and_precision_out_of_range’:
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:119:3:
warning: ‘%9223372036854775808i’ directive width out of range
[-Wformat-overflow=]
   T ("%9223372036854775808i", 0);    /* { dg-warning "width out of range" } */
   ^
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:119:3:
warning: ‘%9223372036854775808i’ directive output of 9223372036854775807 bytes
causes result to exceed ‘INT_MAX’ [-Wformat-overflow=]
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:121:3:
warning: ‘%.9223372036854775808i’ directive precision out of range
[-Wformat-overflow=]
   T ("%.9223372036854775808i", 0);   /* { dg-warning "precision out of range"
} */
   ^
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:121:3:
warning: ‘%.9223372036854775808i’ directive output of 9223372036854775807 bytes
causes result to exceed ‘INT_MAX’ [-Wformat-overflow=]
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: In
function ‘test_overlong_plain_string’:
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:137:3:
warning: ‘0123456789012345678901234567...’ directive writing 70 bytes into a
region of size 1 [-Wformat-overflow=]
   T (longfmtstr);   /* { dg-warning ".0123\[0-9\]\*\.\.\.. directive writing
70 bytes" } */
   ^
/ssd/src/gcc/git/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-18.c:137:3:
note: ‘__builtin_sprintf’ output 72 bytes into a destination of size 1

Reply via email to