+2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * decl.c (make_packable_type): If the new type has been given BLKmode,
+ try again to get an integral mode for it.
+
2007-09-07 Eric Botcazou <ebotcazou@adacore.com>
Re-apply accidentally reverted change:
finish_record_type (new_type, nreverse (field_list), 1, true);
copy_alias_set (new_type, type);
+
+ /* Try harder to get a packable type if necessary, for example
+ in case the record itself contains a BLKmode field. */
+ if (TYPE_MODE (new_type) == BLKmode)
+ TYPE_MODE (new_type)
+ = mode_for_size_tree (TYPE_SIZE (new_type), MODE_INT, 1);
+
return TYPE_MODE (new_type) == BLKmode ? type : new_type;
}
\f
+2007-09-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/unaligned_rep_clause.adb: New testcase.
+
2007-09-08 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/33301
--- /dev/null
+procedure Unaligned_Rep_Clause is
+
+ type One_Bit_Record is
+ record
+ B : Boolean;
+ end record;
+ Pragma Pack(One_Bit_Record);
+
+ subtype Version_Number_Type is String (1 .. 3);
+
+ type Inter is
+ record
+ Version : Version_Number_Type;
+ end record;
+
+ type Msg_Type is
+ record
+ Status : One_Bit_Record;
+ Version : Inter;
+ end record;
+
+ for Msg_Type use
+ record
+ Status at 0 range 0 .. 0;
+ Version at 0 range 1 .. 24;
+ end record;
+ for Msg_Type'Size use 25;
+
+ Data : Msg_Type;
+ Pragma Warnings (Off, Data);
+ Version : Inter;
+
+begin
+ Version := Data.Version;
+end;