[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jun 2010 10:19:44 +0000 (12:19 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 18 Jun 2010 10:19:44 +0000 (12:19 +0200)
2010-06-18  Geert Bosch  <bosch@adacore.com>

* i-forbla-darwin.adb: Include -lgnala and -lm in linker options for
Darwin.

2010-06-18  Robert Dewar  <dewar@adacore.com>

* gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions
true for gcc.

2010-06-18  Robert Dewar  <dewar@adacore.com>

* sprint.adb: Minor format change for N_Expression_With_Actions.
* repinfo.adb: Minor reformatting.

2010-06-18  Ed Schonberg  <schonberg@adacore.com>

* 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  <briot@adacore.com>

* prj-nmsc.adb (Check_File): New parameter Display_Path.

From-SVN: r160976

gcc/ada/ChangeLog
gcc/ada/gnat1drv.adb
gcc/ada/i-forbla-darwin.adb
gcc/ada/prj-nmsc.adb
gcc/ada/repinfo.adb
gcc/ada/sem_elim.adb
gcc/ada/sprint.adb

index bb99ab4da7c7eb260656fe51c00f83a0593e4fd2..5615848e10f945d7a4fde7d66773b3ec64c3b42a 100644 (file)
@@ -1,3 +1,28 @@
+2010-06-18  Geert Bosch  <bosch@adacore.com>
+
+       * i-forbla-darwin.adb: Include -lgnala and -lm in linker options for
+       Darwin.
+
+2010-06-18  Robert Dewar  <dewar@adacore.com>
+
+       * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions
+       true for gcc.
+
+2010-06-18  Robert Dewar  <dewar@adacore.com>
+
+       * sprint.adb: Minor format change for N_Expression_With_Actions.
+       * repinfo.adb: Minor reformatting.
+
+2010-06-18  Ed Schonberg  <schonberg@adacore.com>
+
+       * 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  <briot@adacore.com>
+
+       * prj-nmsc.adb (Check_File): New parameter Display_Path.
+
 2010-06-18  Thomas Quinot  <quinot@adacore.com>
 
        * g-socket.adb, g-socket.ads (Null_Selector): New object.
index a69f732a54a49d482eb3551c18509f73385e61d0..2c95dd649613009ed4a52ee992e3654a5fe66a82 100644 (file)
@@ -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
index 2a2134ecba4c414528d62c9607471e37918bc234..825a8840414cf3cfe3f10ea83e7fa7220abe5120 100644 (file)
@@ -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;
index a3f64d0654bf0f6a2a5a940bbcf4a846123be8d3..0e8c041b9b95932f436116f2bd172992ac689ed5 100644 (file)
@@ -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,
index c84996e3ba7c7dd68bf54c379b52eacb9ac667b7..362d1d8cead9c61b5fed087e352b0a915ac69acd 100644 (file)
@@ -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
index b7d9348b418e5f52ef7c428ef0b9ed25c49a36a0..bb42159b99ea672a036363783385abc651bf8aa1 100644 (file)
@@ -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;
index bc1f35dea2a4e79851527f46eb3743f1165477f7..b5e240c97ff5836823090c94ef4b26caa72020de 100644 (file)
@@ -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;