diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/ada/a-except-2005.adb | 5 | ||||
-rw-r--r-- | gcc/ada/a-except-2005.ads | 6 | ||||
-rw-r--r-- | gcc/ada/exp_ch11.adb | 21 | ||||
-rw-r--r-- | gcc/ada/lib-xref.adb | 18 | ||||
-rw-r--r-- | gcc/ada/sem_prag.adb | 5 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 9 | ||||
-rw-r--r-- | gcc/ada/targparm.ads | 2 |
8 files changed, 60 insertions, 23 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ac5cbb6..babf485 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/a-except-2005.adb b/gcc/ada/a-except-2005.adb index 29ecf39..b47f167 100644 --- a/gcc/ada/a-except-2005.adb +++ b/gcc/ada/a-except-2005.adb @@ -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; diff --git a/gcc/ada/a-except-2005.ads b/gcc/ada/a-except-2005.ads index ecc5ca8..ca4ff9f 100644 --- a/gcc/ada/a-except-2005.ads +++ b/gcc/ada/a-except-2005.ads @@ -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 diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb index 90628a0..8ad3019 100644 --- a/gcc/ada/exp_ch11.adb +++ b/gcc/ada/exp_ch11.adb @@ -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)); diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index 562b709..972d963 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -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); diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 9e0d2ed..48aa1ac 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -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; diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index b28c7a2..a938f0a 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -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, diff --git a/gcc/ada/targparm.ads b/gcc/ada/targparm.ads index 17c934a..c3cace3 100644 --- a/gcc/ada/targparm.ads +++ b/gcc/ada/targparm.ads @@ -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 |