stor-layout.c (place_field): Update rli->offset as well as rli->bitpos.
* stor-layout.c (place_field): Update rli->offset as well as rli->bitpos. From-SVN: r59301
This commit is contained in:
parent
5720520fc7
commit
5354730bf6
4 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-11-20 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* stor-layout.c (place_field): Update rli->offset as well as
|
||||
rli->bitpos.
|
||||
|
||||
2002-11-20 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* sched-deps.c (sched_analyze): Check HARD_REGNO_CALL_PART_CLOBBERED.
|
||||
|
|
|
@ -1036,6 +1036,7 @@ place_field (rli, field)
|
|||
if (rli->remaining_in_alignment < bitsize)
|
||||
{
|
||||
/* out of bits; bump up to next 'word'. */
|
||||
rli->offset = DECL_FIELD_OFFSET (rli->prev_field);
|
||||
rli->bitpos = size_binop (PLUS_EXPR,
|
||||
type_size,
|
||||
DECL_FIELD_BIT_OFFSET(rli->prev_field));
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-11-20 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* gcc.dg/bitfld-5.c: New test.
|
||||
|
||||
2002-11-20 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* gcc.c-torture/execute/20021120-3.c: New test.
|
||||
|
|
12
gcc/testsuite/gcc.dg/bitfld-5.c
Normal file
12
gcc/testsuite/gcc.dg/bitfld-5.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* { dg-options "" } */
|
||||
#include <limits.h>
|
||||
|
||||
struct s
|
||||
{
|
||||
int i1 : sizeof (int) * CHAR_BIT;
|
||||
int i2 : sizeof (int) * CHAR_BIT;
|
||||
int i3 : sizeof (int) * CHAR_BIT;
|
||||
int i4 : sizeof (int) * CHAR_BIT;
|
||||
};
|
||||
|
||||
int f[sizeof (struct s) != sizeof (int) * 4 ? -1 : 1];
|
Loading…
Add table
Reference in a new issue