[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Jun 2009 09:08:00 +0000 (11:08 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 24 Jun 2009 09:08:00 +0000 (11:08 +0200)
2009-06-24  Eric Botcazou  <ebotcazou@adacore.com>

* ttypes.ads: Minor editing.

2009-06-24  Robert Dewar  <dewar@adacore.com>

* exp_ch6.adb (Expand_Actuals): Use Is_Volatile, not Treat_As_Volatile
in deciding to do call-by-copy code.

2009-06-24  Vincent Celier  <celier@adacore.com>

* make.adb (Gnatmake): To decide if an executable should be rebuilt,
check if an externally built library file is more current than the
executable.

From-SVN: r148897

gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/make.adb
gcc/ada/ttypes.ads

index 60bcdae..4f9fb6d 100644 (file)
@@ -1,3 +1,18 @@
+2009-06-24  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * ttypes.ads: Minor editing.
+       
+2009-06-24  Robert Dewar  <dewar@adacore.com>
+
+       * exp_ch6.adb (Expand_Actuals): Use Is_Volatile, not Treat_As_Volatile
+       in deciding to do call-by-copy code.
+
+2009-06-24  Vincent Celier  <celier@adacore.com>
+
+       * make.adb (Gnatmake): To decide if an executable should be rebuilt,
+       check if an externally built library file is more current than the
+       executable.
+
 2009-06-23  Olivier Hainque  <hainque@adacore.com>
 
        * gcc-interface/utils.c (handle_vector_size_attribute): Import from
index 1da82ba..c394730 100644 (file)
@@ -1572,11 +1572,16 @@ package body Exp_Ch6 is
             --  treatment, whereas the formal is not volatile, then pass
             --  by copy unless it is a by-reference type.
 
+            --  Note: we use Is_Volatile here rather than Treat_As_Volatile,
+            --  because this is the enforcement of a language rule that applies
+            --  only to "real" volatile variables, not e.g. to the address
+            --  clause overlay case.
+
             elsif Is_Entity_Name (Actual)
-              and then Treat_As_Volatile (Entity (Actual))
+              and then Is_Volatile (Entity (Actual))
               and then not Is_By_Reference_Type (Etype (Actual))
               and then not Is_Scalar_Type (Etype (Entity (Actual)))
-              and then not Treat_As_Volatile (E_Formal)
+              and then not Is_Volatile (E_Formal)
             then
                Add_Call_By_Copy_Code;
 
@@ -1604,8 +1609,8 @@ package body Exp_Ch6 is
                Reset_Packed_Prefix;
                Expand_Packed_Element_Reference (Actual);
 
-            --  If we have a reference to a bit packed array, we copy it,
-            --  since the actual must be byte aligned.
+            --  If we have a reference to a bit packed array, we copy it, since
+            --  the actual must be byte aligned.
 
             --  Is this really necessary in all cases???
 
index 955e618..27489cd 100644 (file)
@@ -5881,6 +5881,36 @@ package body Make is
                      Executable_Obsolete := Youngest_Obj_File /= No_File;
                   end if;
 
+                  --  Check if any library file is more recent than the
+                  --  executable: there may be an externally built library
+                  --  file that has been modified.
+
+                  if (not Executable_Obsolete)
+                     and then Main_Project /= No_Project
+                  then
+                     declare
+                        Proj1 : Project_List;
+                     begin
+                        Proj1 := Project_Tree.Projects;
+                        while Proj1 /= null loop
+                           if Proj1.Project.Library and then
+                              Proj1.Project.Library_TS > Executable_Stamp
+                           then
+                              Executable_Obsolete := True;
+                              Youngest_Obj_Stamp := Proj1.Project.Library_TS;
+                              Name_Len := 0;
+                              Add_Str_To_Name_Buffer ("library ");
+                              Add_Str_To_Name_Buffer
+                                (Get_Name_String (Proj1.Project.Library_Name));
+                              Youngest_Obj_File := Name_Find;
+                              exit;
+                           end if;
+
+                           Proj1 := Proj1.Next;
+                        end loop;
+                     end;
+                  end if;
+
                   --  Return if the executable is up to date and otherwise
                   --  motivate the relink/rebind.
 
index 01b86e3..8b7749a 100644 (file)
@@ -206,7 +206,7 @@ package Ttypes is
    --  True if instructions will fail if data is misaligned
 
    Target_Double_Float_Alignment : Nat := Get_Double_Float_Alignment;
-   --  The default alignment of "double" floating-point types, i.e. floating-
+   --  The default alignment of "double" floating-point types, i.e. floating
    --  point types whose size is equal to 64 bits, or 0 if this alignment is
    --  not specifically capped.