From 6b1d24137789242dd580e98830689a28fc289e8a Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 19 Jan 2017 14:10:09 +0100 Subject: [PATCH] [multiple changes] 2017-01-19 Pierre-Marie de Rodat * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types. Emit GNAT encodings for object renamings involving record components whose normalized bit offset is not null. * uintp.h (UI_No_Uint): Declare. 2017-01-19 Ed Schonberg * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the statements within an element iterator loop are only analyzed agter the loop is rewritten. Within a generic the analysis must be performed in any case to complete name capture. 2017-01-19 Bob Duff * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first, before checking for unrecognized pragmas. Initialize Pname on its declarations; that's always good style. From-SVN: r244630 --- gcc/ada/ChangeLog | 20 ++++++++++++++++++++ gcc/ada/sem_ch5.adb | 5 ++++- gcc/ada/sem_prag.adb | 16 +++++++--------- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9743e60bf2c..8287640adb5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2017-01-19 Pierre-Marie de Rodat + + * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types. + Emit GNAT encodings for object renamings involving record components + whose normalized bit offset is not null. + * uintp.h (UI_No_Uint): Declare. + +2017-01-19 Ed Schonberg + + * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the + statements within an element iterator loop are only analyzed + agter the loop is rewritten. Within a generic the analysis must + be performed in any case to complete name capture. + +2017-01-19 Bob Duff + + * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first, + before checking for unrecognized pragmas. + Initialize Pname on its declarations; that's always good style. + 2017-01-19 Claire Dross * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 1a47be5a4cd..0a72320ecbb 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -3411,13 +3411,16 @@ package body Sem_Ch5 is -- expanded). -- In other cases in GNATprove mode then we want to analyze the loop - -- body now, since no rewriting will occur. + -- body now, since no rewriting will occur. Within a generic the + -- GNATprove mode is irrelevant, we must analyze the generic for + -- non-local name capture. if Present (Iter) and then Present (Iterator_Specification (Iter)) then if GNATprove_Mode and then Is_Iterator_Over_Array (Iterator_Specification (Iter)) + and then not Inside_A_Generic then null; diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 87228eb888b..9d2490fb937 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -3416,7 +3416,7 @@ package body Sem_Prag is Loc : constant Source_Ptr := Sloc (N); Prag_Id : Pragma_Id; - Pname : Name_Id; + Pname : Name_Id := Pragma_Name (N); -- Name of the source pragma, or name of the corresponding aspect for -- pragmas which originate in a source aspect. In the latter case, the -- name may be different from the pragma name. @@ -10354,9 +10354,13 @@ package body Sem_Prag is Check_Restriction_No_Use_Of_Pragma (N); - -- Deal with unrecognized pragma + -- Ignore pragma if Ignore_Pragma applies - Pname := Pragma_Name (N); + if Get_Name_Table_Boolean3 (Pname) then + return; + end if; + + -- Deal with unrecognized pragma if not Is_Pragma_Name (Pname) then if Warn_On_Unrecognized_Pragma then @@ -10376,12 +10380,6 @@ package body Sem_Prag is return; end if; - -- Ignore pragma if Ignore_Pragma applies - - if Get_Name_Table_Boolean3 (Pname) then - return; - end if; - -- Here to start processing for recognized pragma Prag_Id := Get_Pragma_Id (Pname); -- 2.30.2