]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Use Standard.Natural on bit references to packed arrays
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 16 Dec 2019 10:18:59 +0000 (11:18 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 2 Jun 2020 08:58:11 +0000 (04:58 -0400)
2020-06-02  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_pakd.adb (Expand_Packed_Bit_Reference): Change type of
reference from Universal_Integer to Standard_Natural.

gcc/ada/exp_pakd.adb

index 7dcf241e247100e7893b4a192ad84d974564b7b5..d125db17b320865e2268b89669cb886edecaac1d 100644 (file)
@@ -1520,12 +1520,12 @@ package body Exp_Pakd is
       Get_Base_And_Bit_Offset (Prefix (N), Base, Offset);
 
       Rewrite (N,
-        Unchecked_Convert_To (Universal_Integer,
+        Unchecked_Convert_To (Standard_Natural,
           Make_Op_Mod (Loc,
             Left_Opnd => Offset,
             Right_Opnd => Make_Integer_Literal (Loc, System_Storage_Unit))));
 
-      Analyze_And_Resolve (N, Universal_Integer);
+      Analyze_And_Resolve (N, Standard_Natural);
    end Expand_Packed_Bit_Reference;
 
    ------------------------------------