aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-01-07 14:16:21 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-04 05:17:34 -0400
commit9b6a2de07d471c634e63b0bc207fc8db14dd32ed (patch)
treeec9601324fc5ac2385e970bc1b2913f93f2bd884 /gcc
parentd20bab53d067fbcb028acaf0e7cbb97d2cd18acc (diff)
downloadgcc-9b6a2de07d471c634e63b0bc207fc8db14dd32ed.zip
gcc-9b6a2de07d471c634e63b0bc207fc8db14dd32ed.tar.gz
gcc-9b6a2de07d471c634e63b0bc207fc8db14dd32ed.tar.bz2
[Ada] Do not "optimize" by converting Positive to Unsigned
gcc/ada/ * exp_ch4.adb (Expand_Concatenate): Remove the non-optimization.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch4.adb8
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 5b0ba19..a4af950 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -3025,14 +3025,6 @@ package body Exp_Ch4 is
if Is_Enumeration_Type (Ityp) then
Artyp := Standard_Integer;
- -- If index type is Positive, we use the standard unsigned type, to give
- -- more room on the top of the range, obviating the need for an overflow
- -- check when creating the upper bound. This is needed to avoid junk
- -- overflow checks in the common case of String types.
-
- elsif Istyp = Standard_Positive then
- Artyp := Standard_Unsigned;
-
-- For modular types, we use a 32-bit modular type for types whose size
-- is in the range 1-31 bits. For 32-bit unsigned types, we use the
-- identity type, and for larger unsigned types we use a 64-bit type.