On Tue, Jan 22, 2019 at 02:10:59PM +0000, Richard Earnshaw (lists) wrote:
> @@ -6630,6 +6633,13 @@ arm_needs_doubleword_align (machine_mode mode,
> const_tree type)
> Make sure we can warn about that with -Wpsabi. */
> ret = -1;
> }
> + else if (TREE_CODE (field) == FIELD_DECL
> + && DECL_BIT_FIELD (field)
> + && TYPE_ALIGN (DECL_BIT_FIELD_TYPE (field)) > PARM_BOUNDARY)
> + ret2 = 1;
> +
> + if (ret2)
> + return 2;
Can you double check what behavior you want e.g. for:
typedef int alint __attribute__((aligned (8)));
struct S1 { alint a : 17; alint b : 15; };
struct __attribute__((packed)) S2 { char a; long long b : 12; long long c : 20;
long long d : 32; };
struct __attribute__((packed)) S3 { char a; alint b : 12; alint c : 20; };
and passing/returning of S1/S2/S3?
TYPE_ALIGN (DECL_BIT_FIELD_TYPE (field)) is I think alint in this case,
and for packed structures, I guess DECL_ALIGN of the fields is generally
small, but TYPE_ALIGN might not be.
Jakub