From 6c292d3a44e3ee1f31ff0432e6be2f06e18aab8c Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 5 Sep 2005 07:53:34 +0000 Subject: [PATCH] 2005-09-01 Nicolas Setton * 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 --- gcc/ada/exp_dbug.adb | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/gcc/ada/exp_dbug.adb b/gcc/ada/exp_dbug.adb index 372f63c..e7bdcc4 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 -- 2.7.4