diff options
author | Thomas Quinot <quinot@adacore.com> | 2005-03-29 18:15:11 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-03-29 18:15:11 +0200 |
commit | c857f5ed55dd4f8f02892da3c79a595b39e376e5 (patch) | |
tree | 7013380c9973522d585bba691157d9afdd9e7a7b /gcc/ada/sem_prag.adb | |
parent | 57848bf789f92b5787fef0249c8d7254b02e5825 (diff) | |
download | gcc-c857f5ed55dd4f8f02892da3c79a595b39e376e5.zip gcc-c857f5ed55dd4f8f02892da3c79a595b39e376e5.tar.gz gcc-c857f5ed55dd4f8f02892da3c79a595b39e376e5.tar.bz2 |
exp_dist.adb (Add_RAST_Features, [...]): Set the From_Any...
2005-03-29 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb (Add_RAST_Features, PolyORB version): Set the From_Any,
To_Any and TypeCode TSSs on RAS types directly using Set_TSS, instead
of using Set_Renaming_TSS. This ensures that the TSS bodies are not
analyzed if expansion is disabled (which could otherwise cause spurious
error messages if expansion has been disabled due to previous
(unrelated) errors).
* sem_prag.adb (Analyze_Pragma, case Asynchronous): If RAS expansion
is disabled, the entity denoted by the argument is the access type
itself, not an underlying record type, so there is no need to go back
to the Corresponding_Remote_Type.
From-SVN: r97171
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b301929..a65c9ca 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -55,6 +55,7 @@ with Sem_Ch3; use Sem_Ch3; with Sem_Ch8; use Sem_Ch8; with Sem_Ch13; use Sem_Ch13; with Sem_Disp; use Sem_Disp; +with Sem_Dist; use Sem_Dist; with Sem_Elim; use Sem_Elim; with Sem_Eval; use Sem_Eval; with Sem_Intr; use Sem_Intr; @@ -4605,13 +4606,20 @@ package body Sem_Prag is Error_Pragma_Arg ("pragma% cannot be applied to function", Arg1); - elsif Ekind (Nm) = E_Record_Type - and then Present (Corresponding_Remote_Type (Nm)) - then - -- A record type that is the Equivalent_Type for - -- a remote access-to-subprogram type. + elsif Is_Remote_Access_To_Subprogram_Type (Nm) then + + if Is_Record_Type (Nm) then + -- A record type that is the Equivalent_Type for + -- a remote access-to-subprogram type. + + N := Declaration_Node (Corresponding_Remote_Type (Nm)); - N := Declaration_Node (Corresponding_Remote_Type (Nm)); + else + -- A non-expanded RAS type (case where distribution is + -- not enabled). + + N := Declaration_Node (Nm); + end if; if Nkind (N) = N_Full_Type_Declaration and then Nkind (Type_Definition (N)) = @@ -4622,9 +4630,9 @@ package body Sem_Prag is if Is_Asynchronous (Nm) and then Expander_Active + and then Get_PCS_Name /= Name_No_DSA then - RACW_Type_Is_Asynchronous ( - Underlying_RACW_Type (Nm)); + RACW_Type_Is_Asynchronous (Underlying_RACW_Type (Nm)); end if; else |