diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 07:53:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-09-05 07:53:34 +0000 |
commit | 6c292d3a44e3ee1f31ff0432e6be2f06e18aab8c (patch) | |
tree | 25b7d46a634a987bbd62c2db37fa872eb740fb75 /gcc/ada/exp_dbug.adb | |
parent | 948ef2b825ca5bace1ec247e7c6a121c9c271b71 (diff) | |
download | gcc-6c292d3a44e3ee1f31ff0432e6be2f06e18aab8c.tar.gz |
2005-09-01 Nicolas Setton <setton@adacore.com>
* exp_dbug.adb (Get_Encoded_Name): Fixed bug that caused biaised types
to be encoded as typ___XBLU_lowerbound__upperbound instead of
typ___XB_lowerbound__upperbound.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103862 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_dbug.adb')
-rw-r--r-- | gcc/ada/exp_dbug.adb | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb index 372f63cc0cc..e7bdcc4e5b3 100644 --- a/gcc/ada/exp_dbug.adb +++ b/gcc/ada/exp_dbug.adb @@ -562,12 +562,6 @@ package body Exp_Dbug is elsif Is_Discrete_Type (E) and then not Bounds_Match_Size (E) then - if Has_Biased_Representation (E) then - Get_External_Name_With_Suffix (E, "XB"); - else - Get_External_Name_With_Suffix (E, "XD"); - end if; - declare Lo : constant Node_Id := Type_Low_Bound (E); Hi : constant Node_Id := Type_High_Bound (E); @@ -588,16 +582,28 @@ package body Exp_Dbug is Lo_Encode : constant Boolean := Lo_Con or Lo_Discr; Hi_Encode : constant Boolean := Hi_Con or Hi_Discr; + Biased : constant Boolean := Has_Biased_Representation (E); + begin + if Biased then + Get_External_Name_With_Suffix (E, "XB"); + else + Get_External_Name_With_Suffix (E, "XD"); + end if; + if Lo_Encode or Hi_Encode then - if Lo_Encode then - if Hi_Encode then - Add_Str_To_Name_Buffer ("LU_"); + if Biased then + Add_Str_To_Name_Buffer ("_"); + else + if Lo_Encode then + if Hi_Encode then + Add_Str_To_Name_Buffer ("LU_"); + else + Add_Str_To_Name_Buffer ("L_"); + end if; else - Add_Str_To_Name_Buffer ("L_"); + Add_Str_To_Name_Buffer ("U_"); end if; - else - Add_Str_To_Name_Buffer ("U_"); end if; if Lo_Con then |