OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / m128-check.h
index 3231c07..a20f821 100644 (file)
@@ -37,6 +37,10 @@ typedef union
   double a[2];
 } union128d;
 
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(A) (sizeof (A) / sizeof ((A)[0]))
+#endif
+
 #ifdef DEBUG
 #define PRINTF printf
 #else
@@ -51,7 +55,7 @@ check_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v)        \
   int i;                                               \
   int err = 0;                                         \
                                                        \
-  for (i = 0; i < sizeof (u.a) / sizeof (u.a[0]); i++) \
+  for (i = 0; i < ARRAY_SIZE (u.a); i++)               \
     if (u.a[i] != v[i])                                        \
       {                                                        \
        err++;                                          \