Fix execution tests using %ll formats on MinGW

Joseph S. Myers joseph@codesourcery.com
Tue Feb 26 23:35:00 GMT 2008


gcc.target/i386/mmx-4.c and gcc.target/i386/sse-6.c fail on MinGW
because of using %llx printf formats that aren't supported there.
This patch makes those tests use %I64x on MinGW instead.  OK to
commit?

2008-02-26  Joseph Myers  <joseph@codesourcery.com>

	* gcc.target/i386/mmx-4.c (dump64_64): Use printf %I64 on MinGW.
	* gcc.target/i386/sse-6.c (dump128_64): Likewise.

Index: gcc.target/i386/sse-6.c
===================================================================
--- gcc.target/i386/sse-6.c	(revision 132664)
+++ gcc.target/i386/sse-6.c	(working copy)
@@ -229,7 +229,11 @@
 
   for (i=0; i<2; i++)
     {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+      sprintf (p, "%16.16I64x ", x.u[i]);
+#else
       sprintf (p, "%16.16llx ", x.u[i]);
+#endif
       p += strlen (p);
     }
   strcat (p, "\n");
Index: gcc.target/i386/mmx-4.c
===================================================================
--- gcc.target/i386/mmx-4.c	(revision 132664)
+++ gcc.target/i386/mmx-4.c	(working copy)
@@ -184,7 +184,11 @@
   sprintf (p, "%s ", name);
   p += strlen (p);
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+  sprintf (p, "%16.16I64x\n", x.t);
+#else
   sprintf (p, "%16.16llx\n", x.t);
+#endif
 }
 
 int

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list