[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Aug 2014 10:45:30 +0000 (12:45 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 4 Aug 2014 10:45:30 +0000 (12:45 +0200)
2014-08-04  Robert Dewar  <dewar@adacore.com>

* sem_util.adb, sem_case.adb: Minor reformatting.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

* exp_ch9.adb (Extract_Entry): If the synchronized object is a
limited view, replace with non-limited view, which is available
at the point of an entry call.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

* exp_ch6.adb (Expand_Call): If the call is to a function in
a run-time unit that is marked Inline_Always, we must suppress
debugging information on it, so that the code that is eventually
inlined will not affect debugging of the user program.

From-SVN: r213567

gcc/ada/ChangeLog
gcc/ada/exp_ch6.adb
gcc/ada/exp_ch9.adb
gcc/ada/sem_case.adb
gcc/ada/sem_util.adb

index d02d068c0e3d0b3c14de701cb24d3fe87e5bc63a..0d70e1b3183fc5f6cb25988267e80d16a14e686c 100644 (file)
@@ -1,3 +1,20 @@
+2014-08-04  Robert Dewar  <dewar@adacore.com>
+
+       * sem_util.adb, sem_case.adb: Minor reformatting.
+
+2014-08-04  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch9.adb (Extract_Entry): If the synchronized object is a
+       limited view, replace with non-limited view, which is available
+       at the point of an entry call.
+
+2014-08-04  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_ch6.adb (Expand_Call): If the call is to a function in
+       a run-time unit that is marked Inline_Always, we must suppress
+       debugging information on it, so that the code that is eventually
+       inlined will not affect debugging of the user program.
+
 2014-08-04  Robert Dewar  <dewar@adacore.com>
 
        * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
index f0b27b4d8fc5aebf9a6fda3d8093491df96e2b21..7f111901b0516be0c278b6eccd2f64b7ce26e88f 100644 (file)
@@ -3929,6 +3929,18 @@ package body Exp_Ch6 is
             Add_Inlined_Body (Subp);
             Register_Backend_Call (Call_Node);
 
+            --  If the call is to a function in a run-time unit that is marked
+            --  Inline_Always, we must suppress debugging information on it,
+            --  so that the code that is eventually inlined will not affect
+            --  debugging of the user program.
+
+            if Is_Predefined_File_Name
+                 (Unit_File_Name (Get_Source_Unit (Sloc (Subp))))
+              and then In_Extended_Main_Source_Unit (N)
+            then
+               Set_Needs_Debug_Info (Subp, False);
+            end if;
+
          --  Frontend expansion of supported functions returning unconstrained
          --  types and simple renamings inlined by the frontend (see Freeze.
          --  Build_Renamed_Entity).
index 4807ec26ab810dae716768c0ea55d133367c6b9c..32b3679c7db0e03ab8a23ff5c032578787a41f98 100644 (file)
@@ -12819,6 +12819,14 @@ package body Exp_Ch9 is
          Ename   := Selector_Name (Prefix (Nam));
          Index   := First (Expressions (Nam));
       end if;
+
+      --  Through indirection, the type may actually be a limited view of a
+      --  concurrent type. When compiling a call, the non-limited view of the
+      --  type is visible.
+
+      if From_Limited_With (Etype (Concval)) then
+         Set_Etype (Concval, Non_Limited_View (Etype (Concval)));
+      end if;
    end Extract_Entry;
 
    -------------------
index b14f047c2946d6cf3149a3bc1f2c34e506e471fe..005bd95db0aababb3d084bd3cc89d6e24b662ce0 100644 (file)
@@ -113,7 +113,6 @@ package body Sem_Case is
       Subtyp         : Entity_Id;
       Others_Present : Boolean;
       Case_Node      : Node_Id)
-
    is
       Predicate_Error : Boolean;
       --  Flag to prevent cascaded errors when a static predicate is known to
@@ -616,6 +615,10 @@ package body Sem_Case is
          Missing_Choice (Value1, Expr_Value (Value2));
       end Missing_Choice;
 
+      --------------------
+      -- Missing_Choice --
+      --------------------
+
       procedure Missing_Choice (Value1 : Uint; Value2 : Uint) is
          Msg_Sloc : constant Source_Ptr := Sloc (Case_Node);
 
@@ -781,6 +784,7 @@ package body Sem_Case is
 
             if Error then
                Predicate_Error := True;
+
                if not All_Errors_Mode then
                   return;
                end if;
index 607617ce9cf8490d217baa8fde0e9d17a34911eb..dd6206dc265b4a09e6f9e966ec2e4e78077f8f01 100644 (file)
@@ -73,15 +73,15 @@ package body Sem_Util is
    -- Global_Variables for New_Copy_Tree --
    ----------------------------------------
 
-   --  These global variables are used by New_Copy_Tree. See description
-   --  of the body of this subprogram for details. Global variables can be
-   --  safely used by New_Copy_Tree, since there is no case of a recursive
-   --  call from the processing inside New_Copy_Tree.
+   --  These global variables are used by New_Copy_Tree. See description of the
+   --  body of this subprogram for details. Global variables can be safely used
+   --  by New_Copy_Tree, since there is no case of a recursive call from the
+   --  processing inside New_Copy_Tree.
 
    NCT_Hash_Threshold : constant := 20;
-   --  If there are more than this number of pairs of entries in the
-   --  map, then Hash_Tables_Used will be set, and the hash tables will
-   --  be initialized and used for the searches.
+   --  If there are more than this number of pairs of entries in the map, then
+   --  Hash_Tables_Used will be set, and the hash tables will be initialized
+   --  and used for the searches.
 
    NCT_Hash_Tables_Used : Boolean := False;
    --  Set to True if hash tables are in use
@@ -90,10 +90,10 @@ package body Sem_Util is
    --  Count entries in table to see if threshold is reached
 
    NCT_Hash_Table_Setup : Boolean := False;
-   --  Set to True if hash table contains data. We set this True if we
-   --  setup the hash table with data, and leave it set permanently
-   --  from then on, this is a signal that second and subsequent users
-   --  of the hash table must clear the old entries before reuse.
+   --  Set to True if hash table contains data. We set this True if we setup
+   --  the hash table with data, and leave it set permanently from then on,
+   --  this is a signal that second and subsequent users of the hash table
+   --  must clear the old entries before reuse.
 
    subtype NCT_Header_Num is Int range 0 .. 511;
    --  Defines range of headers in hash tables (512 headers)