[arm] Further fixes for PR88469
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 22 Jan 2019 17:56:02 +0000 (17:56 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 22 Jan 2019 17:56:02 +0000 (17:56 +0000)
commit43646ce3e010e02f4c9252bde6032f233b341245
tree6c0bf94fc846c397921e236d689a06cc36b8dbbd
parentdf69e824488337a4a85f8a4893e0f0081f45cd72
[arm] Further fixes for PR88469

A bitfield that is exactly the same size as an integral type and
naturally aligned will have DECL_BIT_FIELD cleared.  So we need to
check DECL_BIT_FIELD_TYPE to be sure whether or not the underlying
type was declared with a bitfield declaration.

I've also added a test for bitfields that are based on overaligned types.

PR target/88469
gcc:
* config/arm/arm.c (arm_needs_double_word_align): Check
DECL_BIT_FIELD_TYPE.

gcc/testsuite:
* gcc.target/arm/aapcs/bitfield2.c: New test.
* gcc.target/arm/aapcs/bitfield3.c: New test.

From-SVN: r268160
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/aapcs/bitfield2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/aapcs/bitfield3.c [new file with mode: 0644]