c90-const-expr-2.c (foo): Avoid extra warning on 64-bit systems.
authorAndreas Jaeger <aj@suse.de>
Wed, 12 Nov 2003 06:44:46 +0000 (07:44 +0100)
committerAndreas Jaeger <aj@gcc.gnu.org>
Wed, 12 Nov 2003 06:44:46 +0000 (07:44 +0100)
2003-11-12  Andreas Jaeger  <aj@suse.de>
    Jakub Jelinek  <jakub@redhat.com>
    Andrew Pinski  <pinskia@physics.uc.edu>
    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: Make it work on x86_64 systems.
* gcc.dg/i386-pentium4-not-mull.c: Likewise.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r73485

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20030926-1.c
gcc/testsuite/gcc.dg/c90-const-expr-2.c
gcc/testsuite/gcc.dg/i386-pentium4-not-mull.c

index a769adb1dff728b90b58a4763c4a979493c01a08..7bd8ab2736ffed258ccc04d894e10ffcc44e112e 100644 (file)
@@ -1,3 +1,14 @@
+2003-11-12  Andreas Jaeger  <aj@suse.de>
+           Jakub Jelinek  <jakub@redhat.com>
+           Andrew Pinski  <pinskia@physics.uc.edu>
+           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: Make it work on x86_64 systems.
+       * gcc.dg/i386-pentium4-not-mull.c: Likewise.
+
 2003-11-11  Andreas Jaeger  <aj@suse.de>
 
        * gcc.c-torture/execute/20020720-1.x: Test passes also on x86_64.
index 085cb9b4da1d17e188e761add6df436ffb8afc43..39833a65171245f95277d5db9927cbac1647b848 100644 (file)
@@ -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 7363e2a2e2cfaeab2c8abf306998f6544ca7d507..8c2c99f5cdb030b35c61dc4eee1f1c0a7f0132e4 100644 (file)
@@ -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 0780b050bdd2f269219f1c1806c5d08754f21176..8d4a083e5d8f1ac905f6e350bdaff25c669ff82c 100644 (file)
@@ -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.  */