public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-424] [Ada] Do not "optimize" by converting Positive to Unsigned
@ 2021-05-04  9:20 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-05-04  9:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:9b6a2de07d471c634e63b0bc207fc8db14dd32ed

commit r12-424-g9b6a2de07d471c634e63b0bc207fc8db14dd32ed
Author: Bob Duff <duff@adacore.com>
Date:   Thu Jan 7 14:16:21 2021 -0500

    [Ada] Do not "optimize" by converting Positive to Unsigned
    
    gcc/ada/
    
            * exp_ch4.adb (Expand_Concatenate): Remove the non-optimization.

Diff:
---
 gcc/ada/exp_ch4.adb | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 5b0ba196730..a4af950dc09 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-04  9:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04  9:20 [gcc r12-424] [Ada] Do not "optimize" by converting Positive to Unsigned Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).