From 536a2daf12f6a3c969f2b0df3a18ed9a985b817d Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 4 Aug 2014 12:45:30 +0200 Subject: [PATCH] [multiple changes] 2014-08-04 Robert Dewar * sem_util.adb, sem_case.adb: Minor reformatting. 2014-08-04 Ed Schonberg * 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 * 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 | 17 +++++++++++++++++ gcc/ada/exp_ch6.adb | 12 ++++++++++++ gcc/ada/exp_ch9.adb | 8 ++++++++ gcc/ada/sem_case.adb | 6 +++++- gcc/ada/sem_util.adb | 22 +++++++++++----------- 5 files changed, 53 insertions(+), 12 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d02d068c0e3..0d70e1b3183 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,20 @@ +2014-08-04 Robert Dewar + + * sem_util.adb, sem_case.adb: Minor reformatting. + +2014-08-04 Ed Schonberg + + * 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 + + * 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 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index f0b27b4d8fc..7f111901b05 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -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). diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 4807ec26ab8..32b3679c7db 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -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; ------------------- diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb index b14f047c294..005bd95db0a 100644 --- a/gcc/ada/sem_case.adb +++ b/gcc/ada/sem_case.adb @@ -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; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 607617ce9cf..dd6206dc265 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -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) -- 2.30.2