+2019-09-18 Bob Duff <duff@adacore.com>
+
+ * exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Move call
+ to RTE_Available later, so it doesn't disturb the elab order.
+ The RE_Copy_Bitfield entity is defined in package
+ System.Bitfields which has a dependency on package
+ System.Bitfield_Utils, which has it its spec:
+ pragma Elaborate_Body;
+ The query on RTE_Available forces loading and analyzing
+ System.Bitfields and all its withed units.
+
2019-09-18 Eric Botcazou <ebotcazou@adacore.com>
* checks.ads (Alignment_Warnings_Record): Add P component.
-- optimization in that case as well. We could complicate this code by
-- actually looking for such volatile and independent components.
- if RTE_Available (RE_Copy_Bitfield)
- and then Is_Bit_Packed_Array (L_Type)
+ if Is_Bit_Packed_Array (L_Type)
and then Is_Bit_Packed_Array (R_Type)
and then not Reverse_Storage_Order (L_Type)
and then not Reverse_Storage_Order (R_Type)
and then not Has_Independent_Components (R_Type)
and then not L_Prefix_Comp
and then not R_Prefix_Comp
+ and then RTE_Available (RE_Copy_Bitfield)
then
return Expand_Assign_Array_Bitfield
(N, Larray, Rarray, L_Type, R_Type, Rev);