summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch8.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-18 11:49:26 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-18 11:49:26 +0000
commitc1b50e6ed6803b02306094b9ce400e4eb9807021 (patch)
tree7cb890101cd69f15c9c050917024b75c2e82a801 /gcc/ada/sem_ch8.adb
parentb5f5f125aad8e84812b60b5201e24a8d4964ec4d (diff)
downloadgcc-c1b50e6ed6803b02306094b9ce400e4eb9807021.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96668 138bc75d-0d04-0410-961f-82ee72b054a4
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 d8900263ba5..5f8de03efc1 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;