* [COMMITTED] ada: Fix oversight in latest change
@ 2023-05-23 8:08 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-05-23 8:08 UTC (permalink / raw)
To: gcc-patches; +Cc: Eric Botcazou
From: Eric Botcazou <ebotcazou@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_res.adb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index f1d9a97452a..3b7d821158c 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));
--
2.40.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-23 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 8:08 [COMMITTED] ada: Fix oversight in latest change Marc Poulhiès
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).