static unsigned int
aarch64_function_arg_alignment (machine_mode mode, const_tree type,
- bool *abi_break)
+ unsigned int *abi_break)
{
- *abi_break = false;
+ *abi_break = 0;
if (!type)
return GET_MODE_ALIGNMENT (mode);
if (bitfield_alignment > alignment)
{
- *abi_break = true;
+ *abi_break = alignment;
return bitfield_alignment;
}
int ncrn, nvrn, nregs;
bool allocate_ncrn, allocate_nvrn;
HOST_WIDE_INT size;
- bool abi_break;
+ unsigned int abi_break;
/* We need to do this once per argument. */
if (pcum->aapcs_arg_processed)
static unsigned int
aarch64_function_arg_boundary (machine_mode mode, const_tree type)
{
- bool abi_break;
+ unsigned int abi_break;
unsigned int alignment = aarch64_function_arg_alignment (mode, type,
&abi_break);
+ alignment = MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY);
if (abi_break & warn_psabi)
- inform (input_location, "parameter passing for argument of type "
- "%qT changed in GCC 9.1", type);
+ {
+ abi_break = MIN (MAX (abi_break, PARM_BOUNDARY), STACK_BOUNDARY);
+ if (alignment != abi_break)
+ inform (input_location, "parameter passing for argument of type "
+ "%qT changed in GCC 9.1", type);
+ }
- return MIN (MAX (alignment, PARM_BOUNDARY), STACK_BOUNDARY);
+ return alignment;
}
/* Implement TARGET_GET_RAW_RESULT_MODE and TARGET_GET_RAW_ARG_MODE. */
f_stack, NULL_TREE);
size = int_size_in_bytes (type);
- bool abi_break;
+ unsigned int abi_break;
align
= aarch64_function_arg_alignment (mode, type, &abi_break) / BITS_PER_UNIT;
--- /dev/null
+/* PR target/91710 */
+/* { dg-do compile } */
+
+struct S { unsigned int i:4; };
+
+unsigned int test1(struct S s) { /* { dg-bogus "parameter passing for argument of type" } */
+ return s.i;
+}
+
+unsigned int test2(unsigned x, struct S s) { /* { dg-bogus "parameter passing for argument of type" } */
+ return x - s.i;
+}
+
+unsigned int test3(unsigned x, unsigned y, struct S s) { /* { dg-bogus "parameter passing for argument of type" } */
+ return x - y - s.i;
+}