[Ada] Adjust the default MALLOC_OBSERVABLE_ALIGNMENT to 2 * POINTER_SIZE
authorOlivier Hainque <hainque@adacore.com>
Mon, 3 Dec 2018 15:47:52 +0000 (15:47 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 3 Dec 2018 15:47:52 +0000 (15:47 +0000)
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  <hainque@adacore.com>

gcc/ada/

* gcc-interface/targtyps.c (MALLOC_OBSERVABLE_ALIGNMENT): Set to
2 * POINTER_SIZE.

From-SVN: r266747

gcc/ada/ChangeLog
gcc/ada/gcc-interface/targtyps.c

index 9bb341366b9dd633e5164972af864e952333d403..d66c7bd66fdd672ab93cdf4ac3de5380dc650116 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-03  Olivier Hainque  <hainque@adacore.com>
+
+       * gcc-interface/targtyps.c (MALLOC_OBSERVABLE_ALIGNMENT): Set to
+       2 * POINTER_SIZE.
+
 2018-12-03  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_res.adb (Set_Slice_Subtype): The index type of a slice is
index 78a9db94282a3ff0404a3367c8e385eabb7a6021..9386a530ab843617d1bf047897bae888c492a38c 100644 (file)
@@ -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