From: Eric Botcazou Date: Fri, 15 Dec 2017 11:32:27 +0000 (+0000) Subject: re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory... X-Git-Tag: releases/gcc-6.5.0~634 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8811fc8b49d2737d04540ecf18ab54ed0e358901;p=thirdparty%2Fgcc.git re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory usage) PR target/66488 * ggc-page.c (HOST_BITS_PER_PTR): Do not define here... * hwint.h (HOST_BITS_PER_PTR): ...but here instead. From-SVN: r255689 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8aed1e5e9363..3331fed614e5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2017-12-14 Peter Bergner Backport from mainline diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c index 2b42b6e4f393..54bda10762d3 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -90,11 +90,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 14740ccc939a..4dd255d486c5 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. */