From e663d4d985b60ba445f140df2481af573073cbc7 Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Mon, 3 Dec 2018 15:47:52 +0000 Subject: [PATCH] [Ada] Adjust the default MALLOC_OBSERVABLE_ALIGNMENT to 2 * POINTER_SIZE Instead of 2 * LONG_TYPE_SIZE. POINTER_SIZE is believed to be the correct base on more configurations than LONG_TYPE_SIZE and this adjustment prevents the need for local patches to compensate on configurations where the latter is inappropriate, for example x86_64-mingw. 2018-12-03 Olivier Hainque gcc/ada/ * gcc-interface/targtyps.c (MALLOC_OBSERVABLE_ALIGNMENT): Set to 2 * POINTER_SIZE. From-SVN: r266747 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/targtyps.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9bb341366b9..d66c7bd66fd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-12-03 Olivier Hainque + + * gcc-interface/targtyps.c (MALLOC_OBSERVABLE_ALIGNMENT): Set to + 2 * POINTER_SIZE. + 2018-12-03 Ed Schonberg * sem_res.adb (Set_Slice_Subtype): The index type of a slice is diff --git a/gcc/ada/gcc-interface/targtyps.c b/gcc/ada/gcc-interface/targtyps.c index 78a9db94282..9386a530ab8 100644 --- a/gcc/ada/gcc-interface/targtyps.c +++ b/gcc/ada/gcc-interface/targtyps.c @@ -6,7 +6,7 @@ * * * Body * * * - * Copyright (C) 1992-2015, Free Software Foundation, Inc. * + * Copyright (C) 1992-2018, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -132,7 +132,7 @@ get_target_maximum_default_alignment (void) #ifdef MALLOC_OBSERVABLE_ALIGNMENT #define MALLOC_ALIGNMENT MALLOC_OBSERVABLE_ALIGNMENT #else -#define MALLOC_OBSERVABLE_ALIGNMENT (2 * LONG_TYPE_SIZE) +#define MALLOC_OBSERVABLE_ALIGNMENT (2 * POINTER_SIZE) #define MALLOC_ALIGNMENT \ MAX (MALLOC_ABI_ALIGNMENT, MALLOC_OBSERVABLE_ALIGNMENT) #endif -- 2.30.2