diff mbox series

[Ada] Adjust the default MALLOC_OBSERVABLE_ALIGNMENT to 2 * POINTER_SIZE

Message ID 20181203155035.GA28206@adacore.com
State New
Headers show
Series [Ada] Adjust the default MALLOC_OBSERVABLE_ALIGNMENT to 2 * POINTER_SIZE | expand

Commit Message

Pierre-Marie de Rodat Dec. 3, 2018, 3:50 p.m. UTC
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.

Tested on x86_64-pc-linux-gnu, committed on trunk

2018-12-03  Olivier Hainque  <hainque@adacore.com>

gcc/ada/

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

Patch

--- gcc/ada/gcc-interface/targtyps.c
+++ 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