]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Tue, 15 Oct 2013 10:29:47 +0000 (12:29 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 15 Oct 2013 10:29:47 +0000 (12:29 +0200)
2013-10-15  Robert Dewar  <dewar@adacore.com>

* sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
Minor reformatting.

2013-10-15  Eric Botcazou  <ebotcazou@adacore.com>

* targparm.ads: Fix minor typo in comment.

2013-10-15  Ed Schonberg  <schonberg@adacore.com>

* lib-xref.adb: handle full views that are derived from private
types.
* sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
mode: the elaboration entity is not in the source, and plays no
role in semantic analysis.  Minor reformatting.

From-SVN: r203594

gcc/ada/ChangeLog
gcc/ada/a-except-2005.adb
gcc/ada/a-except-2005.ads
gcc/ada/exp_ch11.adb
gcc/ada/lib-xref.adb
gcc/ada/sem_prag.adb
gcc/ada/sem_util.adb
gcc/ada/targparm.ads

index ac5cbb6730deb5b9fa04a34bd8f03d35d5e20eb4..babf48562a51dde86882619cb8fc485e2e0f7643 100644 (file)
@@ -1,3 +1,20 @@
+2013-10-15  Robert Dewar  <dewar@adacore.com>
+
+       * sem_prag.adb, exp_ch11.adb, a-except-2005.adb, a-except-2005.ads:
+       Minor reformatting.
+
+2013-10-15  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * targparm.ads: Fix minor typo in comment.
+
+2013-10-15  Ed Schonberg  <schonberg@adacore.com>
+
+       * lib-xref.adb: handle full views that are derived from private
+       types.
+       * sem_util.adb (Build_Elaboration_Entity): Do nothing in ASIS
+       mode: the elaboration entity is not in the source, and plays no
+       role in semantic analysis.  Minor reformatting.
+
 2013-10-15  Tristan Gingold  <gingold@adacore.com>
 
        * adaint.c (__gnat_get_executable_load_address): Remove AIX
index 29ecf391d80b5226f09b3756ca617b4067ec5a1d..b47f167be77ce32b26a290a3b522ad99763d64a1 100644 (file)
@@ -865,8 +865,9 @@ package body Ada.Exceptions is
    -- Get_Exception_Machine_Occurrence --
    --------------------------------------
 
-   function Get_Exception_Machine_Occurrence (X : Exception_Occurrence)
-                                             return System.Address is
+   function Get_Exception_Machine_Occurrence
+     (X : Exception_Occurrence) return System.Address
+   is
    begin
       return X.Machine_Occurrence;
    end Get_Exception_Machine_Occurrence;
index ecc5ca8ad1c8133ea389509ae0b99e547aabfdd7..ca4ff9f9e17efd43256a90b6f12352933299ca12 100644 (file)
@@ -333,10 +333,10 @@ private
    --  this, and it would not work right, because of the Msg and Tracebacks
    --  fields which have unused entries not copied by Save_Occurrence.
 
-   function Get_Exception_Machine_Occurrence (X : Exception_Occurrence)
-                                             return System.Address;
+   function Get_Exception_Machine_Occurrence
+     (X : Exception_Occurrence) return System.Address;
    pragma Export (Ada, Get_Exception_Machine_Occurrence,
-                    "__gnat_get_exception_machine_occurrence");
+                  "__gnat_get_exception_machine_occurrence");
    --  Get the machine occurrence corresponding to an exception occurrence.
    --  It is Null_Address if there is no machine occurrence (in runtimes that
    --  doesn't use GCC mechanism) or if it has been lost (Save_Occurrence
index 90628a05a7956724e1cb2d7a695dc6017c804fb3..8ad30192e8d45b1f7bd0d6ca1219a7231f48225b 100644 (file)
@@ -1030,7 +1030,7 @@ package body Exp_Ch11 is
 
                if Present (Choice_Parameter (Handler))
                  and then (Exception_Mechanism /= Back_End_Exceptions
-                           or else CodePeer_Mode)
+                            or else CodePeer_Mode)
                then
                   declare
                      Cparm : constant Entity_Id  := Choice_Parameter (Handler);
@@ -1039,9 +1039,8 @@ package body Exp_Ch11 is
                      Save  : Node_Id;
 
                   begin
-                     --  Note use of No_Location to hide this code from the
-                     --  debugger, so single stepping doesn't jump back and
-                     --  forth.
+                     --  Note: No_Location used to hide code from the debugger,
+                     --  so single stepping doesn't jump back and forth.
 
                      Save :=
                        Make_Procedure_Call_Statement (No_Location,
@@ -1051,12 +1050,14 @@ package body Exp_Ch11 is
                          Parameter_Associations => New_List (
                            New_Occurrence_Of (Cparm, No_Location),
                            Make_Explicit_Dereference (No_Location,
-                             Make_Function_Call (No_Location,
-                               Name =>
-                                 Make_Explicit_Dereference (No_Location,
-                                   New_Occurrence_Of
-                                     (RTE (RE_Get_Current_Excep),
-                                      No_Location))))));
+                             Prefix =>
+                               Make_Function_Call (No_Location,
+                                 Name =>
+                                   Make_Explicit_Dereference (No_Location,
+                                     Prefix =>
+                                       New_Occurrence_Of
+                                         (RTE (RE_Get_Current_Excep),
+                                          No_Location))))));
 
                      Mark_Rewrite_Insertion (Save);
                      Prepend (Save, Statements (Handler));
index 562b70922187e9ab94c44e855316f4cc5d4247cd..972d9637b7422ab872addfa076ac8657f13d3969 100644 (file)
@@ -1307,9 +1307,23 @@ package body Lib.Xref is
                         Right := '>';
                      end if;
 
-                  --  If non-derived ptr, get directly designated type.
+                  --  If the completion of a private type is itself a derived
+                  --  type, we need the parent of the full view.
+
+                  elsif Is_Private_Type (Tref)
+                    and then Present (Full_View (Tref))
+                    and then Etype (Full_View (Tref)) /= Full_View (Tref)
+                  then
+                     Tref := Etype (Full_View (Tref));
+
+                     if Left /= '(' then
+                        Left := '<';
+                        Right := '>';
+                     end if;
+
+                  --  If non-derived pointer, get directly designated type.
                   --  If the type has a full view, all references are on the
-                  --  partial view, that is seen first.
+                  --  partial view that is seen first.
 
                   elsif Is_Access_Type (Tref) then
                      Tref := Directly_Designated_Type (Tref);
index 9e0d2ede1ed468a2634707b4f4b208383f924d82..48aa1ac09528e76292ba66a94cb83c50e1f2e3e8 100644 (file)
@@ -2366,8 +2366,7 @@ package body Sem_Prag is
                      elsif Contains (Inputs_Seen, Input_Id) then
                         Error_Msg_N ("duplicate input item", Input);
 
-                     --  The input is legal, add it to the list of processed
-                     --  inputs.
+                     --  Input is legal, add it to the list of processed inputs
 
                      else
                         Add_Item (Input_Id, Inputs_Seen);
@@ -2408,7 +2407,6 @@ package body Sem_Prag is
          while Present (Elmt) loop
             if Name_Seen then
                Error_Msg_N ("only one item allowed in initialization", Elmt);
-
             else
                Name_Seen := True;
                Analyze_Initialization_Item (Elmt);
@@ -2424,7 +2422,6 @@ package body Sem_Prag is
                Input := First (Expressions (Inputs));
                while Present (Input) loop
                   Analyze_Input_Item (Input);
-
                   Next (Input);
                end loop;
             end if;
index b28c7a2f0c513e45283979716e2c4c7f0efb190f..a938f0ae34445a5ad9136f6e15f7ac36cd1453d8 100644 (file)
@@ -423,7 +423,7 @@ package body Sem_Util is
 
          Decl := First
                    (Visible_Declarations
-                     (Specification (Unit_Declaration_Node (Current_Scope))));
+                     (Package_Specification (Current_Scope)));
          while Present (Decl) loop
             if Nkind (Decl) = N_Private_Extension_Declaration
               and then Defining_Entity (Decl) = Typ
@@ -1169,6 +1169,13 @@ package body Sem_Util is
          return;
       end if;
 
+      --  Ignore in ASIS mode, elaboration entity is not in source and plays
+      --  no role in analysis.
+
+      if ASIS_Mode then
+         return;
+      end if;
+
       --  Construct name of elaboration entity as xxx_E, where xxx is the unit
       --  name with dots replaced by double underscore. We have to manually
       --  construct this name, since it will be elaborated in the outer scope,
index 17c934a0ab108690179824e589b462d346fcc825..c3cace3c559c35feec0092459cfc5b112cb920ff 100644 (file)
@@ -402,7 +402,7 @@ package Targparm is
    --  appropriate default in some cases, e.g. on embedded targets which do not
    --  allow the possibility of multi-processors. The default can be overridden
    --  using pragmas Enable/Disable_Atomic_Synchronization and also by use of
-   --  the debug flags gnat.d and gnatd.e.
+   --  the corresponding debug flags -gnatd.e and -gnatd.d.
 
    Support_Aggregates_On_Target : Boolean := True;
    --  In the general case, the use of aggregates may generate calls