aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-05-20 10:13:05 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-08 10:55:53 -0400
commit5c63fd2c90405ce32a229ebadfea96e46413ec88 (patch)
tree39165ddac0c15ae2f087bc048dbc92b05b569c23 /gcc
parent720425fa2dca0b7a69e28b1853932d5a77bf9333 (diff)
downloadgcc-5c63fd2c90405ce32a229ebadfea96e46413ec88.zip
gcc-5c63fd2c90405ce32a229ebadfea96e46413ec88.tar.gz
gcc-5c63fd2c90405ce32a229ebadfea96e46413ec88.tar.bz2
[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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/freeze.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index cb32f9d..528a7dd 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)