diff options
author | Thomas Quinot <quinot@adacore.com> | 2005-06-16 10:38:05 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-06-16 10:38:05 +0200 |
commit | 0772a6ea04339a2bd6bbae174c0dd0a47b9f69bd (patch) | |
tree | 720377e95be66feb58b5419b5bd3a6725cbbf060 | |
parent | 975f319568cd880d7434b345441b91e84265c20d (diff) | |
download | gcc-0772a6ea04339a2bd6bbae174c0dd0a47b9f69bd.zip gcc-0772a6ea04339a2bd6bbae174c0dd0a47b9f69bd.tar.gz gcc-0772a6ea04339a2bd6bbae174c0dd0a47b9f69bd.tar.bz2 |
exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): For an RACW without any primitives...
2005-06-14 Thomas Quinot <quinot@adacore.com>
* exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): For an
RACW without any primitives, do not generate the if statement for
dispatching by name in the PolyORB/DSA case, as it would be malformed
(it would have an Elsif_Parts list that is not No_List, but with a
length of 0).
From-SVN: r101035
-rw-r--r-- | gcc/ada/exp_dist.adb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb index 60fdf4f..13dbbce 100644 --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -1164,11 +1164,6 @@ package body Exp_Dist is -- simple sequence of string comparisons. RPC_Receiver_Elsif_Parts := New_List; - Append_To (RPC_Receiver_Statements, - Make_Implicit_If_Statement (Designated_Type, - Condition => New_Occurrence_Of (Standard_False, Loc), - Then_Statements => New_List, - Elsif_Parts => RPC_Receiver_Elsif_Parts)); end if; end if; @@ -1308,6 +1303,16 @@ package body Exp_Dist is -- Build the case statement and the heart of the subprogram if not Is_RAS then + if Get_PCS_Name = Name_PolyORB_DSA + and then Present (First (RPC_Receiver_Elsif_Parts)) + then + Append_To (RPC_Receiver_Statements, + Make_Implicit_If_Statement (Designated_Type, + Condition => New_Occurrence_Of (Standard_False, Loc), + Then_Statements => New_List, + Elsif_Parts => RPC_Receiver_Elsif_Parts)); + end if; + Append_To (RPC_Receiver_Case_Alternatives, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_List (Make_Others_Choice (Loc)), |