+2019-01-22 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/88469
+ * config/arm/arm.c (arm_needs_double_word_align): Check
+ DECL_BIT_FIELD_TYPE.
+
2019-01-22 Hongtao Liu <hongtao.liu@intel.com>
H.J. Lu <hongjiu.lu@intel.com>
ret = -1;
}
else if (TREE_CODE (field) == FIELD_DECL
- && DECL_BIT_FIELD (field)
+ && DECL_BIT_FIELD_TYPE (field)
&& TYPE_ALIGN (DECL_BIT_FIELD_TYPE (field)) > PARM_BOUNDARY)
ret2 = 1;
+2019-01-22 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/88469
+ * gcc.target/arm/aapcs/bitfield2.c: New test.
+ * gcc.target/arm/aapcs/bitfield3.c: New test.
+
2019-01-22 Wilco Dijkstra <wdijkstr@arm.com>
PR rtl-optimization/87763
--- /dev/null
+/* Test AAPCS layout (alignment). */
+
+/* { dg-do run { target arm_eabi } } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O" } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "bitfield2.c"
+
+typedef unsigned int alint __attribute__((aligned (8)));
+
+struct bf
+{
+ alint a: 17;
+ alint b: 15;
+} v = {1, 1};
+
+#include "abitest.h"
+#else
+ ARG (int, 7, R0)
+ ARG (int, 9, R1)
+ ARG (int, 11, R2)
+ /* Alignment of the bitfield type should affect alignment of the overall
+ type, so R3 not used. */
+ LAST_ARG (struct bf, v, STACK)
+#endif
--- /dev/null
+/* Test AAPCS layout (alignment). */
+
+/* { dg-do run { target arm_eabi } } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O" } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "bitfield3.c"
+
+struct bf
+{
+ /* Internally this may be mapped to unsigned short. Ensure we still
+ check the original declaration. */
+ unsigned long long a: 16;
+ unsigned b: 3;
+} v = {1, 3};
+
+#include "abitest.h"
+#else
+ ARG (int, 7, R0)
+ ARG (int, 9, R1)
+ ARG (int, 11, R2)
+ /* Alignment of the bitfield type should affect alignment of the overall
+ type, so R3 not used. */
+ LAST_ARG (struct bf, v, STACK)
+#endif