aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-02-19 18:45:00 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-23 09:59:05 +0200
commitb64aaf4d81916f5570ddf2414747f3152e8b9f84 (patch)
treebca8ed2928da481bfa3154ba941373850ae31754 /gcc/ada/sem_ch3.adb
parent90e1445904179706e50c90c6553e127dbb2c43e8 (diff)
downloadgcc-b64aaf4d81916f5570ddf2414747f3152e8b9f84.zip
gcc-b64aaf4d81916f5570ddf2414747f3152e8b9f84.tar.gz
gcc-b64aaf4d81916f5570ddf2414747f3152e8b9f84.tar.bz2
ada: Remove the body of System.Storage_Elements
All the subprograms declared in the unit have convention Intrinsic and their current implementation makes some implicit assumptions that are not valid universally, so it is replaced by a direct expansion. This is mostly straightforward because Resolve_Intrinsic_Operator already contains the required circuitry, but a few adjustements are necessary. gcc/ada/ * exp_ch4.adb (Expand_N_Op_Mod): Deal with the special mod operator of System.Storage_Elements. * exp_intr.adb (Expand_To_Integer): New procedure. (Expand_Intrinsic_Call): Call Expand_To_Integer appropriately. (Expand_To_Address): Deal with an argument with modular type. * sem_ch3.adb (Derive_Subprogram): Also set convention Intrinsic on a derived intrinsic subprogram. * sem_res.adb (Resolve_Arithmetic_Op): Deal with intrinsic operators not coming from source exactly as those coming from source and also generate a reference in both cases. (Resolve_Op_Expon): Likewise. (Resolve_Intrinsic_Operator): Call Implementation_Base_Type to get a nonprivate base type. * snames.ads-tmpl (Name_To_Integer): New intrinsic name. * libgnat/s-stoele.ads: Replace pragma Convention with pragma Import throughout and remove pragma Inline_Always and Pure_Function. * libgnat/s-stoele.adb: Replace entire contents with pragma No_Body. * libgnat/s-atacco.adb: Adjust comment about pragma No_Body.
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index bace2cf..50ccb39 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -16206,6 +16206,7 @@ package body Sem_Ch3 is
if No (Actual_Subp) then
if Is_Intrinsic_Subprogram (Parent_Subp) then
+ Set_Convention (New_Subp, Convention_Intrinsic);
Set_Is_Intrinsic_Subprogram (New_Subp);
if Present (Alias (Parent_Subp))