diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-12-15 11:30:56 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-12-15 11:30:56 +0000 |
commit | f5b39f907f7a2d53a9506fdeafb99078315531eb (patch) | |
tree | d3a60c3ccd8e9a20607fe169c396e18e46ae37a2 /gcc | |
parent | 25ea36594733d8f13be3f0982c9bfe58f51c6319 (diff) | |
download | gcc-f5b39f907f7a2d53a9506fdeafb99078315531eb.zip gcc-f5b39f907f7a2d53a9506fdeafb99078315531eb.tar.gz gcc-f5b39f907f7a2d53a9506fdeafb99078315531eb.tar.bz2 |
re PR target/66488 (segfault on sizeof(long) < sizeof(void*) and large GCC memory usage)
2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/xm-mingw32.h | 5 | ||||
-rw-r--r-- | gcc/ggc-page.c | 5 | ||||
-rw-r--r-- | gcc/hwint.h | 1 |
4 files changed, 8 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 453aa70..3ae3a32 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-12-15 Eric Botcazou <ebotcazou@adacore.com> + + 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 <julia.koval@intel.com> * 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 6eb3a62..d4d63f5 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 5f79e32..854d310 100644 --- a/gcc/ggc-page.c +++ b/gcc/ggc-page.c @@ -92,11 +92,6 @@ along with GCC; see the file COPYING3. If not see 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 the first and second levels of the tree, as follows: diff --git a/gcc/hwint.h b/gcc/hwint.h index 2a61e3c..e5fa33f 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. */ |