[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 5 Dec 2012 11:25:23 +0000 (12:25 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 5 Dec 2012 11:25:23 +0000 (12:25 +0100)
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.

From-SVN: r194217

gcc/ada/ChangeLog
gcc/ada/get_scos.adb
gcc/ada/par_sco.adb
gcc/ada/put_scos.adb
gcc/ada/sem_ch3.adb
gcc/ada/sem_prag.adb

index 70410fb5b6436e19d84d325c7d96d0524a0e2c4b..2898d2cb4113f6c11eb0de20b91da66c228f3a09 100644 (file)
@@ -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.
index 0020bea086809033bd3181d5d2eef9acac681ed4..170f5b5623bfb6d983d8fabc73df907b419913c9 100644 (file)
@@ -398,6 +398,7 @@ begin
                   Name_Len := Name_Len + 1;
                   Name_Buffer (Name_Len) := Getc;
                end loop;
+
                Nam := Name_Find;
 
             else
index 1149a2ec37b485b322e111cf5da2db1c0aa39d39..c2c522cb52094702a2bb5aee98a5911ac23a50b6 100644 (file)
@@ -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;
 
index e9b03fc8294ff5ecb367d6e6a9f54bf9305186fa..de44c45d008c77469a780ff50519c11beeb4d0ca 100644 (file)
@@ -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 (' ');
index ea4e4e93ce4020b3167bc8ca2a2704104fe8661b..5745746ce00d312a6ce4d4254f06198360b99a18 100644 (file)
@@ -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);
 
index 36251b8bad163ddc42863be8aba7dd2277b54d00..b44df5ad1502869a42410e549896d957e76995fd 100644 (file)
@@ -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;