]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 12 Dec 2011 13:43:38 +0000 (14:43 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 12 Dec 2011 13:43:38 +0000 (14:43 +0100)
2011-12-12  Robert Dewar  <dewar@adacore.com>

* sem_ch6.adb, gnatls.adb: Minor reformatting.

2011-12-12  Ed Schonberg  <schonberg@adacore.com>

* freeze.adb (Freeze_Entity): If a type declared in a generic
context has predicates, generate a freeze node for it.
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
has not been analyzed yet, entity has not been frozen, so analyze
it now.

2011-12-12  Javier Miranda  <miranda@adacore.com>

* exp_disp.adb (Make_VM_TSD): Generate code
to store the value 'alignment in the TSD.

2011-12-12  Bob Duff  <duff@adacore.com>

* s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
mode.

From-SVN: r182240

gcc/ada/ChangeLog
gcc/ada/exp_disp.adb
gcc/ada/freeze.adb
gcc/ada/gnatls.adb
gcc/ada/s-taprop-mingw.adb
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch6.adb

index a3679ddbbdc773501af107cc7bdfe2f36c7eca3b..430170d59d2ea47d698b6c9122df5be102d8685a 100644 (file)
@@ -1,3 +1,25 @@
+2011-12-12  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch6.adb, gnatls.adb: Minor reformatting.
+
+2011-12-12  Ed Schonberg  <schonberg@adacore.com>
+
+       * freeze.adb (Freeze_Entity): If a type declared in a generic
+       context has predicates, generate a freeze node for it.
+       * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): If expression
+       has not been analyzed yet, entity has not been frozen, so analyze
+       it now.
+
+2011-12-12  Javier Miranda  <miranda@adacore.com>
+
+       * exp_disp.adb (Make_VM_TSD): Generate code
+       to store the value 'alignment in the TSD.
+
+2011-12-12  Bob Duff  <duff@adacore.com>
+
+       * s-taprop-mingw.adb (Yield): Do not delay 1 millisecond in Annex D
+       mode.
+
 2011-12-12  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * exp_ch4.adb (Expand_N_Allocator): Update the master of an
index bd6724fdb54b0bd33b96f536cc6c7f49ee1414b9..a1bd6a425ea0269dbf19946fd760eb4b68c0b0e1 100644 (file)
@@ -6458,6 +6458,7 @@ package body Exp_Disp is
       --           (Idepth                => I_Depth,
       --            Tag_Kind              => <tag_kind-value>,
       --            Access_Level          => Type_Access_Level (Typ),
+      --            Alignment             => Typ'Alignment,
       --            HT_Link               => null,
       --            Type_Is_Abstract      => <<boolean-value>>,
       --            Type_Is_Library_Level => <<boolean-value>>,
@@ -6508,6 +6509,13 @@ package body Exp_Disp is
       Append_To (TSD_Aggr_List,
         Make_Integer_Literal (Loc, Type_Access_Level (Typ)));
 
+      --  Alignment
+
+      Append_To (TSD_Aggr_List,
+        Make_Attribute_Reference (Loc,
+          Prefix => New_Reference_To (Typ, Loc),
+          Attribute_Name => Name_Alignment));
+
       --  HT_Link
 
       Append_To (TSD_Aggr_List,
index 336825ea91eb6e578554baf0758acee6b3df9163..46d3c64fd9040b87c07fe2b4ff1aeede43a69a88 100644 (file)
@@ -3040,8 +3040,13 @@ package body Freeze is
          --  nable and used in subsequent checks, so might as well try to
          --  compute it.
 
+         --  In Ada2012, freeze entities is also used in the front-end to
+         --  trigger the analysis of aspect expressions, so in this case we
+         --  want to continue the freezing process.
+
          if Present (Scope (E))
            and then Is_Generic_Unit (Scope (E))
+           and then not Has_Predicates (E)
          then
             Check_Compile_Time_Size (E);
             return No_List;
index 91b84a173009c57b9b49098f8afb50c41c9881b5..a7c276d58b36770fc4a81726290fda992e49dc28 100644 (file)
@@ -1232,6 +1232,7 @@ procedure Gnatls is
             --  Add the lib subdirectory if it exists
 
             Lib_Path := Get_RTS_Search_Dir (Name, Objects);
+
             if Lib_Path /= null then
                Add_Search_Dirs (Lib_Path, Objects);
             end if;
index 7fc505e30bc69ed9b296f5f0162367cbbf409bb8..5ced0315e7bd51b6e649355c38aee29daca1c543 100644 (file)
@@ -126,9 +126,6 @@ package body System.Task_Primitives.Operations is
    Foreign_Task_Elaborated : aliased Boolean := True;
    --  Used to identified fake tasks (i.e., non-Ada Threads)
 
-   Annex_D : Boolean := False;
-   --  Set to True if running with Annex-D semantics
-
    Null_Thread_Id : constant Thread_Id := 0;
    --  Constant to indicate that the thread identifier has not yet been
    --  initialized.
@@ -700,20 +697,9 @@ package body System.Task_Primitives.Operations is
    -----------
 
    procedure Yield (Do_Yield : Boolean := True) is
+      pragma Unreferenced (Do_Yield);
    begin
-      if Do_Yield then
-         SwitchToThread;
-
-      elsif Annex_D then
-         --  If running with Annex-D semantics we need a delay
-         --  above 0 milliseconds here otherwise processes give
-         --  enough time to the other tasks to have a chance to
-         --  run.
-         --
-         --  This makes cxd8002 ACATS pass on Windows.
-
-         Sleep (1);
-      end if;
+      SwitchToThread;
    end Yield;
 
    ------------------
@@ -1076,8 +1062,6 @@ package body System.Task_Primitives.Operations is
 
          Discard := OS_Interface.SetPriorityClass
                       (GetCurrentProcess, Realtime_Priority_Class);
-
-         Annex_D := True;
       end if;
 
       TlsIndex := TlsAlloc;
index d06ba9388acb0d4dfc280d9cb42849757c41e6e1..309d2d2ac1bc3396cf4befe2b2a35b6394c6b5b9 100644 (file)
@@ -5880,11 +5880,11 @@ package body Sem_Ch13 is
       --  All other cases
 
       else
-         --  In a generic context freeze nodes are not generated, and the
-         --  aspect expressions have not been preanalyzed, so do it now.
+         --  In a generic context the aspect expressions have not been
+         --  preanalyzed, so do it now.
          --  There are no conformance checks to perform in this case.
 
-         if No (T) and then Inside_A_Generic then
+         if No (T) then
             Check_Aspect_At_Freeze_Point (ASN);
             return;
          else
index 64b909263292dfbfc323b61302facf9f7f37dc90..92c5eed8de1a864a7c38a25d3bb7b6c6d48d33e6 100644 (file)
@@ -367,8 +367,8 @@ package body Sem_Ch6 is
          --  on later entities.
 
          declare
-            Decls : List_Id          := List_Containing (N);
-            Par   : constant Node_Id := Parent (Decls);
+            Decls : List_Id            := List_Containing (N);
+            Par   : constant Node_Id   := Parent (Decls);
             Id    : constant Entity_Id := Defining_Entity (New_Decl);
 
          begin
@@ -385,7 +385,6 @@ package body Sem_Ch6 is
             Install_Formals (Id);
             Preanalyze_Spec_Expression (Expression  (Ret), Etype (Id));
             End_Scope;
-
          end;
       end if;