]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix oversight in latest change
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 24 Feb 2023 14:59:47 +0000 (15:59 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 23 May 2023 07:59:06 +0000 (09:59 +0200)
The resolution must be identical inside and outside the System hierarchy.

gcc/ada/

* sem_res.adb (Resolve_Intrinsic_Operator): Always perform the same
resolution for the special mod operator of System.Storage_Elements.

gcc/ada/sem_res.adb

index f1d9a97452a902467b4e3d1bdc554fb3825628d9..3b7d821158c7255beacb79b5473f7f6955e3842d 100644 (file)
@@ -9778,11 +9778,13 @@ package body Sem_Res is
 
       --  If the result or operand types are private, rewrite with unchecked
       --  conversions on the operands and the result, to expose the proper
-      --  underlying numeric type.
+      --  underlying numeric type. Likewise for the special mod operator of
+      --  System.Storage_Elements, to expose the modified base type.
 
       if Is_Private_Type (Typ)
         or else Is_Private_Type (Etype (Left_Opnd (N)))
         or else Is_Private_Type (Etype (Right_Opnd (N)))
+        or else Is_Stoele_Mod
       then
          Arg1 := Convert_Operand (Left_Opnd (N));