]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2007 20:17:45 +0000 (20:17 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Sep 2007 20:17:45 +0000 (20:17 +0000)
* lib/target-supports.exp (check_effective_target_mips64): New
procedure.
* gcc.dg/lower-subreg-1.c: Require !mips64.
* gcc.dg/sibcall-3.c (ATTR): New macro.
(recurser_void1, recurser_void2): Use it.
* gcc.dg/sibcall-4.c: As for gcc.dg/sibcall-3.c.
* gcc.dg/tree-ssa/ssa-fre-3.c: Require !mips64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128626 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lower-subreg-1.c
gcc/testsuite/gcc.dg/sibcall-3.c
gcc/testsuite/gcc.dg/sibcall-4.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-3.c
gcc/testsuite/lib/target-supports.exp

index 4521fe5adaad8764e8eb5c4f2c2ea97c6d2a6d34..d2cf2b0f8138b531a2216d88004a4a87f6708063 100644 (file)
@@ -1,3 +1,13 @@
+2007-09-20  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * lib/target-supports.exp (check_effective_target_mips64): New
+       procedure.
+       * gcc.dg/lower-subreg-1.c: Require !mips64.
+       * gcc.dg/sibcall-3.c (ATTR): New macro.
+       (recurser_void1, recurser_void2): Use it.
+       * gcc.dg/sibcall-4.c: As for gcc.dg/sibcall-3.c.
+       * gcc.dg/tree-ssa/ssa-fre-3.c: Require !mips64.
+
 2007-09-20  Tobias Schlüter  <tobi@gcc.gnu.org>
 
        * gfortran.dg/g77/19981216-0.f: Remove dg-warning annotation.
index f3a29f62c76e6f06562840cc23697b77ee182192..37c884a90c973f563e41e2e2c1ecc6f6020c303f 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! mips64 } } } */
 /* { dg-options "-O -fdump-rtl-subreg" } */
 /* { dg-require-effective-target ilp32 } */
 
index 0ea5ef365b2f6b2e6e8d140ed2ff42e9f0d0d25f..6e6b3aefd22184019a7031c58d2763b084cbfb1d 100644 (file)
 extern void abort (void);
 extern void exit (int);
 
-static void recurser_void1 (int);
-static void recurser_void2 (int);
+/* Sibcalls are not supported in MIPS16 mode, which has direct calls but
+   not direct jumps.  */
+#ifdef __mips
+#define ATTR __attribute__((nomips16))
+#else
+#define ATTR
+#endif
+
+static ATTR void recurser_void1 (int);
+static ATTR void recurser_void2 (int);
 extern void track (int);
 
 int main ()
@@ -32,7 +40,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline))
+static void __attribute__((noinline)) ATTR
 recurser_void1 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -44,7 +52,7 @@ recurser_void1 (int n)
   recurser_void2 (n + 1);
 }
 
-static void __attribute__((noinline))
+static void __attribute__((noinline)) ATTR
 recurser_void2 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
index f1c1ca65d0dbfa9c622fcc8804aa17ba9cf0a98c..c852c8af39a31f1c913fd91a509eb3842f62eeed 100644 (file)
 extern void abort (void);
 extern void exit (int);
 
-static void recurser_void1 (void);
-static void recurser_void2 (void);
+/* Sibcalls are not supported in MIPS16 mode, which has direct calls but
+   not direct jumps.  */
+#ifdef __mips
+#define ATTR __attribute__((nomips16))
+#else
+#define ATTR
+#endif
+
+static ATTR void recurser_void1 (void);
+static ATTR void recurser_void2 (void);
 extern void track (void);
 
 int n = 0;
@@ -33,7 +41,7 @@ int main ()
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-static void __attribute__((noinline))
+static void __attribute__((noinline)) ATTR
 recurser_void1 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -45,7 +53,7 @@ recurser_void1 (void)
   recurser_void2 ();
 }
 
-static void __attribute__((noinline))
+static void __attribute__((noinline)) ATTR
 recurser_void2 (void)
 {
   if (n == 0 || n == 7 || n == 8)
index ebc91e775183a3726a2b4d371679c3d2c894b8ad..3b7a547a6e739de35dda565b951ce5dca22524bd 100644 (file)
@@ -1,4 +1,11 @@
-/* { dg-do compile } */
+/* This test requires:
+
+      TRULY_NOOP_TRUNCATION (sizeof (int) * CHAR_BIT,
+                            sizeof (long long) * CHAR_BIT)
+
+   When the condition is true, we distribute "(int) (a + b)" as
+   "(int) a + (int) b", otherwise we keep the original.  */
+/* { dg-do compile { target { ! mips64 } } } */
 /* { dg-options "-O -fwrapv -fdump-tree-fre-details" } */
 
 /* From PR14844.  */
index 5a39b8608d21b2ebe1b7bda08a6520160e787ef6..b744e2eb1efe5d24b51160e024ccd24c8a0ad3e0 100644 (file)
@@ -617,6 +617,16 @@ proc check_effective_target_mpaired_single { } {
     } "-mpaired-single"]
 }
 
+# Return true if the target is a 64-bit MIPS target.
+
+proc check_effective_target_mips64 { } {
+    return [check_no_compiler_messages mips64 assembly {
+       #ifndef __mips64
+       #error FOO
+       #endif
+    }]
+}
+
 # Return 1 if the current multilib does not generate PIC by default.
 
 proc check_effective_target_nonpic { } {