diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-02-24 15:59:47 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-05-23 09:59:06 +0200 |
commit | a550a0cf91ddad3b331bed5e694e31b34d690c95 (patch) | |
tree | 3ca7d492925d94453005c8f4e896d602ba58a590 /gcc/ada/sem_res.adb | |
parent | b71d4b627b53f1803a547d802a154f60606b1b09 (diff) | |
download | gcc-a550a0cf91ddad3b331bed5e694e31b34d690c95.zip gcc-a550a0cf91ddad3b331bed5e694e31b34d690c95.tar.gz gcc-a550a0cf91ddad3b331bed5e694e31b34d690c95.tar.bz2 |
ada: Fix oversight in latest change
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.
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r-- | gcc/ada/sem_res.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index f1d9a97..3b7d821 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -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)); |