From: Vincent Celier Date: Thu, 4 Aug 2011 09:46:11 +0000 (+0000) Subject: a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not allowed in no... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4641426688cb151187dc9f0e125d52559eccfa85;p=gcc.git a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not allowed in no run time mode. 2011-08-04 Vincent Celier * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not allowed in no run time mode. 2011-08-04 Vincent Celier * make.adb (Check): When -gnatc is used, check for the source file inside the ALI file with a canonical case file name. From-SVN: r177346 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d8a2abe161e..3ce6f2cd786 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-08-04 Vincent Celier + + * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not + allowed in no run time mode. + +2011-08-04 Vincent Celier + + * make.adb (Check): When -gnatc is used, check for the source file + inside the ALI file with a canonical case file name. + 2011-08-04 Emmanuel Briot * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for diff --git a/gcc/ada/a-tags.adb b/gcc/ada/a-tags.adb index 7070fa792b8..d347307987c 100644 --- a/gcc/ada/a-tags.adb +++ b/gcc/ada/a-tags.adb @@ -315,6 +315,8 @@ package body Ada.Tags is for E_Tag'Address use TSD.External_Tag.all'Address; pragma Import (Ada, E_Tag); + Dup_Ext_Tag : constant String := "duplicated external tag """; + -- Start of processing for Check_TSD begin @@ -324,7 +326,17 @@ package body Ada.Tags is T := External_Tag_HTable.Get (To_Address (TSD.External_Tag)); if T /= null then - raise Program_Error with "duplicated external tag " & E_Tag; + -- Avoid concatenation, as it is not allowed in no run time mode + + declare + Msg : String (1 .. Dup_Ext_Tag'Length + E_Tag_Len + 1); + begin + Msg (1 .. Dup_Ext_Tag'Length) := Dup_Ext_Tag; + Msg (Dup_Ext_Tag'Length + 1 .. Dup_Ext_Tag'Length + E_Tag_Len) := + E_Tag; + Msg (Msg'Last) := '"'; + raise Program_Error with Msg; + end; end if; end Check_TSD; diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb index 29a5d4c339b..7ae52f1830d 100644 --- a/gcc/ada/make.adb +++ b/gcc/ada/make.adb @@ -1622,10 +1622,14 @@ package body Make is if Operating_Mode = Check_Semantics then declare - File_Name : constant String := Get_Name_String (Source_File); + File_Name : String := Get_Name_String (Source_File); OK : Boolean := False; begin + -- In the ALI file, the source file names are in canonical case + + Canonical_Case_File_Name (File_Name); + for U in ALIs.Table (ALI).First_Unit .. ALIs.Table (ALI).Last_Unit loop