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]

Re: Fix some testsuite failures on x86-64


Thanks for all the feedback, here's a new patch.

I've tested again on x86_64 to double check and this works fine.
Ok to commit?

Andreas

2003-11-11  Andreas Jaeger  <aj@suse.de>
	    Jakub Jelinek  <jakub@redhat.com>
	    Andrew Pinski  <apinski@apple.com>
	    Richard Henderson  <rth@redhat.com>

	* gcc.dg/c90-const-expr-2.c (foo): Avoid extra warning on 64-bit
	systems.

	* gcc.dg/20030926-1.c: Use -march=k8 to work on both x86 and
	x86_64 systems.
	* gcc.dg/i386-pentium4-not-mull.c: Likewise.

============================================================
Index: gcc/testsuite/gcc.dg/c90-const-expr-2.c
--- testsuite/gcc.dg/c90-const-expr-2.c	8 Nov 2003 01:38:48 -0000	1.4
+++ testsuite/gcc.dg/c90-const-expr-2.c	11 Nov 2003 17:28:01 -0000
@@ -14,6 +14,12 @@ int *a;
 int b;
 long *c;
 
+#ifdef _LP64
+#define ZERO 0L
+#else
+#define ZERO 0
+#endif
+
 /* Assertion that n is a null pointer constant: so the conditional expression
    has type 'int *' instead of 'void *'.
 */
@@ -30,7 +36,7 @@ foo (void)
   ASSERT_NPC ((void *)0);
   ASSERT_NOT_NPC ((void *)(void *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
   ASSERT_NOT_NPC ((void *)(char *)0); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
-  ASSERT_NOT_NPC ((void *)(0, 0)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
+  ASSERT_NOT_NPC ((void *)(0, ZERO)); /* { dg-bogus "incompatible" "bogus null pointer constant" } */
   ASSERT_NOT_NPC ((void *)(&"Foobar"[0] - &"Foobar"[0])); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
   /* This last one is a null pointer constant in C99 only.  */
   ASSERT_NOT_NPC ((void *)(1 ? 0 : (0, 0))); /* { dg-bogus "incompatible" "bogus null pointer constant" { xfail *-*-* } } */
============================================================
Index: gcc/testsuite/gcc.dg/20030926-1.c
--- testsuite/gcc.dg/20030926-1.c	26 Sep 2003 18:23:33 -0000	1.1
+++ testsuite/gcc.dg/20030926-1.c	11 Nov 2003 17:28:01 -0000
@@ -1,6 +1,7 @@
 /* PR optimization/11741  */
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -minline-all-stringops -march=pentium4" } */
+/* { dg-options "-O2 -minline-all-stringops" } */
+/* { dg-options "-O2 -minline-all-stringops -march=pentium4" { target i?86-*-* } } */
 
 void
 foo (char *p)
============================================================
Index: gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c
--- testsuite/gcc.dg/i386-pentium4-not-mull.c	16 Jul 2003 20:07:50 -0000	1.1
+++ testsuite/gcc.dg/i386-pentium4-not-mull.c	11 Nov 2003 17:28:01 -0000
@@ -1,5 +1,6 @@
 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -march=pentium4" } */
+/* { dg-options "-O2 -march=pentium4" { target i?86-*-* } } */
+/* { dg-options "-O2 -march=pentium4 -m32" { target x86_64-*-* } } */
 /* { dg-final { scan-assembler-not "imull" } } */
 
 /* Should be done not using imull.  */

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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