diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:25:23 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-05 11:25:23 +0000 |
commit | 5c5828008385212c6abbc8df65fbc19bb0fd6f64 (patch) | |
tree | 71a0f2e712ade39645c4471f3bed3ad2442bec05 /gcc | |
parent | b553173bb52f91fc4759e77e401659b778d60c45 (diff) | |
download | gcc-5c5828008385212c6abbc8df65fbc19bb0fd6f64.tar.gz |
2012-12-05 Robert Dewar <dewar@adacore.com>
* par_sco.adb, sem_prag.adb, put_scos.adb, get_scos.adb: Minor
reformatting.
2012-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb: Code clean up.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194217 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/ada/get_scos.adb | 1 | ||||
-rw-r--r-- | gcc/ada/par_sco.adb | 1 | ||||
-rw-r--r-- | gcc/ada/put_scos.adb | 9 | ||||
-rw-r--r-- | gcc/ada/sem_ch3.adb | 28 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 5 |
6 files changed, 40 insertions, 13 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 70410fb5b64..2898d2cb411 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,12 @@ +2012-12-05 Robert Dewar <dewar@adacore.com> + + * par_sco.adb, sem_prag.adb, put_scos.adb, get_scos.adb: Minor + reformatting. + +2012-12-05 Ed Schonberg <schonberg@adacore.com> + + * sem_ch3.adb: Code clean up. + 2012-12-05 Arnaud Charlet <charlet@adacore.com> * gcc-interface/Make-lang.in: Update dependencies. diff --git a/gcc/ada/get_scos.adb b/gcc/ada/get_scos.adb index 0020bea0868..170f5b5623b 100644 --- a/gcc/ada/get_scos.adb +++ b/gcc/ada/get_scos.adb @@ -398,6 +398,7 @@ begin Name_Len := Name_Len + 1; Name_Buffer (Name_Len) := Getc; end loop; + Nam := Name_Find; else diff --git a/gcc/ada/par_sco.adb b/gcc/ada/par_sco.adb index 1149a2ec37b..c2c522cb520 100644 --- a/gcc/ada/par_sco.adb +++ b/gcc/ada/par_sco.adb @@ -829,6 +829,7 @@ package body Par_SCO is SCO_Index := SCO_Index + 1; end loop; end if; + SCO_Index := SCO_Index + 1; end loop; diff --git a/gcc/ada/put_scos.adb b/gcc/ada/put_scos.adb index e9b03fc8294..de44c45d008 100644 --- a/gcc/ada/put_scos.adb +++ b/gcc/ada/put_scos.adb @@ -23,9 +23,9 @@ -- -- ------------------------------------------------------------------------------ -with Namet; use Namet; -with Opt; use Opt; -with SCOs; use SCOs; +with Namet; use Namet; +with Opt; use Opt; +with SCOs; use SCOs; procedure Put_SCOs is Current_SCO_Unit : SCO_Unit_Index := 0; @@ -250,8 +250,7 @@ begin loop declare - T : SCO_Table_Entry - renames SCO_Table.Table (Start); + T : SCO_Table_Entry renames SCO_Table.Table (Start); begin Write_Info_Char (' '); diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index ea4e4e93ce4..5745746ce00 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -1192,7 +1192,8 @@ package body Sem_Ch3 is -- In ASIS mode, the access_to_subprogram may be analyzed twice, -- when it is part of an unconstrained type and subtype expansion -- is disabled. To avoid back-end problems with shared profiles, - -- use previous subprogram type as the designated type. + -- use previous subprogram type as the designated type, and then + -- remove scope added above. if ASIS_Mode and then Present (Scope (Defining_Identifier (F))) @@ -1201,6 +1202,7 @@ package body Sem_Ch3 is Init_Size_Align (T_Name); Set_Directly_Designated_Type (T_Name, Scope (Defining_Identifier (F))); + End_Scope; return; end if; @@ -4993,10 +4995,20 @@ package body Sem_Ch3 is Scope_Stack.Table (Scope_Stack.Last); Anon : constant Entity_Id := Make_Temporary (Loc, 'S'); - Acc : Node_Id; + + Acc : Node_Id; + -- Access definition in declaration + Comp : Node_Id; + -- Object definition or formal definition with an access definition + Decl : Node_Id; - P : Node_Id; + -- Declaration of anonymous access to subprogram type + + Spec : Node_Id; + -- Original specification in access to subprogram + + P : Node_Id; begin Set_Is_Internal (Anon); @@ -5032,10 +5044,12 @@ package body Sem_Ch3 is raise Program_Error; end case; - Decl := Make_Full_Type_Declaration (Loc, - Defining_Identifier => Anon, - Type_Definition => - Copy_Separate_Tree (Access_To_Subprogram_Definition (Acc))); + Spec := Access_To_Subprogram_Definition (Acc); + + Decl := + Make_Full_Type_Declaration (Loc, + Defining_Identifier => Anon, + Type_Definition => Relocate_Node (Spec)); Mark_Rewrite_Insertion (Decl); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 36251b8bad1..b44df5ad150 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -1960,7 +1960,7 @@ package body Sem_Prag is if Nkind (Stmt) = N_Block_Statement then if (No (Declarations (Stmt)) - or else List_Containing (Prev) /= Declarations (Stmt)) + or else List_Containing (Prev) /= Declarations (Stmt)) and then List_Containing (Prev) /= Statements (Handled_Statement_Sequence (Stmt)) @@ -7013,6 +7013,9 @@ package body Sem_Prag is -- pragma Assume (boolean_EXPRESSION); + -- This should share pragma Assert code ??? + -- Run-time check is missing completely ??? + when Pragma_Assume => Assume : declare begin GNAT_Pragma; |