From: Pierre-Marie de Rodat Date: Mon, 18 Sep 2017 08:45:33 +0000 (+0000) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d7cc5f0ebf32bdcef1a30833a00ff2dd92f00a1c;p=gcc.git [multiple changes] 2017-09-18 Hristian Kirtchev * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting. 2017-09-18 Piotr Trojanek * einfo.ads (Is_Imported): Update comment, as this routine also applies to constants. 2017-09-18 Yannick Moy * sem_util.adb (Find_Placement_In_State_Space): Allow generic package holding state. 2017-09-18 Justin Squirek * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the constant indication for Pragma_Linker_Section. From-SVN: r252910 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 30031f80afa..a34f2f22408 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,22 @@ +2017-09-18 Hristian Kirtchev + + * freeze.adb, sem_ch6.adb, sem_res.adb: Minor reformatting. + +2017-09-18 Piotr Trojanek + + * einfo.ads (Is_Imported): Update comment, as this + routine also applies to constants. + +2017-09-18 Yannick Moy + + * sem_util.adb (Find_Placement_In_State_Space): Allow generic package + holding state. + +2017-09-18 Justin Squirek + + * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Change the + constant indication for Pragma_Linker_Section. + 2017-09-18 Bob Duff Alternate fix for PR ada/71358 diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index fa349cd270d..22a8b737fec 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -2684,9 +2684,9 @@ package Einfo is -- Is_Imported (Flag24) -- Defined in all entities. Set if the entity is imported. For now we --- only allow the import of exceptions, functions, procedures, packages. --- and variables. Exceptions, packages and types can only be imported in --- the Java VM implementation, which is retired. +-- only allow the import of exceptions, functions, procedures, packages, +-- constants, and variables. Exceptions, packages, and types can only be +-- imported in the Java VM implementation, which is retired. -- Is_Incomplete_Or_Private_Type (synthesized) -- Applies to all entities, true for private and incomplete types diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index cff742a83b3..794fdf3d095 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -8237,6 +8237,7 @@ package body Freeze is if No (Extra_Formals (E)) then Create_Extra_Formals (E); end if; + Set_Mechanisms (E); -- If this is convention Ada and a Valued_Procedure, that's odd diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index ffcc357bfed..5ca3584cf3f 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -751,8 +751,8 @@ package body Sem_Ch6 is and then Is_Tagged_Type (Etype (Def_Id)) then Check_Dynamically_Tagged_Expression - (Expr => Expr, - Typ => Etype (Def_Id), + (Expr => Expr, + Typ => Etype (Def_Id), Related_Nod => Original_Node (N)); end if; @@ -3233,8 +3233,8 @@ package body Sem_Ch6 is -------------------- function Mask_Type_Refs (Node : Node_Id) return Traverse_Result is - procedure Mask_Type (Typ : Entity_Id); + -- ??? what does this do? --------------- -- Mask_Type -- @@ -3256,6 +3256,8 @@ package body Sem_Ch6 is end if; end Mask_Type; + -- Start of processing for Mask_Type_Refs + begin if Is_Entity_Name (Node) and then Present (Entity (Node)) then Mask_Type (Etype (Entity (Node))); @@ -3275,8 +3277,13 @@ package body Sem_Ch6 is procedure Mask_References is new Traverse_Proc (Mask_Type_Refs); + -- Local variables + Return_Stmt : constant Node_Id := First (Statements (Handled_Statement_Sequence (N))); + + -- Start of processing for Mask_Unfrozen_Types + begin pragma Assert (Nkind (Return_Stmt) = N_Simple_Return_Statement); @@ -3710,9 +3717,9 @@ package body Sem_Ch6 is if not Is_Frozen (Spec_Id) and then (Expander_Active - or else ASIS_Mode - or else (Operating_Mode = Check_Semantics - and then Serious_Errors_Detected = 0)) + or else ASIS_Mode + or else (Operating_Mode = Check_Semantics + and then Serious_Errors_Detected = 0)) then -- The body generated for an expression function that is not a -- completion is a freeze point neither for the profile nor for diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b1723f16645..69338d4d29b 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -29548,7 +29548,7 @@ package body Sem_Prag is Pragma_Linker_Constructor => -1, Pragma_Linker_Destructor => -1, Pragma_Linker_Options => -1, - Pragma_Linker_Section => 0, + Pragma_Linker_Section => -1, Pragma_List => 0, Pragma_Lock_Free => 0, Pragma_Locking_Policy => 0, diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index af1a4e7b32e..6e839580fa3 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -11467,8 +11467,8 @@ package body Sem_Res is S : constant Entity_Id := Current_Scope_No_Loops; begin if Ekind (S) = E_Function - and then Nkind (Original_Node (Unit_Declaration_Node (S))) - = N_Expression_Function + and then Nkind (Original_Node (Unit_Declaration_Node (S))) = + N_Expression_Function then return; end if; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 6dc3591b973..69819ed3340 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7922,7 +7922,7 @@ package body Sem_Util is Context := Scope (Item_Id); while Present (Context) and then Context /= Standard_Standard loop - if Ekind (Context) = E_Package then + if Is_Package_Or_Generic_Package (Context) then Pack_Id := Context; -- A package body is a cut off point for the traversal as the item