From: Andy Hutchinson Date: Tue, 20 May 2008 23:56:28 +0000 (+0000) Subject: re PR testsuite/34889 (gcc.c-torture/execute/builtins/pr23484-chk.c fails on 16 bit... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77b4cc3594a80157608a23062fe548bce7743673;p=gcc.git re PR testsuite/34889 (gcc.c-torture/execute/builtins/pr23484-chk.c fails on 16 bit integer platforms) PR testsuite/34889 * gcc.c-torture/execute/builtins/pr23484-chk.c : Correct test for 16bit int target. From-SVN: r135694 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 54c26931def..2ade2866c95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-05-20 Andy Hutchinson + + PR testsuite/34889 + * gcc.c-torture/execute/builtins/pr23484-chk.c : Correct test for + 16bit int target. + 2008-05-20 Andy Hutchinson * gcc.dg/tree-ssa/ifc-20040816-1.c : signal.h not required. diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.c index 58d4db4b21b..446fb6c2f05 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/pr23484-chk.c @@ -41,9 +41,15 @@ test1 (void) abort (); memset (buf, 'L', sizeof (buf)); +#if(__SIZEOF_INT__ >= 4) if (snprintf (buf, l1 ? sizeof (buf) : 4, "%d", l1 + 65536) != 5 || memcmp (buf, "655\0LLLL", 8)) abort (); +#else + if (snprintf (buf, l1 ? sizeof (buf) : 4, "%d", l1 + 32700) != 5 + || memcmp (buf, "327\0LLLL", 8)) + abort (); +#endif if (chk_calls) abort ();