From: ghazi Date: Fri, 1 Apr 2005 13:45:36 +0000 (+0000) Subject: * gcc.c-torture/execute/builtins/strncmp-2.c: Also test x86_64. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=947750f5333cce5d1e94e8203852423554f392ec;p=thirdparty%2Fgcc.git * gcc.c-torture/execute/builtins/strncmp-2.c: Also test x86_64. Fix unused/uninitialized variable warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97387 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9305e34da5ad..2d00a477aa22 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2005-04-01 Kaveh R. Ghazi + * gcc.c-torture/execute/builtins/strncmp-2.c: Also test x86_64. + Fix unused/uninitialized variable warnings. + * gcc.c-torture/execute/builtins/lib/strncat.c: Fix uninitialized var. * gcc.c-torture/execute/builtins/lib/strpbrk.c: Fix discarded const. * gcc.c-torture/execute/builtins/strlen-3.c: Fix uninitialized var. diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c index c9d78783391a..fe3462724ea1 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001, 2003 Free Software Foundation. +/* Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation. Ensure all expected transformations of builtin strncmp occur and perform correctly. @@ -12,13 +12,13 @@ extern int strncmp (const char *, const char *, size_t); void main_test (void) { +#if !defined(__OPTIMIZE__) || ((defined(__i386__) || defined (__x86_64__)) && !defined(__OPTIMIZE_SIZE__)) + /* These tests work on platforms which support cmpstrsi. We test it + at -O0 on all platforms to ensure the strncmp logic is correct. */ const char *const s1 = "hello world"; - const char *s2, *s3; + const char *s2; int n = 6, x; -#if !defined(__OPTIMIZE__) || (defined(__i386__) && !defined(__OPTIMIZE_SIZE__)) - /* These tests work on platforms which support cmpstrsi. We test it - at -O0 on all platforms to ensure the strncmp logic is correct. */ s2 = s1; if (strncmp (++s2, "ello", 3) != 0 || s2 != s1+1) abort();