This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch installed]: Test strncmp-2.c on x86_64
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Apr 2005 08:57:43 -0500 (EST)
- Subject: [patch installed]: Test strncmp-2.c on x86_64
This patch activates testing the strncmp-2.c test on x86_64 (and fixes
a few warnings when compiling the test by hand.) Tested via "make
check" on x86_64-unknown-linux-gnu and installed as obvious.
--Kaveh
2005-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/builtins/strncmp-2.c: Also test x86_64.
Fix unused/uninitialized variable warnings.
diff -rup orig/egcc-CVS20050330/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c egcc-CVS20050330/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c
--- orig/egcc-CVS20050330/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c 2004-07-02 22:16:50.000000000 -0400
+++ egcc-CVS20050330/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c 2005-03-31 19:32:15.517634104 -0500
@@ -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,11 +12,11 @@ extern int strncmp (const char *, const
void
main_test (void)
{
+#if !defined(__OPTIMIZE__) || ((defined(__i386__) || defined (__x86_64__)) && !defined(__OPTIMIZE_SIZE__))
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;