aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2017-02-12system-freebsd-x86.ads: Rename into...John Marino3-5/+43
* system-freebsd-x86.ads: Rename into... * system-freebsd.ads: ...this. (Default_Bit_Order): Define using Standard'Default_Bit_Order. * gcc-interface/Makefile.in: Support aarch64-freebsd. (x86-64/FreeBSD): Adjust to above renaming. (i386/FreeBSD): Likewise. From-SVN: r245377
2017-02-09* comperr.adb: Update FSF bug reporting URL.Gerald Pfeifer2-1/+5
From-SVN: r245297
2017-02-01re PR ada/79309 (incorrectly bounded calls to strncat in adaint.c)Eric Botcazou1-1/+1
PR ada/79309 * adaint.c (__gnat_killprocesstree): Use strlen instead of sizeof. From-SVN: r245107
2017-02-01re PR ada/79309 (incorrectly bounded calls to strncat in adaint.c)Eric Botcazou2-4/+12
PR ada/79309 * adaint.c (__gnat_killprocesstree): Fix broken string handling. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r245103
2017-01-25re PR lto/79061 ([LTO][ASAN] LTO plus ASAN fails with "AddressSanitizer: ↵Maxim Ostapenko2-1/+8
initialization-order-fiasco") PR lto/79061 gcc/ * asan.c (get_translation_unit_decl): New function. (asan_add_global): Extract modules file name from globals TRANSLATION_UNIT_DECL name. gcc/fortran/ * f95-lang.c (gfc_create_decls): Include stringpool.h. Pass main_input_filename to build_translation_unit_decl. gcc/ada/ * gcc-interface/utils.c (get_global_context): Pass main_input_filename to build_translation_unit_decl. gcc/c/ * c-decl.c (pop_scope): Pass main_input_filename to build_translation_unit_decl. gcc/cp/ * decl.c (cxx_init_decl_processing): Pass main_input_filename to build_translation_unit_decl. From-SVN: r244890
2017-01-23sem_util.adb (New_Copy_Tree): Code cleanup: removal of the internal map (ie.Javier Miranda5-231/+134
2017-01-23 Javier Miranda <miranda@adacore.com> * sem_util.adb (New_Copy_Tree): Code cleanup: removal of the internal map (ie. variable Actual_Map, its associated local variables, and all the code handling it). * sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode force loading of the System package when processing a task type. (Analyze_Protected_Type_Declaration): in GNATprove mode force loading of the System package when processing a protected type. * sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode force loading of the System package when processing compilation unit with a main-like subprogram. * frontend.adb (Frontend): remove forced loading of the System package. From-SVN: r244810
2017-01-23sem_prag.adb (Default_Initial_Condition): If the desired type declaration is ↵Ed Schonberg4-7/+30
a derived type declaration with discriminants... 2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Default_Initial_Condition): If the desired type declaration is a derived type declaration with discriminants, it is rewritten as a private type declaration. * sem_ch13.adb (Replace_Type_References_Generic, Visible_Component): A discriminated private type with descriminnts has components that must be rewritten as selected components if they appear as identifiers in an aspect expression such as a Default_Initial_Condition. * sem_util.adb (Defining_Entity): support N_Iterator_Specification nodes. From-SVN: r244809
2017-01-23ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.Hristian Kirtchev7-31/+62
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine. * gnat1drv.adb Generate an empty object file for an ignored Ghost compilation unit. * inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting. From-SVN: r244808
2017-01-23[multiple changes]Arnaud Charlet4-121/+150
2017-01-23 Yannick Moy <moy@adacore.com> * sem_ch4.adb (Analyze_Indexed_Component_Form): Adapt to inlined prefix with string literal subtype. * inline.adb (Expand_Inlined_Call): Keep unchecked conversion inside inlined call when formal type is constrained. 2017-01-23 Javier Miranda <miranda@adacore.com> * sem_util.adb (New_Copy_Tree): Code cleanup: removal of global variables. All the global variables, global functions and tables of this subprogram are now declared locally. From-SVN: r244807
2017-01-23[multiple changes]Arnaud Charlet20-93/+221
2017-01-23 Gary Dismukes <dismukes@adacore.com> * exp_strm.ads: Minor reformatting and typo fixes. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb, exp_aggr.adb: Minor reformatting. * g-diopit.adb: minor grammar/punctuation fix in comment. * g-byorma.ads: minor fix of unbalanced parens in comment. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * par.adb: Update the documentation of component Labl. * par-ch6.adb (P_Return_Statement): Set the expected label of an extended return statement to Error. 2017-01-23 Tristan Gingold <gingold@adacore.com> * s-boustr.ads, s-boustr.adb (Is_Full): New function. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * expander.adb: Handle N_Delta_Aggregate. 2017-01-23 Javier Miranda <miranda@adacore.com> * exp_ch6.adb (Expand_Call): Improve the code that checks if some formal of the called subprogram is a class-wide interface, to handle subtypes of class-wide interfaces. 2017-01-23 Javier Miranda <miranda@adacore.com> * checks.adb (Apply_Parameter_Aliasing_Checks): Remove side effects of the actuals before generating the overlap check. From-SVN: r244806
2017-01-23[multiple changes]Arnaud Charlet6-43/+96
2017-01-23 Justin Squirek <squirek@adacore.com> * exp_strm.ads, exp_strm.ads (Build_Record_Or_Elementary_Input_Function): Add an extra parameter so as to avoid getting the underlying type by default. * exp_attr.adb (Expand_N_Attribute_Reference): Remove use of underlying type in the Iiput and output attribute cases when building their respective functions. 2017-01-23 Gary Dismukes <dismukes@adacore.com> * scng.adb: Minor reformatting of error message. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): Do not attempt to freeze the return type of an expression funxtion that is a completion, if the type is a limited view and the non-limited view is available. From-SVN: r244805
2017-01-23Minor editing.Arnaud Charlet2-3/+3
From-SVN: r244795
2017-01-23[multiple changes]Arnaud Charlet15-33/+484
2017-01-23 Ed Schonberg <schonberg@adacore.com> * par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta aggregate construct. (P_Record_Or_Array_Component_Association): An array aggregate can start with an Iterated_Component_Association. * scng.adb: Modify error message on improper use of @ in earlier versions of the language. * sinfo.ads: New node kind N_Delta_Aggregate. * sinfo.adb: An N_Delta_Aggregate has component associations and an expression. * sem_res.adb (Resolve): Call Resolve_Delta_Aggregate. * sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association): Create a new index for each one of the choices in the association, to prevent spurious homonyms in the scope. (Resolve_Delta_Aggregate): New. * sem.adb: An N_Delta_Aggregate is analyzed like an aggregate. * exp_util.adb (Insert_Actions): Take into account N_Delta_Aggregate. * exp_aggr.ads: New procedure Expand_N_Delta_Aggregate. * exp_aggr.adb: New procedure Expand_N_Delta_Aggregate, and local procedures Expand_Delta_Array_Aggregate and expand_Delta_Record_Aggregate. * sprint.adb: Handle N_Delta_Aggregate. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch11.adb (Expand_N_Exception_Declaration): Generate an empty name when the exception declaration is subject to pragma Discard_Names. (Null_String): New routine. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * par-ch9.adb (P_Protected_Definition): Parse any optional and potentially illegal pragmas which appear in a protected operation declaration list. (P_Task_Items): Parse any optional and potentially illegal pragmas which appear in a task item list. From-SVN: r244794
2017-01-23[multiple changes]Arnaud Charlet8-75/+149
2017-01-23 Pascal Obry <obry@adacore.com> * s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which is needed when a foreign thread call a Win32 API using a thread handle like GetThreadTimes() for example. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not allow an 'Address clause to be specified on a prefix of a class-wide type. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Insert_Valid_Check): Ensure that the prefix of attribute 'Valid is a renaming of the original expression when the expression denotes a name. For all other kinds of expression, use a constant to capture the value. * exp_util.adb (Is_Name_Reference): Moved to Sem_Util. * sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util. 2017-01-23 Justin Squirek <squirek@adacore.com> * sem_eval.adb (Eval_Integer_Literal): Add special case to avoid optimizing out check if the literal appears in an if-expression. From-SVN: r244792
2017-01-23sem_ch4.adb (Try_Primitive_Operations, [...]): argument is valid if it is a ↵Ed Schonberg5-5/+31
derived type with unknown discriminants that... 2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Primitive_Operations, Is_Valid_First_Argument_Of): argument is valid if it is a derived type with unknown discriminants that matches its underlying record view. * exp_util.adb (Expand_Subtype_From_Expr): Do not expand expression if its type is derived from a limited type with unknown discriminants, because the expansion (which is a call) must be expanded in the enclosing context to add the proper build- in-place parameters to the call. * lib.ads, exp_ch9.adb: Minor fixes in comments. From-SVN: r244790
2017-01-23[multiple changes]Arnaud Charlet12-82/+175
2017-01-23 Yannick Moy <moy@adacore.com> * frontend.adb (Frontend): Do not load runtime unit for GNATprove when parsing failed. * exp_ch9.adb: minor removal of extra whitespace * exp_ch6.adb: minor typo in comment * sem_util.adb: Code cleanup. * exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment * a-ngcefu.adb: minor style fix in whitespace 2017-01-23 Thomas Quinot <quinot@adacore.com> * scos.ads: Document usage of 'd' as default SCO kind for declarations. * par_sco.adb (Traverse_Declarations_Or_Statements. Traverse_Degenerate_Subprogram): New supporting routine for expression functions and null procedures. (Traverse_Declarations_Or_Statements.Traverse_One): Add N_Expression_Function to the subprogram case; add required support for null procedures and expression functions. 2017-01-23 Bob Duff <duff@adacore.com> * namet.ads (Bounded_String): Decrease the size of type Bounded_String to avoid running out of stack space. * namet.ads (Append): Don't ignore buffer overflow; raise Program_Error instead. From-SVN: r244789
2017-01-23[multiple changes]Arnaud Charlet14-195/+255
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor reformatting. * exp_ch9.adb: minor style fix in comment. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Analyze_Allocator): Handle properly a type derived for a limited record extension with unknown discriminants whose full view has no discriminants. 2017-01-23 Yannick Moy <moy@adacore.com> * exp_spark.adb: Alphabetize with clauses. From-SVN: r244788
2017-01-23[multiple changes]Arnaud Charlet15-73/+163
2017-01-23 Gary Dismukes <dismukes@adacore.com> * a-calend.adb, prep.adb, debug.adb, prj.ads, prepcomp.adb, exp_disp.adb, s-imgrea.adb, g-socket.adb, g-socket.ads, sem_ch13.adb, prj-tree.ads: Minor spelling change for consistency (behaviour -> behavior). 2017-01-23 Ed Schonberg <schonberg@adacore.com> * scng.adb (Scan): Use Ada version Ada_2020 to flag use of Target_Name. * par-ch4.adb (P_Primary): Ditto. * opt.ads: Add Ada_2020 (optimistically) to enumeration list of Ada_Version_Type. * switch-c.adb (Scan_Front_End_Switches): Recognize -gnat2020 for new Ada version Ada_2020. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_attr.adb (Expand_Loop_Entry_Attribute): Force the generation of a nominal type for the constant which captures the value of the attribute prefix. Various clean ups. * sem_attr.adb (Analyze_Attribute): Clean up the processing of 'Loop_Entry. 2017-01-23 Yannick Moy <moy@adacore.com> * sem_util.adb (Has_Enabled_Property): Treat protected objects and variables differently from other variables. From-SVN: r244787
2017-01-23sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Split original Ada 95 ↵Thomas Quinot5-328/+364
part off into new subprogram below. 2017-01-23 Thomas Quinot <quinot@adacore.com> * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Split original Ada 95 part off into new subprogram below. Call that subprogram (instead of proceeding with AI95-0133 behaviour) if debug switch -gnatd.p is in use. (Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram * debug.adb Document new switch -gnatd.p * freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust record for reverse bit order if an error has already been posted on the record type. This avoids generating extraneous "info:" messages for illegal code. From-SVN: r244786
2017-01-23sem_ch3.adb (Analyze_Declarations): Correct commentsJustin Squirek3-1/+8
2017-01-23 Justin Squirek <squirek@adacore.com> * sem_ch3.adb (Analyze_Declarations): Correct comments * freeze.adb (Find_Constant): Add detection of deferred constants so they are not incorrectly flagged as premature. From-SVN: r244785
2017-01-23Minor reformatting.Arnaud Charlet2-8/+8
From-SVN: r244784
2017-01-23scans.ads: New token At_Sign.Ed Schonberg15-15/+333
2017-01-23 Ed Schonberg <schonberg@adacore.com> * scans.ads: New token At_Sign. Remove '@' from list of illegal characters for future version of the language. '@' is legal name. * scng.ads, scng.adb (Scan): Handle '@' appropriately. * scn.adb (Scan_Reserved_Identifier): An occurrence of '@' denotes a Target_Name. * par-ch4.adb (P_Name, P_Primary): Handle Target_Name. * sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node. (Has_Target_Names): New flag on N_Assignment_Statement, to indicate that RHS has occurrences of N_Target_Name. * sem.adb: Call Analyze_Target_Name. * sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram. (urrent_LHS): Global variable that denotes LHS of assignment, used in the analysis of Target_Name nodes. * sem_res.adb (Resolve_Target_Name): New procedure. * exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125): N is an assignment statement whose RHS contains occurences of @ that designate the value of the LHS of the assignment. If the LHS is side-effect free the target names can be replaced with a copy of the LHS; otherwise the semantics of the assignment is described in terms of a procedure with an in-out parameter, and expanded as such. (Expand_N_Assignment_Statement): Call Expand_Assign_With_Target_Names when needed. * exp_util.adb (Insert_Actions): Take into account N_Target_Name. * sprint.adb: Handle N_Target_Name. From-SVN: r244783
2017-01-23[multiple changes]Arnaud Charlet5-136/+347
2017-01-23 Eric Botcazou <ebotcazou@adacore.com> * checks.adb: Minor fix in comment. 2017-01-23 Philippe Gil <gil@adacore.com> * g-debpoo.adb (Do_Report) remove freed chunks from chunks count in Sort = Memory_Usage or Allocations_Count 2017-01-23 Justin Squirek <squirek@adacore.com> * sem_ch3.adb: Code cleanup. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global variables to the local variable section. Update the profile of various nested routine that previously had visibility of those globals. One the matching phase has completed, remove certain classes of clauses which are considered noise. (Check_Dependency_Clause): Properly detect a match between two 'Result attributes. Update the various post-match cases to use Is_Already_Matched as this routine now automatically recognizes a previously matched 'Result attribute. (Is_Already_Matched): New routine. (Remove_Extra_Clauses): New routine. (Report_Extra_Clauses): Remove the detection of ... => null clauses as this is now done in Remove_Extra_Clauses. From-SVN: r244782
2017-01-23Fix typo.Arnaud Charlet1-1/+1
From-SVN: r244781
2017-01-23[multiple changes]Arnaud Charlet3-31/+100
2017-01-23 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not report on spurious overlaps between values involving a subtype with a static predicate, because the expansion of such a subtype into individual ranges in inhibited in ASIS mode. 2017-01-23 Justin Squirek <squirek@adacore.com> * sem_ch3.adb (Analyze_Declarations): Add detection of an edge case and delay freezing if it is present. From-SVN: r244780
2017-01-23sem_ch3.adb, [...]: Minor reformatting.Hristian Kirtchev11-43/+166
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb, sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting. 2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb (Freeze_Subprogram): Ensure that all anonymous access-to-subprogram types inherit the convention of the associated subprogram. (Set_Profile_Convention): New routine. * sem_ch6.adb (Check_Conformance): Do not compare the conventions of the two entities directly, use Conventions_Match to account for anonymous access-to-subprogram and subprogram types. (Conventions_Match): New routine. From-SVN: r244778
2017-01-23exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes which ↵Claire Dross2-1/+57
return Universal_Integer... 2017-01-23 Claire Dross <dross@adacore.com> * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes which return Universal_Integer, force the overflow check flag for Length and Range_Length for types as big as Long_Long_Integer. From-SVN: r244777
2017-01-23[multiple changes]Arnaud Charlet4-3/+55
2017-01-23 Claire Dross <dross@adacore.com> * exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes which return Universal_Integer, introduce a conversion to the expected type with the appropriate check flags set. * sem_res.adb (Resolve_Range): The higher bound can be in Typ's base type if the range is null. It may still be invalid if it is higher than the lower bound. This is checked later in the context in which the range appears. 2017-01-23 Pierre-Marie de Rodat <derodat@adacore.com> * scos.ads: Introduce a constant to represent ignored dependencies in SCO_Unit_Table_Entry. From-SVN: r244776
2017-01-23[multiple changes]Arnaud Charlet7-11/+87
2017-01-23 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra spaces from error messages. 2017-01-23 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Check_Large_Modular_Array): New procedure, subsidiary to Expand_N_Object_ Declaration, to compute a guard on an object declaration for an array type with a modular index type with the size of Long_Long_Integer. Special processing is needed in this case to compute reliably the size of the object, and eventually to raise Storage_Error, when wrap-around arithmetic might compute a meangingless size for the object. 2017-01-23 Justin Squirek <squirek@adacore.com> * a-wtenau.adb, par-endh.adb, sem_prag.adb, sem_type.adb: Code cleanups. From-SVN: r244775
2017-01-23sem_res.adb (Resolve_Call): In the part of the code where it is deciding ↵Bob Duff3-3/+23
whether to turn the call into an... 2017-01-23 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Call): In the part of the code where it is deciding whether to turn the call into an indexed component, avoid doing so if the call is to an instance of Unchecked_Conversion. Otherwise, the compiler turns it into an indexed component, and resolution of that turns it back into a function call, and so on, resulting in infinite recursion. * sem_util.adb (Needs_One_Actual): If the first formal has a default, then return False. From-SVN: r244774
2017-01-21sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc) ↵Eric Botcazou2-19/+27
optimizations when... * sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc) optimizations when the type is modular and the offsets are equal. From-SVN: r244745
2017-01-20Remove orphaned entriesEric Botcazou1-11/+0
From-SVN: r244725
2017-01-20[multiple changes]Arnaud Charlet9-47/+118
2017-01-20 Thomas Quinot <quinot@adacore.com> * sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning message. 2017-01-20 Nicolas Roche <roche@adacore.com> * terminals.c: Ignore failures on setpgid and tcsetpgrp commands. 2017-01-20 Bob Duff <duff@adacore.com> * sem_eval.adb (Compile_Time_Compare): Disable the expr+literal (etc) optimizations when the type is modular. 2017-01-20 Yannick Moy <moy@adacore.com> * sem_ch6.adb (Move_Pragmas): move some pragmas, but copy the SPARK_Mode pragma instead of moving it. (Build_Subprogram_Declaration): Ensure that the generated spec and original body share the same SPARK_Pragma aspect/pragma. * sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New procedure to copy SPARK_Mode aspect. 2017-01-20 Bob Duff <duff@adacore.com> * sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects even in ASIS mode. * sem_ch13.adb (Resolve_Name): Enable setting the entity to Empty even in ASIS mode. From-SVN: r244720
2017-01-20[multiple changes]Arnaud Charlet14-93/+185
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch9.adb: minor style fixes in comments. * sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay relative statement introduces an implicit dependency on Ada.Real_Time.Clock_Time. * sem_util.adb: Minor reformatting. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment must be treated as delayed aspect even if the expression is a literal, because the aspect affects the freezing and the elaboration of the object to which it applies. 2017-01-20 Tristan Gingold <gingold@adacore.com> * s-osinte-vxworks.ads (Interrup_Range): New subtype. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * lib-xref.adb (Generate_Reference): Do not warn about the presence of a pragma Unreferenced if the entity appears as the actual in a procedure call that does not come from source. 2017-01-20 Pascal Obry <obry@adacore.com> * expect.c, terminals.c: Fix some warnings about unused variables. * gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part of the runtime. 2017-01-20 Bob Duff <duff@adacore.com> * exp_attr.adb (Constrained): Apply an access check (check that the prefix is not null) when the prefix denotes an object of an access type; that is, when there is an implicit dereference. 2017-01-20 Gary Dismukes <dismukes@adacore.com> * s-rident.ads (constant Profile_Info): Remove No_Calendar from GNAT_Extended_Ravenscar restrictions. 2017-01-20 Tristan Gingold <gingold@adacore.com> * s-maccod.ads: Add pragma No_Elaboration_Code_All From-SVN: r244718
2017-01-20[multiple changes]Arnaud Charlet10-66/+275
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * ghost.adb (Mark_Ghost_Clause): New routine. (Prune_Node): Do not prune compilation unit nodes. (Remove_Ignored_Ghost_Code): Prune the compilation unit node directly. This does not touch the node itself, but does prune all its fields. * ghost.ads (Mark_Ghost_Clause): New routine. * sem_ch8.adb (Analyze_Use_Package): Emit an error when a use package clause mentions Ghost and non-Ghost packages. Mark a use package clause as Ghost when it mentions a Ghost package. (Analyze_Use_Type): Emit an error when a use type clause mentions Ghost and non-Ghost types. Mark a use type clause as Ghost when it mentions a Ghost type. * sem_ch10.adb (Analyze_With_Clause): Mark a with clause as Ghost when it withs a Ghost unit. 2017-01-20 Javier Miranda <miranda@adacore.com> * sem_res.adb (Resolve_Call): If a function call returns a limited view of a type and at the point of the call the function is not declared in the extended main unit then replace it with the non-limited view, which must be available. If the called function is in the extended main unit then no action is needed since the back-end handles this case. 2017-01-20 Eric Botcazou <ebotcazou@adacore.com> * sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into... (Contains_Subprograms_Refs): ...this. Adjust comment for constants. (Is_Subp_Or_Const_Ref): Rename into... (Is_Subprogram_Ref): ...this. (Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into Has_Non_Subprograms_Referencer and adjust comment. Remove incorrect shortcut for package declarations and bodies. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Complete_Private_Subtype): If the scope of the base type differs from that of the completion and the private subtype is an itype (created for a constraint on an access type e.g.), set Delayed_Freeze on both to prevent out-of-scope anomalies in gigi. 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): When inheriting the SPARK_Mode of a prior expression function, look at the properly resolved entity rather than the initial candidate which may denote a homonym. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Rewrite_Assertion_Kind): If the name is Precondition or Postcondition, and the context is pragma Check_Policy, indicate that this Pre-Ada2012 usage is deprecated and suggest the standard names Assertion_Policy /Pre /Post instead. From-SVN: r244704
2017-01-20sem_ch10.adb, [...]: Minor reformatting.Hristian Kirtchev3-17/+26
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch10.adb, sem_cat.adb: Minor reformatting. From-SVN: r244703
2017-01-20[multiple changes]Arnaud Charlet10-31/+230
2017-01-20 Javier Miranda <miranda@adacore.com> * sem_ch3.adb (Access_Type_Declaration): Protect access to the Entity attribute. * sem_ch10.adb (Install_Siblings): Skip processing malformed trees. * sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing malformed trees. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb (Analyze_Aspect_Specification, case Dynamic_Predicate): If the entity E is a subtype that inherits a static predicate for its parent P,, the inherited and the new predicate combine in the generated predicate function, and E only has a dynamic predicate. 2017-01-20 Tristan Gingold <gingold@adacore.com> * s-boustr.ads, s-boustr.adb: New package. * Makefile.rtl: Add s-boustr. 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * inline.adb (Process_Formals): Qualify the expression of a return statement when it yields a universal type. 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * freeze.adb (Freeze_All): Freeze the default expressions of all eligible formal parameters that appear in entries, entry families, and protected subprograms. From-SVN: r244701
2017-01-20Minor reformatting.Arnaud Charlet4-17/+17
From-SVN: r244700
2017-01-20[multiple changes]Arnaud Charlet9-42/+652
2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check for illegal inherited Implicit_Dereference aspects with renamed discriminants. 2017-01-20 Javier Miranda <miranda@adacore.com> * debug.adb (switch d.6): do not avoid declaring unreferenced itypes. * nlists.ads (Lock_Lists, Unlock_Lists): New subprograms. * nlists.adb (Lock_Lists, Unlock_Lists): New subprograms. (Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent, Set_Prev, Tree_Read): Adding assertion. * atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms. * atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms. (Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source, Set_Ekind, Set_Error_Posted, Set_Has_Aspects, Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count, Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN, Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN, Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent, Set_ListN_With_Parent): Adding assertion. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb (Process_Convention): Diagnose properly a pragma import that applies to several homograph subprograms. when one of them is declared by a subprogram body. 2017-01-20 Justin Squirek <squirek@adacore.com> * exp_ch6.adb (Expand_Call): Remove optimization that nulls out calls to null procedures. From-SVN: r244699
2017-01-20[multiple changes]Arnaud Charlet9-26/+115
2017-01-20 Yannick Moy <moy@adacore.com> * inline.adb (Expand_Inlined_Call): Keep more precise type of actual for inlining whenever possible. In particular, do not switch to the formal type in GNATprove mode in some case where the GNAT backend might require it for visibility. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited aspect Implicit_Dereference can be inherited by a full view if the partial view has no discriminants, because there is no way to apply the aspect to the partial view. (Build_Derived_Record_Type): If derived type renames discriminants of the parent, the new discriminant inherits the aspect from the old one. * sem_ch4.adb (Analyze_Call): Handle properly a parameterless call through an access discriminant designating a subprogram. * sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle properly a parameterless call through an access discriminant on the left-hand side of an assignment. * sem_res.adb (resolve): If an interpreation involves a discriminant with an implicit dereference and the expression is an entity, resolution takes place later in the appropriate routine. * sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize access discriminants that designate a subprogram type. 2017-01-20 Pascal Obry <obry@adacore.com> * a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016 From-SVN: r244698
2017-01-20Minor reformatting.Arnaud Charlet2-4/+4
From-SVN: r244697
2017-01-20[multiple changes]Arnaud Charlet10-31/+188
2017-01-20 Yannick Moy <moy@adacore.com> * sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error on implicitly with'ed units in GNATprove mode. * sinfo.ads (Implicit_With): Document use of flag for implicitly with'ed units in GNATprove mode. 2017-01-20 Ed Schonberg <schonberg@adacore.com> * sem_cat.adb (Validate_Static_Object_Name): In a preelaborated unit Do not report an error on a non-static entity that appears in the context of a spec expression, such as an aspect expression. 2017-01-20 Hristian Kirtchev <kirtchev@adacore.com> * einfo.adb: Flag298 now denotes Is_Underlying_Full_View. (Is_Underlying_Full_View): New routine. (Set_Is_Underlying_Full_View): New routine. (Write_Entity_Flags): Add an entry for Is_Underlying_Full_View. * einfo.ads Add new attribute Is_Underlying_Full_View. (Is_Underlying_Full_View): New routine along with pragma Inline. (Set_Is_Underlying_Full_View): New routine along with pragma Inline. * exp_util.adb (Build_DIC_Procedure_Body): Do not consider class-wide types and underlying full views. The first subtype is used as the working type for all Itypes, not just array base types. (Build_DIC_Procedure_Declaration): Do not consider class-wide types and underlying full views. The first subtype is used as the working type for all Itypes, not just array base types. * freeze.adb (Freeze_Entity): Inherit the freeze node of a full view or an underlying full view without clobbering the attributes of a previous freeze node. (Inherit_Freeze_Node): New routine. * sem_ch3.adb (Build_Derived_Private_Type): Mark an underlying full view as such. (Build_Underlying_Full_View): Mark an underlying full view as such. * sem_ch7.adb (Install_Private_Declarations): Mark an underlying full view as such. From-SVN: r244696
2017-01-20Revert previous change.Arnaud Charlet2-5/+4
From-SVN: r244695
2017-01-20[multiple changes]Arnaud Charlet3-5/+14
2017-01-20 Arnaud Charlet <charlet@adacore.com> * exp_ch3.adb: Reenable code. 2017-01-20 Yannick Moy <moy@adacore.com> * sinfo.ads: Document lack of Do_Division_Check flag on float exponentiation. From-SVN: r244693
2017-01-19Code cleanup.Arnaud Charlet1-1/+4
From-SVN: r244634
2017-01-19[multiple changes]Arnaud Charlet4-3/+28
2017-01-19 Javier Miranda <miranda@adacore.com> * ghost.adb (Propagate_Ignored_Ghost_Code): Protect access to the identifier attribute of a block-statement node. Required to avoid assertion failure when building the new containers library. 2017-01-19 Bob Duff <duff@adacore.com> * exp_ch3.adb: Update comment. 2017-01-19 Vincent Celier <celier@adacore.com> * gprep.adb (Gnatprep): Parse the definition file without "replace in comments" even when switch -C is used. From-SVN: r244633
2017-01-19Minor reformatting.Arnaud Charlet1-5/+10
From-SVN: r244632
2017-01-19exp_ch9.adb (Is_Pure_Barrier): Create function Is_Count_Attribute to ↵Justin Squirek2-0/+36
identify an expansion of the 'Count attribute. 2017-01-19 Justin Squirek <squirek@adacore.com> * exp_ch9.adb (Is_Pure_Barrier): Create function Is_Count_Attribute to identify an expansion of the 'Count attribute. From-SVN: r244631
2017-01-19[multiple changes]Arnaud Charlet3-10/+31
2017-01-19 Pierre-Marie de Rodat <derodat@adacore.com> * exp_dbug.adb (Debug_Renaming_Declaration): Process underlying types. Emit GNAT encodings for object renamings involving record components whose normalized bit offset is not null. * uintp.h (UI_No_Uint): Declare. 2017-01-19 Ed Schonberg <schonberg@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): In GNATprove mode the statements within an element iterator loop are only analyzed agter the loop is rewritten. Within a generic the analysis must be performed in any case to complete name capture. 2017-01-19 Bob Duff <duff@adacore.com> * sem_prag.adb (Analyze_Pragma): Check for ignored pragmas first, before checking for unrecognized pragmas. Initialize Pname on its declarations; that's always good style. From-SVN: r244630
2017-01-19exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the body into the ↵Claire Dross3-52/+114
tree for GNATprove by setting its Parent field. 2017-01-19 Claire Dross <dross@adacore.com> * exp_ch7.adb (Build_Invariant_Procedure_Body): Semi-insert the body into the tree for GNATprove by setting its Parent field. The components invariants of composite types are not checked by the composite type's invariant procedure in GNATprove mode. (Build_Invariant_Procedure_Declaration): Semi-insert the declaration into the tree for GNATprove by setting its Parent field. * freeze.adb (Freeze_Arry_Type):In GNATprove mode, do not add the component invariants to the array type invariant procedure so that the procedure can be used to check the array type invariants if any. (Freeze_Record_Type): In GNATprove mode, do not add the component invariants to the record type invariant procedure so that the procedure can be used to check the record type invariants if any. From-SVN: r244629