aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.adb
diff options
context:
space:
mode:
authorThomas Quinot <quinot@adacore.com>2005-03-18 12:49:26 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-03-18 12:49:26 +0100
commita77842bdf959270baae1ec9f7d82a3217a083a56 (patch)
tree7cb890101cd69f15c9c050917024b75c2e82a801 /gcc/ada/sem_ch8.adb
parent2ccf2fb35ea3eda056496c378fc5d07d363e0407 (diff)
downloadgcc-a77842bdf959270baae1ec9f7d82a3217a083a56.zip
gcc-a77842bdf959270baae1ec9f7d82a3217a083a56.tar.gz
gcc-a77842bdf959270baae1ec9f7d82a3217a083a56.tar.bz2
exp_dist.adb (Get_PCS_Name): Move from Exp_Dist body to Sem_Dist spec...
2005-03-17 Thomas Quinot <quinot@adacore.com> * exp_dist.adb (Get_PCS_Name): Move from Exp_Dist body to Sem_Dist spec, to make this predicate available to other units. * rtsfind.adb (Check_RPC): Use Sem_Dist.Get_PCS_Name instead of reimplementing it. * sem_ch8.adb: Disable expansion of remote access-to-subprogram types when no distribution runtime library is available. * sem_res.adb, sem_dist.adb: Disable expansion of remote access-to-subprogram types when no distribution runtime library is available. (Get_PCS_Name): Move from Exp_Dist body to Sem_Dist spec, to make this predicate available to other units. * sem_dist.ads (Get_PCS_Name): Move from Exp_Dist body to Sem_Dist spec, to make this predicate available to other units. From-SVN: r96668
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r--gcc/ada/sem_ch8.adb12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d890026..5f8de03 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -50,6 +50,7 @@ with Sem_Ch4; use Sem_Ch4;
with Sem_Ch6; use Sem_Ch6;
with Sem_Ch12; use Sem_Ch12;
with Sem_Disp; use Sem_Disp;
+with Sem_Dist; use Sem_Dist;
with Sem_Res; use Sem_Res;
with Sem_Util; use Sem_Util;
with Sem_Type; use Sem_Type;
@@ -3235,6 +3236,7 @@ package body Sem_Ch8 is
if Comes_From_Source (N)
and then Is_Remote_Access_To_Subprogram_Type (E)
and then Expander_Active
+ and then Get_PCS_Name /= Name_No_DSA
then
Rewrite (N,
New_Occurrence_Of (Equivalent_Type (E), Sloc (N)));
@@ -3540,7 +3542,7 @@ package body Sem_Ch8 is
and then Chars (P) = Chars (Selector)
then
Id := S;
- goto found;
+ goto Found;
end if;
end if;
@@ -3610,10 +3612,16 @@ package body Sem_Ch8 is
end if;
end if;
- <<found>>
+ <<Found>>
if Comes_From_Source (N)
and then Is_Remote_Access_To_Subprogram_Type (Id)
+ and then Present (Equivalent_Type (Id))
then
+ -- If we are not actually generating distribution code (i.e.
+ -- the current PCS is the dummy non-distributed version), then
+ -- the Equivalent_Type will be missing, and Id should be treated
+ -- as a regular access-to-subprogram type.
+
Id := Equivalent_Type (Id);
Set_Chars (Selector, Chars (Id));
end if;