re PR middle-end/17112 (Copying of packed bitfields is wrong)
authorRoger Sayle <roger@eyesopen.com>
Sun, 26 Sep 2004 14:58:34 +0000 (14:58 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 26 Sep 2004 14:58:34 +0000 (14:58 +0000)
commit897f610ba4492354c4bab4d61f476dc8d27c9124
treeaa76381885409572a4b6e89bce34c27e9ce000c8
parent5c8c573a86eddc5949d59c602704775d1671a8fb
re PR middle-end/17112 (Copying of packed bitfields is wrong)

PR middle-end/17112
* stor-layout.c (compute_record_mode): For records with a single
field, only use the field's mode if its size matches what we'd
have choosen for the record ourselves.  This forces the use of
BLKmode for packed records that don't completely fill a mode.

* gcc.dg/pr17112-1.c: New test case.

Co-Authored-By: Giovanni Bajo <giovannibajo@gcc.gnu.org>
From-SVN: r88130
gcc/ChangeLog
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr17112-1.c [new file with mode: 0644]