src/hotspot/share/utilities/globalDefinitions_gcc.hpp
changeset 50120 9da00197ff72
parent 49392 2956d0ece7a9
child 52026 286389b60292
--- a/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Tue May 15 19:26:00 2018 -0400
+++ b/src/hotspot/share/utilities/globalDefinitions_gcc.hpp	Wed May 16 10:24:54 2018 +0200
@@ -272,4 +272,14 @@
 #define NOINLINE     __attribute__ ((noinline))
 #define ALWAYSINLINE inline __attribute__ ((always_inline))
 
+// Alignment
+//
+// NOTE! The "+0" below is a workaround for a known bug in older GCC versions
+// (known to fail with 4.6.0, fixed in 4.9.0). This bug affects systems such as
+// RedHat/Oracle Linux 7.5, which ships with GCC 4.8.5. For more details, see
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55382 and
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53017
+//
+#define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x+0)))
+
 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_GCC_HPP