mirror of git://gcc.gnu.org/git/gcc.git
rx.c (rx_is_ms_bitfield_layout): Return false if the record is packed.
* config/rx/rx.c (rx_is_ms_bitfield_layout): Return false if the record is packed. * gcc.target/rx/pack.c: New test. From-SVN: r166793
This commit is contained in:
parent
180ed1b2bd
commit
27128fc317
|
|
@ -1,3 +1,8 @@
|
|||
2010-11-16 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config/rx/rx.c (rx_is_ms_bitfield_layout): Return false if the
|
||||
record is packed.
|
||||
|
||||
2010-11-15 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* fold-const.c (operand_equal_for_comparison_p): Handle FMA_EXPR,
|
||||
|
|
|
|||
|
|
@ -2306,7 +2306,8 @@ rx_file_start (void)
|
|||
static bool
|
||||
rx_is_ms_bitfield_layout (const_tree record_type ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
/* The packed attribute overrides the MS behaviour. */
|
||||
return ! TYPE_PACKED (record_type);
|
||||
}
|
||||
|
||||
/* Try to generate code for the "isnv" pattern which inserts bits
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
2010-11-16 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gcc.target/rx/pack.c: New test.
|
||||
|
||||
2010-11-15 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* gcc.dg/torture/builtin-math-2.c: Split out fma tests...
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
typedef unsigned short INT16U;
|
||||
|
||||
typedef struct tst_2
|
||||
{
|
||||
INT16U f0; // [+0]
|
||||
INT16U * f1; // [+2]
|
||||
INT16U f2; // [+6]
|
||||
INT16U * f3; // [+8]
|
||||
} __attribute__ ((__packed__)) t2;
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main (void)
|
||||
{
|
||||
if (offsetof (t2, f1) != 2)
|
||||
abort ();
|
||||
if (offsetof (t2, f2) != 6)
|
||||
abort ();
|
||||
if (offsetof (t2, f3) != 8)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
||||
Loading…
Reference in New Issue