From: Eric Botcazou Date: Wed, 20 May 2020 08:13:05 +0000 (+0200) Subject: [Ada] Add comment on implementation choice for byte-packed array types X-Git-Tag: basepoints/gcc-12~6324 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c63fd2c90405ce32a229ebadfea96e46413ec88;p=thirdparty%2Fgcc.git [Ada] Add comment on implementation choice for byte-packed array types gcc/ada/ * freeze.adb (Freeze_Array_Type): Add comment on implementation choice for byte-packed array types. --- diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index cb32f9d3c139..528a7dd87188 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2928,7 +2928,10 @@ package body Freeze is -- Bit packing is not needed for multiples of the storage -- unit if the type is composite because the back end can - -- byte pack composite types. + -- byte pack composite types efficiently. That's not true + -- for discrete types because every read would generate a + -- lot of instructions, so we keep using the manipulation + -- routines of the runtime for them. elsif Csiz mod System_Storage_Unit = 0 and then Is_Composite_Type (Ctyp)