===================================================================
@@ -1806,17 +1806,18 @@ proc check_effective_target_ptr32plus {
return [check_no_compiler_messages ptr32plus object {
int dummy[sizeof (void *) >= 4 ? 1 : -1];
}]
}
# Return 1 if we support 32-bit or larger array and structure sizes
-# using default options, 0 otherwise.
+# using default options, 0 otherwise. Avoid false positive on
+# targets with 20 or 24 bit address spaces.
proc check_effective_target_size32plus { } {
return [check_no_compiler_messages size32plus object {
- char dummy[65537];
+ char dummy[16777217L];
}]
}
# Returns 1 if we're generating 16-bit or smaller integers with the
# default options, 0 otherwise.
===================================================================
@@ -1,7 +1,7 @@
-/* { dg-skip-if "Array too big" { avr-*-* picochip-*-* m32c-*-* pdp11-*-* } { "*" } { "" } } */
+/* { dg-skip-if "Array too big" { avr-*-* picochip-*-* m32c-*-* pdp11-*-* msp430-*-* } { "*" } { "" } } */
#define STR2 "012345678901234567890123456789012345678901234567890123456789\
0123456789012345678901234567890123456789"
#define STR3 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2 STR2
#define STR4 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3 STR3
#define STR5 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4 STR4
===================================================================
@@ -1,5 +1,5 @@
-void * memcpy (void *, void *, long);
+void * memcpy (void *, void *, __SIZE_TYPE__);
void bar (void *p, void *q, unsigned s)
{
memcpy (p, q, s);
}
===================================================================
@@ -6,13 +6,13 @@ extern void abort (void);
struct X {
int *p;
int *q;
int *r;
};
int __attribute__((noinline))
-foo(int i, int j, int k, int off)
+foo(int i, int j, int k, __SIZE_TYPE__ off)
{
struct X x;
int **p, *q;
x.p = &i;
x.q = &j;
x.r = &k;
===================================================================
@@ -1,9 +1,11 @@
/* { dg-do run } */
-#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
+#ifdef __SIZE_TYPE__
+typedef __SIZE_TYPE__ uintptr_t;
+#elif (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
typedef unsigned long long uintptr_t;
#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
typedef unsigned long uintptr_t;
#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
typedef unsigned int uintptr_t;
#else
===================================================================
@@ -12,18 +12,18 @@ int c;
static void fn1(union U *p1, int p2, _Bool p3)
{
union U *e;
if (p2 == 0)
- a = ((union U*)((unsigned long)p1 & ~1))->val;
+ a = ((union U*)((__SIZE_TYPE__)p1 & ~1))->val;
if (b) {
e = p1;
} else if (c) {
- e = ((union U*)((unsigned long)p1 & ~1))->ptr;
+ e = ((union U*)((__SIZE_TYPE__)p1 & ~1))->ptr;
d = e;
} else {
e = 0;
d = ((union U*)0)->ptr;
}
===================================================================
@@ -1,11 +1,11 @@
/* { dg-do run } */
extern void abort(void);
-int try (char *a, int d)
+int try (char *a, __SIZE_TYPE__ d)
{
return a + d > a;
}
int main(void)
{
===================================================================
@@ -1,12 +1,12 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-isolate-paths" } */
/* { dg-skip-if "" keeps_null_pointer_checks } */
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
extern void *memset (void *__s, int __c, size_t __n)
__attribute__ ((__nothrow__, __leaf__)) __attribute__ ((__nonnull__ (1)));
struct rtx_def;
typedef struct rtx_def *rtx;
typedef struct VEC_rtx_base
===================================================================
@@ -1,9 +1,14 @@
/* { dg-do compile } */
-#if __SIZEOF_POINTER__ == __SIZEOF_LONG__
+#ifdef __SIZE_TYPE__
+_mark (__SIZE_TYPE__ obj, int i, char *a)
+{
+ (char *)&(((long *)(obj)) [i]) - a;
+}
+#elif __SIZEOF_POINTER__ == __SIZEOF_LONG__
_mark (long obj, int i, char *a)
{
(char *)&(((long *)(obj)) [i]) - a;
}
#elif __SIZEOF_POINTER__ == __SIZEOF_INT__
_mark (int obj, int i, char *a)