diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71e64e4b9cd..0b922210390 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-01-03 Martin Jambor + + PR tree-optimization/46801 + * tree-sra.c (type_internals_preclude_sra_p): Check whether + aggregate fields start at byte boundary instead of the bit-field flag. + 2011-01-03 H.J. Lu PR driver/47137 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 86f8e3eaa4c..ae48268f38c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-01-03 Martin Jambor + + PR tree-optimization/46801 + * gnat.dg/pack9.adb: Remove xfail. + 2011-01-03 Martin Jambor PR tree-optimization/46984 diff --git a/gcc/testsuite/gnat.dg/pack9.adb b/gcc/testsuite/gnat.dg/pack9.adb index aa0298b6258..7e74050d35f 100644 --- a/gcc/testsuite/gnat.dg/pack9.adb +++ b/gcc/testsuite/gnat.dg/pack9.adb @@ -15,5 +15,5 @@ package body Pack9 is end Pack9; --- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" { xfail *-*-* } } } +-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } } -- { dg-final { cleanup-tree-dump "optimized" } } diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index 9d22ad76b4a..14fef477485 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -653,7 +653,8 @@ type_internals_preclude_sra_p (tree type) || !DECL_FIELD_OFFSET (fld) || !DECL_SIZE (fld) || !host_integerp (DECL_FIELD_OFFSET (fld), 1) || !host_integerp (DECL_SIZE (fld), 1) - || (DECL_BIT_FIELD (fld) && AGGREGATE_TYPE_P (ft))) + || (AGGREGATE_TYPE_P (ft) + && int_bit_position (fld) % BITS_PER_UNIT != 0)) return true; if (AGGREGATE_TYPE_P (ft)