From: Eric Botcazou Date: Fri, 15 Dec 2017 11:30:56 +0000 (+0000) Subject: re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5b39f907f7a2d53a9506fdeafb99078315531eb;p=gcc.git re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory usage) 2017-12-15 Eric Botcazou PR target/66488 * ggc-page.c (HOST_BITS_PER_PTR): Do not define here... * hwint.h (HOST_BITS_PER_PTR): ...but here instead. * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete. From-SVN: r255687 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 453aa70025c..3ae3a32965b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-12-15 Eric Botcazou + + PR target/66488 + * ggc-page.c (HOST_BITS_PER_PTR): Do not define here... + * hwint.h (HOST_BITS_PER_PTR): ...but here instead. + * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete. + 2017-12-15 Julia Koval * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi, diff --git a/gcc/config/i386/xm-mingw32.h b/gcc/config/i386/xm-mingw32.h index 6eb3a626f0c..d4d63f58322 100644 --- a/gcc/config/i386/xm-mingw32.h +++ b/gcc/config/i386/xm-mingw32.h @@ -37,8 +37,3 @@ along with GCC; see the file COPYING3. If not see "long long" values. Instead, we use "I64". */ #define HOST_LONG_LONG_FORMAT "I64" #endif - -/* this is to prevent gcc-heap.c from assuming sizeof(long) == sizeof(intptr_t) */ -#ifdef __x86_64__ -# define HOST_BITS_PER_PTR 64 -#endif diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 5f79e32ded4..854d310e0ba 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -91,11 +91,6 @@ along with GCC; see the file COPYING3. If not see 3: Object allocations as well. 4: Object marks as well. */ #define GGC_DEBUG_LEVEL (0) - -#ifndef HOST_BITS_PER_PTR -#define HOST_BITS_PER_PTR HOST_BITS_PER_LONG -#endif - /* A two-level tree is used to look up the page-entry for a given pointer. Two chunks of the pointer's bits are extracted to index diff --git a/gcc/hwint.h b/gcc/hwint.h index 2a61e3c9be6..e5fa33fc602 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -14,6 +14,7 @@ #define HOST_BITS_PER_SHORT (CHAR_BIT * SIZEOF_SHORT) #define HOST_BITS_PER_INT (CHAR_BIT * SIZEOF_INT) #define HOST_BITS_PER_LONG (CHAR_BIT * SIZEOF_LONG) +#define HOST_BITS_PER_PTR (CHAR_BIT * SIZEOF_VOID_P) /* The string that should be inserted into a printf style format to indicate a "long" operand. */