From: Arnaud Charlet Date: Fri, 18 Jun 2010 10:19:44 +0000 (+0200) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcfb981b1a4e9a859a3cad5a34e963d74aeca468;p=gcc.git [multiple changes] 2010-06-18 Geert Bosch * i-forbla-darwin.adb: Include -lgnala and -lm in linker options for Darwin. 2010-06-18 Robert Dewar * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions true for gcc. 2010-06-18 Robert Dewar * sprint.adb: Minor format change for N_Expression_With_Actions. * repinfo.adb: Minor reformatting. 2010-06-18 Ed Schonberg * sem_elim.adb (Check_Eliminated): If within a subunit, use Defining_Entity to obtain the name of the entity in the proper body, to properly handle both separate packages and subprograms. 2010-06-18 Emmanuel Briot * prj-nmsc.adb (Check_File): New parameter Display_Path. From-SVN: r160976 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index bb99ab4da7c..5615848e10f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,28 @@ +2010-06-18 Geert Bosch + + * i-forbla-darwin.adb: Include -lgnala and -lm in linker options for + Darwin. + +2010-06-18 Robert Dewar + + * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions + true for gcc. + +2010-06-18 Robert Dewar + + * sprint.adb: Minor format change for N_Expression_With_Actions. + * repinfo.adb: Minor reformatting. + +2010-06-18 Ed Schonberg + + * sem_elim.adb (Check_Eliminated): If within a subunit, use + Defining_Entity to obtain the name of the entity in the proper body, to + properly handle both separate packages and subprograms. + +2010-06-18 Emmanuel Briot + + * prj-nmsc.adb (Check_File): New parameter Display_Path. + 2010-06-18 Thomas Quinot * g-socket.adb, g-socket.ads (Null_Selector): New object. diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index a69f732a54a..2c95dd64961 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -353,11 +353,11 @@ procedure Gnat1drv is then Use_Expression_With_Actions := False; - -- Otherwise normal gcc back end, for now still turn usage off by - -- default. + -- Otherwise normal gcc back end, which does implement this feature + -- so by default we allow its use. else - Use_Expression_With_Actions := False; + Use_Expression_With_Actions := True; end if; -- Set switch indicating if back end can handle limited types, and diff --git a/gcc/ada/i-forbla-darwin.adb b/gcc/ada/i-forbla-darwin.adb index 2a2134ecba4..825a8840414 100644 --- a/gcc/ada/i-forbla-darwin.adb +++ b/gcc/ada/i-forbla-darwin.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2006-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,5 +32,7 @@ -- Version for Mac OS X package body Interfaces.Fortran.BLAS is + pragma Linker_Options ("-lgnala"); + pragma Linker_Options ("-lm"); pragma Linker_Options ("-Wl,-framework,vecLib"); end Interfaces.Fortran.BLAS; diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index a3f64d0654b..0e8c041b9b9 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -298,6 +298,7 @@ package body Prj.Nmsc is Data : in out Tree_Processing_Data; Source_Dir_Rank : Natural; Path : Path_Name_Type; + Display_Path : Path_Name_Type; File_Name : File_Name_Type; Display_File_Name : File_Name_Type; Locally_Removed : Boolean; @@ -307,11 +308,12 @@ package body Prj.Nmsc is -- schemes, it is added to various htables through Add_Source and to -- Source_Paths_Htable. -- - -- Name is the name of the candidate file. It hasn't been normalized yet - -- and is the direct result of readdir(). + -- File_Name is the same as Display_File_Name, but has been normalized. + -- They do not include the directory information. -- - -- File_Name is the same as Name, but has been normalized. - -- Display_File_Name, however, has not been normalized. + -- Path and Display_Path on the other hand are the full path to the file. + -- Path must have been normalized (canonical casing and possibly links + -- resolved). -- -- Source_Directory is the directory in which the file was found. It is -- neither normalized nor has had links resolved, and must not end with a @@ -6663,15 +6665,12 @@ package body Prj.Nmsc is Data : in out Tree_Processing_Data; Source_Dir_Rank : Natural; Path : Path_Name_Type; + Display_Path : Path_Name_Type; File_Name : File_Name_Type; Display_File_Name : File_Name_Type; Locally_Removed : Boolean; For_All_Sources : Boolean) is - Canonical_Path : constant Path_Name_Type := - Path_Name_Type - (Canonical_Case_File_Name (Name_Id (Path))); - Name_Loc : Name_Location := Source_Names_Htable.Get (Project.Source_Names, File_Name); @@ -6721,11 +6720,11 @@ package body Prj.Nmsc is Check_Name := True; else - Name_Loc.Source.Path := (Canonical_Path, Path); + Name_Loc.Source.Path := (Path, Display_Path); Source_Paths_Htable.Set (Data.Tree.Source_Paths_HT, - Canonical_Path, + Path, Name_Loc.Source); -- Check if this is a subunit @@ -6734,7 +6733,7 @@ package body Prj.Nmsc is and then Name_Loc.Source.Kind = Impl then Src_Ind := Sinput.P.Load_Project_File - (Get_Name_String (Canonical_Path)); + (Get_Name_String (Path)); if Sinput.P.Source_File_Is_Subunit (Src_Ind) then Override_Kind (Name_Loc.Source, Sep); @@ -6786,7 +6785,7 @@ package body Prj.Nmsc is Display_File => Display_File_Name, Unit => Unit, Locally_Removed => Locally_Removed, - Path => (Canonical_Path, Path)); + Path => (Path, Display_Path)); -- If it is a source specified in a list, update the entry in -- the Source_Names table. @@ -6930,11 +6929,20 @@ package body Prj.Nmsc is end if; end if; + -- Preserve the user's original casing and use of + -- links. The display_value (a directory) already + -- ends with a directory separator by construction, + -- so no need to add one. + + Get_Name_String (Element.Display_Value); + Get_Name_String_And_Append (Display_File_Name); + Check_File (Project => Project, Source_Dir_Rank => Num_Nod.Number, Data => Data, Path => Path, + Display_Path => Name_Find, File_Name => File_Name, Locally_Removed => To_Remove, Display_File_Name => Display_File_Name, diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index c84996e3ba7..362d1d8cead 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1999-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -403,7 +403,6 @@ package body Repinfo is if List_Representation_Info >= 2 then List_Object_Info (E); end if; - end if; -- Recurse into nested package, but not if they are package diff --git a/gcc/ada/sem_elim.adb b/gcc/ada/sem_elim.adb index b7d9348b418..bb42159b99e 100644 --- a/gcc/ada/sem_elim.adb +++ b/gcc/ada/sem_elim.adb @@ -299,7 +299,7 @@ package body Sem_Elim is -- parsed as a child unit, but the current compilation unit is in -- fact the parent in which the subunit is embedded. We must skip -- the first name which is that of the subunit to match the pragma - -- specification. + -- specification. Body may be that of a package or subprogram. declare Par : Node_Id; @@ -308,7 +308,7 @@ package body Sem_Elim is Par := Parent (E); while Present (Par) loop if Nkind (Par) = N_Subunit then - if Chars (Defining_Unit_Name (Proper_Body (Par))) = + if Chars (Defining_Entity (Proper_Body (Par))) = Elmt.Unit_Name (Up) then Up := Up - 1; diff --git a/gcc/ada/sprint.adb b/gcc/ada/sprint.adb index bc1f35dea2a..b5e240c97ff 100644 --- a/gcc/ada/sprint.adb +++ b/gcc/ada/sprint.adb @@ -1537,7 +1537,7 @@ package body Sprint is when N_Expression_With_Actions => Indent_Begin; - Write_Indent_Str_Sloc ("do"); + Write_Indent_Str_Sloc ("do "); Indent_Begin; Sprint_Node_List (Actions (Node)); Indent_End;