]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pr18241-1.c: Use long on small int target.
authorAndy Hutchinson <hutchinsonandy@aim.com>
Mon, 2 Jun 2008 22:23:57 +0000 (22:23 +0000)
committerAndy Hutchinson <hutchinsonandy@gcc.gnu.org>
Mon, 2 Jun 2008 22:23:57 +0000 (22:23 +0000)
* gcc.dg/pr18241-1.c: Use long on small int target.
* gcc.dg/pr32912-2.c: Ditto.
* gcc.dg/pr35065.c: Ditto.
* gcc.dg/pr36300-1.c: Ditto.
* gcc.dg/pr36300-2.c: Ditto.
* gcc.dg/pr27639.c: Reduce array size for small int target.
* gcc.dg/pr28755.c: Skip test if pointers are smaller than 32 bits.
* gcc.dg/pr36194.c: Reduce constant on small int target.
* gcc.dg/torture/builtin-frexp-1.c: Ditto.

From-SVN: r136302

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr18241-1.c
gcc/testsuite/gcc.dg/pr27639.c
gcc/testsuite/gcc.dg/pr28755.c
gcc/testsuite/gcc.dg/pr32912-2.c
gcc/testsuite/gcc.dg/pr35065.c
gcc/testsuite/gcc.dg/pr36194.c
gcc/testsuite/gcc.dg/pr36300-1.c
gcc/testsuite/gcc.dg/pr36300-2.c
gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c

index 5b21765943e4004b85ff30126961e8550e1ea38b..f87b7e3a28f5119f0b255082c35ed937083f5d6d 100644 (file)
@@ -1,3 +1,15 @@
+2008-06-02  Andy Hutchinson  <hutchinsonandy@aim.com>
+
+       * gcc.dg/pr18241-1.c: Use long on small int target.
+       * gcc.dg/pr32912-2.c: Ditto.
+       * gcc.dg/pr35065.c: Ditto.
+       * gcc.dg/pr36300-1.c: Ditto.
+       * gcc.dg/pr36300-2.c: Ditto.
+       * gcc.dg/pr27639.c: Reduce array size for small int target.
+       * gcc.dg/pr28755.c: Skip test if pointers are smaller than 32 bits.
+       * gcc.dg/pr36194.c: Reduce constant on small int target.
+       * gcc.dg/torture/builtin-frexp-1.c: Ditto.
+
 2008-06-02  Andy Hutchinson  <hutchinsonandy@aim.com>
 
        * gcc.dg/torture/pr34330.c: Skip test for targets without pthread.
index d6bdbccf8de082b4b630cfd1f1cef6842e6d2412..a37e77dac64d197174722b41bbddfa40319ad705 100644 (file)
@@ -27,7 +27,11 @@ static inline void tag_clear(struct radix_tree_node *node, int tag, int offset)
 {
        int nr;
        volatile unsigned long *addr;
+#if(__SIZEOF_INT__ >= 4)       
        int mask;
+#else
+       long mask;
+#endif
        
        nr = offset;
        addr = &node->tags[tag][0];
index 28e4223d81d4be5a35adb32a010482c09e3af570..cb7b1429d4d489b59cd4b5deb8c67ae830118333 100644 (file)
@@ -1,8 +1,10 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=c99" } */
-
+#if(__SIZEOF_INT__ >= 4)
 char heap[50000];
-
+#else
+char heap[32000];
+#endif
 int
 main ()
 {
index 9a01f88d0d986b01fbd0e8ab3ba1b5c4a9959c37..9cd1330d1dd725319456f45c6a6d21e710f82c71 100644 (file)
@@ -1,5 +1,6 @@
 /* PR middle-end/28755 */
 /* { dg-do compile } */
+/* { dg-require-effective-target ptr32plus } */
 /* { dg-options "-Os" } */
 /* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */
 
index 6f028744c60034331a5eeaf5da3de75d510aa589..f3c754cc346f2743a41d141a3a0f834aadb1fa10 100644 (file)
@@ -3,8 +3,11 @@
 
 extern void abort (void);
 
+#if(__SIZEOF_INT__ >= 4)
 typedef int __m128i __attribute__ ((__vector_size__ (16)));
-
+#else
+typedef long __m128i __attribute__ ((__vector_size__ (16)));
+#endif
 __m128i
 foo (void)
 {
@@ -22,7 +25,11 @@ bar (void)
 int
 main (void)
 {
+#if(__SIZEOF_INT__ >= 4)
   union { __m128i v; int i[sizeof (__m128i) / sizeof (int)]; } u, v;
+#else
+  union { __m128i v; long i[sizeof (__m128i) / sizeof (long)]; } u, v;
+#endif
   int i;
 
   u.v = foo ();
index 3ed46642ffc77a5b999c98a90873cb57fc123042..e5984ab0f827d81929db91984a8a2441e26b5ba4 100644 (file)
@@ -5,7 +5,11 @@ typedef int vlc_bool_t;
 typedef __SIZE_TYPE__ size_t;
 typedef struct vlc_object_t vlc_object_t;
 typedef long long int64_t;
+#if(__SIZEOF_INT__ >= 4)
 typedef unsigned int uint32_t;
+#else
+typedef unsigned long uint32_t;
+#endif
 typedef unsigned char uint8_t;
 typedef int64_t mtime_t;
 typedef uint32_t vlc_fourcc_t;
index 3d2195b03d413f30348e4a47881a4305a5d8ed11..070a944e97f535e9979946cca431d76f897b5d80 100644 (file)
@@ -6,7 +6,11 @@ void abort (void);
 __attribute__ ((noinline)) void
 f (int i)
 {
+#if(__SIZEOF_INT__ >= 4)
   if (i != 0x87654321)
+#else
+  if (i != 0x4321)
+#endif
     abort ();
   asm ("");
 }
index 466522f8b793f934b8e6805726e6f7be552e4ebb..e737ab7ff0ced9f3a7012a12a56b431df278309d 100644 (file)
@@ -7,10 +7,13 @@ extern void abort (void);
 
 int main(void)
 {
-  int U1;
   long long Y, Y2;
+#if(__SIZEOF_INT__ >= 4)
+  int U1;
+#else
+  long U1;
+#endif
   int t;
-
   U1 = -2147483647-1;
 
   Y = ((long long)(VALUE * VALUE) * 3);
index 7e7cfa2b7ebe3c3aaadb523bebdd91fcd7feb01d..9543332683ea48027fdab29db6375b447fe6b3ec 100644 (file)
@@ -7,8 +7,12 @@ extern void abort (void);
 
 int main(void)
 {
-  int U1;
   long long Y, Y2;
+#if(__SIZEOF_INT__ >= 4)
+  int U1;
+#else
+  long U1;
+#endif
   unsigned int t;
 
   U1 = -2147483647-1;
index cb97e8e4e165cd7e3ce7afe2c190c4566319ecbe..2225f825b8288c6f326caa67f07f3a2b4c295312 100644 (file)
@@ -34,17 +34,17 @@ extern void link_error(int);
 /* Test that frexp(ARG,&i) == RES && i == EXP.  Check the sign in
    case we get -0.0.  */
 #define TESTIT_FREXP(ARG,RES,EXP) do { \
-  int i = 123456; \
+  int i = 12345; \
   if (__builtin_frexpf(ARG##f,&i) != RES##f \
       || CKEXP(i,EXP) \
       || CKSGN_F(__builtin_frexpf(ARG##f,&i),RES##f)) \
     link_error(__LINE__); \
-  i = 123456; \
+  i = 12345; \
   if (__builtin_frexp(ARG,&i) != RES \
       || CKEXP(i,EXP) \
       || CKSGN(__builtin_frexp(ARG,&i),RES)) \
     link_error(__LINE__); \
-  i = 123456; \
+  i = 12345; \
   if (__builtin_frexpl(ARG##l,&i) != RES##l \
       || CKEXP(i,EXP) \
       || CKSGN_L(__builtin_frexpl(ARG##l,&i),RES##l)) \