diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/ada/einfo.adb | 1 | ||||
-rw-r--r-- | gcc/ada/einfo.ads | 32 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 41 | ||||
-rw-r--r-- | gcc/ada/g-comlin.adb | 15 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 10 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 9 | ||||
-rw-r--r-- | gcc/ada/ug_words | 3 |
8 files changed, 94 insertions, 35 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 261eb29..17c0a46 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,6 +1,24 @@ 2010-10-18 Robert Dewar <dewar@adacore.com> * einfo.ads, einfo.adb: Minor reformatting. + * gnat_ugn.texi, ug_words: Add missing entries, fix typos. + +2010-10-18 Emmanuel Briot <briot@adacore.com> + + * g-comlin.adb (Is_In_Config): When the switch accepts either a space + or equal, we output an equal every time. + +2010-10-18 Ed Schonberg <schonberg@adacore.com> + + * sem_res.adb (Resolve_Entry_Call): Handle call to an entry family + member when pre/post conditions are present. + * exp_ch9.adb (Build_PPC_Wrapper): The PPC_Wrapper for an entry family + includes an index parameter, and the name of the enclosed entry call is + an indexed component. + +2010-10-18 Robert Dewar <dewar@adacore.com> + + * einfo.ads, einfo.adb: Minor reformatting. 2010-10-18 Jose Ruiz <ruiz@adacore.com> diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb index 560b152..0ea9515 100644 --- a/gcc/ada/einfo.adb +++ b/gcc/ada/einfo.adb @@ -7921,7 +7921,6 @@ package body Einfo is E_Return_Statement | E_Subprogram_Body | E_Subprogram_Type => - Write_Str ("Last_Entity"); when Scalar_Kind => diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads index 9407851..f32ade5 100644 --- a/gcc/ada/einfo.ads +++ b/gcc/ada/einfo.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- --- -- +-- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- @@ -337,6 +337,20 @@ package Einfo is -- on the list. A stack is required to handle the case of nested select -- statements referencing the same entry. +-- Access_Disp_Table (Elist16) [implementation base type only] +-- Present in record type entities. For a tagged type, points to the +-- dispatch tables associated with the tagged type. The first two +-- entities correspond with the primary dispatch table: 1) primary +-- dispatch table with user-defined primitives, 2) primary dispatch table +-- with predefined primitives. For each interface type covered by the +-- tagged type we also have: 3) secondary dispatch table with thunks of +-- primitives covering user-defined interface primitives, 4) secondary +-- dispatch table with thunks of predefined primitives, 5) secondary +-- dispatch table with user-defined primitives, and 6) secondary dispatch +-- table with predefined primitives. The last entity of this list is an +-- access type declaration used to expand dispatching calls through the +-- primary dispatch table. For a non-tagged record, contains Empty. + -- Actual_Subtype (Node17) -- Present in variables, constants, and formal parameters. This is the -- subtype imposed by the value of the object, as opposed to its nominal @@ -355,20 +369,6 @@ package Einfo is -- rather irregular, and the semantic checks that depend on the nominal -- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv). --- Access_Disp_Table (Elist16) [implementation base type only] --- Present in record type entities. For a tagged type, points to the --- dispatch tables associated with the tagged type. The first two --- entities correspond with the primary dispatch table: 1) primary --- dispatch table with user-defined primitives, 2) primary dispatch table --- with predefined primitives. For each interface type covered by the --- tagged type we also have: 3) secondary dispatch table with thunks of --- primitives covering user-defined interface primitives, 4) secondary --- dispatch table with thunks of predefined primitives, 5) secondary --- dispatch table with user-defined primitives, and 6) secondary dispatch --- table with predefined primitives. The last entity of this list is an --- access type declaration used to expand dispatching calls through the --- primary dispatch table. For a non-tagged record, contains Empty. - -- Address_Clause (synthesized) -- Applies to entries, objects and subprograms. Set if an address clause -- is present which references the object or subprogram and points to @@ -1874,7 +1874,7 @@ package Einfo is -- object fields. A pragma Import for a component can define the -- External_Name of the imported Java field (which is generally needed, -- because Java names are case sensitive). --- + -- In_Use (Flag8) -- Present in packages and types. Set when analyzing a use clause for -- the corresponding entity. Reset at end of corresponding declarative diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index 0df9e44..b38e2ab 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -1599,15 +1599,10 @@ package body Exp_Ch9 is Actuals : constant List_Id := New_List; -- the actuals in the entry call. - Entry_Call : constant Node_Id := - Make_Procedure_Call_Statement (Loc, - Name => - Make_Selected_Component (Loc, - Prefix => New_Occurrence_Of (Synch_Id, Loc), - Selector_Name => New_Occurrence_Of (E, Loc)), - Parameter_Associations => Actuals); + Decls : constant List_Id := New_List; - Decls : constant List_Id := New_List; + Entry_Call : Node_Id; + Entry_Name : Node_Id; Specs : List_Id; -- The specification of the wrapper procedure @@ -1649,6 +1644,36 @@ package body Exp_Ch9 is In_Present => True, Parameter_Type => New_Occurrence_Of (Scope (E), Loc))); + Entry_Name := + Make_Selected_Component (Loc, + Prefix => New_Occurrence_Of (Synch_Id, Loc), + Selector_Name => New_Occurrence_Of (E, Loc)); + + -- If entity is entry family, second formal is the corresponding index, + -- and entry name is an indexed component. + + if Ekind (E) = E_Entry_Family then + declare + Index : constant Entity_Id := + Make_Defining_Identifier (Loc, Name_I); + begin + Append_To (Specs, + Make_Parameter_Specification (Loc, + Defining_Identifier => Index, + Parameter_Type => + New_Occurrence_Of (Entry_Index_Type (E), Loc))); + + Entry_Name := Make_Indexed_Component (Loc, + Prefix => Entry_Name, + Expressions => New_List (New_Occurrence_Of (Index, Loc))); + end; + end if; + + Entry_Call := + Make_Procedure_Call_Statement (Loc, + Name => Entry_Name, + Parameter_Associations => Actuals); + -- Now add formals that match those of the entry, and build actuals -- for the nested entry call. diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index eb98696..eb7ebb4 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -1866,14 +1866,20 @@ package body GNAT.Command_Line is return False; end if; - when Parameter_With_Optional_Space - | Parameter_With_Space_Or_Equal => + when Parameter_With_Optional_Space => if Parameter /= "" then Callback (Switch, " ", Parameter, Index => Index); Found_In_Config := True; return False; end if; + when Parameter_With_Space_Or_Equal => + if Parameter /= "" then + Callback (Switch, "=", Parameter, Index => Index); + Found_In_Config := True; + return False; + end if; + when Parameter_No_Space => if Parameter /= "" then Callback (Switch, "", Parameter, Index); @@ -1925,8 +1931,9 @@ package body GNAT.Command_Line is null; when Parameter_With_Space_Or_Equal => - if Switch (Param) = ' ' - or else Switch (Param) = '=' + if Param <= Switch'Last + and then + (Switch (Param) = ' ' or else Switch (Param) = '=') then Callback (Switch (Switch'First .. Last), "=", Switch (Param + 1 .. Switch'Last), Index); diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 0610735..785a4b5 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -4045,14 +4045,14 @@ Allow full Ada 2005 features. @item -gnat2005 @cindex @option{-gnat2005} (@command{gcc}) -Allow full Ada 2005 features (same as @option{-gnat05} +Allow full Ada 2005 features (same as @option{-gnat05}) @item -gnat12 @cindex @option{-gnat12} (@command{gcc}) @item -gnat2012 @cindex @option{-gnat2012} (@command{gcc}) -Allow full Ada 2012 features (same as @option{-gnat12} +Allow full Ada 2012 features (same as @option{-gnat12}) @item -gnata @cindex @option{-gnata} (@command{gcc}) @@ -4716,14 +4716,14 @@ standard output is redirected, a brief summary is written to @file{stderr} (standard error) giving the number of error messages and warning messages generated. -@item -^gnatl^OUTPUT_FILE^=file -@cindex @option{^-gnatl^OUTPUT_FILE^=fname} (@command{gcc}) +@item ^-gnatl^/OUTPUT_FILE^=file +@cindex @option{^-gnatl^/OUTPUT_FILE^=fname} (@command{gcc}) This has the same effect as @option{-gnatl} except that the output is written to a file instead of to standard output. If the given name @file{fname} does not start with a period, then it is the full name of the file to be written. If @file{fname} is an extension, it is appended to the name of the file being compiled. For example, if -file @file{xyz.adb} is compiled with @option{^-gnatl^OUTPUT_FILE^=.lst}, +file @file{xyz.adb} is compiled with @option{^-gnatl^/OUTPUT_FILE^=.lst}, then the output is written to file ^xyz.adb.lst^xyz.adb_lst^. @item -gnatU diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 0e67047..ab56c61 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -6336,13 +6336,20 @@ package body Sem_Res is and then Current_Scope /= PPC_Wrapper (Nam) then -- Rewrite as call to the precondition wrapper, adding the task - -- object to the list of actuals. + -- object to the list of actuals. If the call is to a member of + -- an entry family, include the index as well. declare New_Call : Node_Id; New_Actuals : List_Id; begin New_Actuals := New_List (Obj); + + if Nkind (Entry_Name) = N_Indexed_Component then + Append_To (New_Actuals, + New_Copy_Tree (First (Expressions (Entry_Name)))); + end if; + Append_List (Parameter_Associations (N), New_Actuals); New_Call := Make_Procedure_Call_Statement (Loc, diff --git a/gcc/ada/ug_words b/gcc/ada/ug_words index e2da62c..e82bd76 100644 --- a/gcc/ada/ug_words +++ b/gcc/ada/ug_words @@ -199,6 +199,9 @@ gcc -c ^ GNAT COMPILE -gnat83 ^ /83 -gnat95 ^ /95 -gnat05 ^ /05 +-gnat2005 ^ /2005 +-gnat12 ^ /12 +-gnat2012 ^ /2012 -gnatx ^ /XREF=SUPPRESS -gnatX ^ /EXTENSIONS_ALLOWED --RTS ^ /RUNTIME_SYSTEM |