This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, testsuite]: Committed: Fix gcc.target/i386/pr11001-*.c for -m64


Hello!

gcc.target/i386/pr11001-*.c tests always operate in 32bit mode by adding -m32 to their compile flags. This clashes with -m64 [1] and skips testing on x86_64 targets.

Attached patch removes this limitation and also introduces "-w" into compile flags to suppress "call-clobbered register" warnings that are of no interest to us. Registers that produc expected warnings were call-clobbered only on x86_32 unix ABI targets, so we would trigger [X-]FAILs on other OSes.

2007-10-24 Uros Bizjak <ubizjak@gmail.com>

* gcc.target/i386/pr11001-*.c: Remove -m32 from compile flags.
Add -w to compile flags to suppress "call-clobbered register" warnings.
Remove dg-warning directives.


Patch was tested on x86_64-pc-linux-gnu with and without -m32, -m64. Patch is committed to SVN.

[1] http://gcc.gnu.org/ml/gcc-testresults/2007-10/msg01108.html
Index: gcc.target/i386/pr11001-strlen-2.c
===================================================================
--- gcc.target/i386/pr11001-strlen-2.c	(revision 129610)
+++ gcc.target/i386/pr11001-strlen-2.c	(working copy)
@@ -1,11 +1,11 @@
 /* Ensure that we don't use 'repnz scasb' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-O1 -m32" } */
+/* { dg-options "-O1 -w" } */
 
 extern __SIZE_TYPE__ strlen (const char *);
 extern void *malloc (__SIZE_TYPE__);
 
-register int regvar asm("%eax"); /* { dg-warning "call-clobbered register" } */
+register int regvar asm("%eax");
 
 char *
 do_copy (char *str)
Index: gcc.target/i386/pr11001-strlen-3.c
===================================================================
--- gcc.target/i386/pr11001-strlen-3.c	(revision 129610)
+++ gcc.target/i386/pr11001-strlen-3.c	(working copy)
@@ -1,11 +1,11 @@
 /* Ensure that we don't use 'repnz scasb' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-O1 -m32" } */
+/* { dg-options "-O1 -w" } */
 
 extern __SIZE_TYPE__ strlen (const char *);
 extern void *malloc (__SIZE_TYPE__);
 
-register int regvar asm("%ecx"); /* { dg-warning "call-clobbered register" } */
+register int regvar asm("%ecx");
 
 char *
 do_copy (char *str)
Index: gcc.target/i386/pr11001-memset-3.c
===================================================================
--- gcc.target/i386/pr11001-memset-3.c	(revision 129610)
+++ gcc.target/i386/pr11001-memset-3.c	(working copy)
@@ -1,6 +1,6 @@
 /* Ensure that we don't use 'rep stoX' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-Os -m32" } */
+/* { dg-options "-Os -w" } */
 
 extern void *memset (void *, int, __SIZE_TYPE__);
 
Index: gcc.target/i386/pr11001-memcpy-1.c
===================================================================
--- gcc.target/i386/pr11001-memcpy-1.c	(revision 129610)
+++ gcc.target/i386/pr11001-memcpy-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* Ensure that we don't use 'rep movX' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-Os -m32" } */
+/* { dg-options "-Os -w" } */
 
 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
 
Index: gcc.target/i386/pr11001-memcpy-2.c
===================================================================
--- gcc.target/i386/pr11001-memcpy-2.c	(revision 129610)
+++ gcc.target/i386/pr11001-memcpy-2.c	(working copy)
@@ -1,6 +1,6 @@
 /* Ensure that we don't use 'rep movX' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-Os -m32" } */
+/* { dg-options "-Os -w" } */
 
 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
 
Index: gcc.target/i386/pr11001-memcpy-3.c
===================================================================
--- gcc.target/i386/pr11001-memcpy-3.c	(revision 129610)
+++ gcc.target/i386/pr11001-memcpy-3.c	(working copy)
@@ -1,10 +1,10 @@
 /* Ensure that we don't use 'rep movX' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-Os -m32" } */
+/* { dg-options "-Os -w" } */
 
 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
 
-register int regvar asm("%ecx"); /* { dg-warning "call-clobbered register" } */
+register int regvar asm("%ecx");
 
 int foo[10];
 int bar[10];
Index: gcc.target/i386/pr11001-strlen-1.c
===================================================================
--- gcc.target/i386/pr11001-strlen-1.c	(revision 129610)
+++ gcc.target/i386/pr11001-strlen-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* Ensure that we don't use 'repnz scasb' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-O1 -m32" } */
+/* { dg-options "-O1 -w" } */
 
 extern __SIZE_TYPE__ strlen (const char *);
 extern void *malloc (__SIZE_TYPE__);
Index: gcc.target/i386/pr11001-memset-1.c
===================================================================
--- gcc.target/i386/pr11001-memset-1.c	(revision 129610)
+++ gcc.target/i386/pr11001-memset-1.c	(working copy)
@@ -1,10 +1,10 @@
 /* Ensure that we don't use 'rep stoX' in the presence of register globals.  */
 /* { dg-do compile } */
-/* { dg-options "-Os -m32" } */
+/* { dg-options "-Os -w" } */
 
 extern void *memset (void *, int, __SIZE_TYPE__);
 
-register int regvar asm("%eax"); /* { dg-warning "call-clobbered register" } */
+register int regvar asm("%eax");
 
 int foo[10];
 int bar[10];

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]