aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem.adb
AgeCommit message (Collapse)AuthorFilesLines
2011-08-29[multiple changes]Arnaud Charlet1-0/+1
2011-08-29 Matthew Heaney <heaney@adacore.com> * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check for sibling when common parent. 2011-08-29 Thomas Quinot <quinot@adacore.com> * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with "pragma_". 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions for the return type when in ASIS mode. 2011-08-29 Vincent Celier <celier@adacore.com> * make.adb (Gnatmake): Get the default search dirs, then the target parameters after getting the Builder switches, as the Builder switches may include --RTS= and that could change the default search dirs. 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of Make_Final_Call. Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. (Make_Final_Call): Move the processing for class-wide types before the processing for derivations from [Limited_]Controlled. * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check. Add code to account for alignments larger than the list header. Add a comment illustrating the structure of the allocated object + padding + header. (Deallocate_Any_Controlled): Add code to account for alignments larger than the list header. 2011-08-29 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo.adb: New node kind N_Formal_Incomplete_Type_Definition, related flags. par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition): Parse formal incomplete types. * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in sem_ch12. * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body): Formal incomplete types do not need completion. * sem_ch12.adb (Analyze_Formal_Incomplete_Type, Validate_Incomplete_Type_Instance): New procedures to handle formal incomplete types. * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual that corresponds to a formal incomplete type. * sprint.adb: Handle formal incomplete type declarations. * exp_util.adb (Insert_Actions): An incomplete_type_definition is not an insertion point. From-SVN: r178184
2011-08-04gnat_rm.texi: Document new pragma and aspect.Yannick Moy1-1/+2
2011-08-04 Yannick Moy <moy@adacore.com> * gnat_rm.texi: Document new pragma and aspect. * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case (No_Duplicates_Allowed): new constant array defining whether duplicates aspects of each kind can appear on the same declaration. * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract field, which points to a node holding the previous Spec_PPC_List. * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List through the indirection with Contract. * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node * par-prag.adb (Prag): do nothing on Test_Case pragma * sem.adb (Analyze): abort on N_Contract, on which Analyze should not be called directly. * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in component Ensures of Test_Case. * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb (Analyze_Generic_Subprogram_Declaration, Analyze_Subprogram_Instantiation, Analyze_Abstract_Subprogram_Declaration, Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Specification, Analyze_Entry_Declaration): insert contract in subprogram node at point of definition * sem_ch13.adb (Aspect_Loop): do not raise error on duplicate Test_Case aspect (Analyze_Aspect_Specifications): analyze Test_Case aspect and create corresponding pragma (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases, similar to the analysis of pre/post (Derive_Subprogram): insert contract in subprogram node at point of derivation. * sem_prag.adb, sem_prag.ads (Check_Arg_Is_String_Literal, Check_Identifier): new checking procedures to be called in treatment of pragmas (Check_Test_Case): new procedure to check that a Test_Case aspect or pragma is well-formed. This does not check currently that 'Result is used only in the Ensures component of a Test_Case. (Analyze_Pragma): add case for Test_Case (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures components of a Test_Case. (Preanalyze_TC_Args): new procedure to preanalyze the boolean expressions in the 3rd (and 4th if present) arguments of a Test_Case pragma, treated as spec expressions. (Sig_Flags): add value -1 for Test_Case. * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma, Get_Requires_From_Test_Case_Pragma): getters for both expression components of a Test_Case. * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as indirection between an entry or [generic] subprogram entity and its pre/post + test-cases. (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List): get/set for fields of an N_Contract node. * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode, Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new names and pragma for Test_Case. * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node From-SVN: r177384
2011-08-02[multiple changes]Arnaud Charlet1-3/+3
2011-08-02 Robert Dewar <dewar@adacore.com> * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb, sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized expression to expression function. 2011-08-02 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb: transform simple Ada2012 membership into equality only if types are compatible. 2011-08-02 Yannick Moy <moy@adacore.com> * sem_res.adb (Matching_Static_Array_Bounds): new function which returns True if its argument array types have same dimension and same static bounds at each index. (Resolve_Actuals): issue an error in formal mode on actuals passed as OUT or IN OUT paramaters which are not view conversions in SPARK. (Resolve_Arithmetic_Op): issue an error in formal mode on multiplication or division with operands of fixed point types which are not qualified or explicitly converted. (Resolve_Comparison_Op): issue an error in formal mode on comparisons of Boolean or array type (except String) operands. (Resolve_Equality_Op): issue an error in formal mode on equality operators for array types other than String with non-matching static bounds. (Resolve_Logical_Op): issue an error in formal mode on logical operators for array types with non-matching static bounds. Factorize the code in Matching_Static_Array_Bounds. (Resolve_Qualified_Expression): issue an error in formal mode on qualified expressions for array types with non-matching static bounds. (Resolve_Type_Conversion): issue an error in formal mode on type conversion for array types with non-matching static bounds From-SVN: r177089
2011-08-01Update header.Arnaud Charlet1-5/+4
From-SVN: r177044
2010-12-20Fix typos in gcc/ada.Ralf Wildenhues1-1/+1
gcc/ada/: * projects.texi: Fix typos. * gnat_rm.texi: Likewise. * gnat_ugn.texi: Likewise. * sem_util.adb: Fix typo in variable, typos in comments. * a-btgbso.adb: Fix typos in comments. * a-cbdlli.adb, a-cbhase.ads, a-cdlili.adb, a-cobove.adb, a-coinve.adb, a-convec.adb, a-direct.ads, a-strunb-shared.adb, a-strunb-shared.ads, a-stuten.ads, a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads, a-suenco.adb, a-suenst.adb, a-suewst.adb, a-suezst.adb, ali.ads, aspects.ads, atree.ads, binde.adb, bindgen.adb, checks.adb, checks.ads, einfo.ads, err_vars.ads, errout.adb, errout.ads, exp_aggr.adb, exp_attr.adb, exp_cg.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb, exp_dbug.ads, exp_disp.adb, exp_fixd.ads, freeze.adb, g-altive.ads, g-comlin.ads, g-excact.ads, g-mbdira.adb, g-sechas.ads, g-sehash.ads, g-sha1.ads, g-sha224.ads, g-sha256.ads, g-sha384.ads, g-sha512.ads, g-shsh32.ads, g-shsh64.ads, g-socket.adb, g-socket.ads, g-sothco.ads, gcc-interface/decl.c, gcc-interface/trans.c, gcc-interface/utils2.c, gnat1drv.adb, init.c, inline.adb, link.c, locales.c, make.adb, mingw32.h, namet.ads, osint.adb, par-ch12.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-prag.adb, par.adb, par_sco.adb, prepcomp.adb, prj-conf.ads, prj-dect.adb, prj-env.adb, prj-env.ads, prj-nmsc.adb, prj-tree.ads, prj-util.ads, prj.adb, prj.ads, s-auxdec-vms-alpha.adb, s-auxdec-vms_64.ads, s-oscons-tmplt.c, s-osinte-vxworks.ads, s-osprim-mingw.adb, s-regexp.adb, s-stusta.adb, s-taprop-mingw.adb, s-taprop-solaris.adb, scn.adb, scos.ads, sem.adb, sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb, sem_disp.ads, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb, sem_scil.adb, sem_util.ads, sem_warn.adb, sem_warn.ads, sinfo.ads, socket.c, styleg.adb, switch.ads, sysdep.c, tb-alvxw.c, xoscons.adb: Likewise. From-SVN: r168082
2010-10-22[multiple changes]Arnaud Charlet1-0/+3
2010-10-22 Robert Dewar <dewar@adacore.com> * sem_util.ads, sem_util.adb, sem_aux.ads, sem_aux.adb (Is_Generic_Formal): Moved from Sem_Util to Sem_Aux. 2010-10-22 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): New subprogram, implements new iterator forms over arrays and containers, in loops and quantified expressions. * exp_util.adb (Insert_Actions): include N_Iterator_Specification. * par-ch4.adb (P_Quantified_Expression): Handle iterator specifications. * par-ch5.adb (P_Iterator_Specification): New subprogram. Modify P_Iteration_Scheme to handle both loop forms. * sem.adb: Handle N_Iterator_Specification. * sem_ch5.adb, sem_ch5.ads (Analyze_Iterator_Specification): New subprogram. * sinfo.adb, sinfo.ads: New node N_Iterator_Specification. N_Iteration_Scheme can now include an Iterator_Specification. Ditto for N_Quantified_Expression. * snames.ads-tmpl: Add names Cursor, Element, Element_Type, No_Element, and Previous, to support iterators over predefined containers. * sprint.adb: Handle N_Iterator_Specification. From-SVN: r165811
2010-10-19[multiple changes]Arnaud Charlet1-0/+3
2010-10-19 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb, exp_ch4.ads (Expand_Quantified_Expression): New procedure * exp_util.adb (Insert_Actions): Include Quantified_Expression. * expander.adb: Call Expand_Qualified_Expression. * par.adb: New procedure P_Quantified_Expression. Make P_Loop_Parameter_Specification global for use in quantified expressions. * par-ch3.adb (P_Subtype_Mark_Resync): Allow "some" as an identifier if version < Ada2012. * par-ch4.adb: New procedure P_Quantified_Expression. * par-ch5.adb: P_Loop_Parameter_Specification is now global. * scans.adb, scans.ads: Introduce token Some. For now leave as unreserved. * scn.adb (Scan_Reserved_Identifier): For earlier versions of Ada, treat Some as a regular identifier. * sem.adb: Call Analyze_Quantified_Expression. * sem_ch4.adb, sem_ch4.ads: New procedure Analyze_Quantified_Expression. * sem_ch5.adb, sem_ch5.ads: Analyze_Iteration_Scheme is public, for use in quantified expressions. * sem_res.adb: New procedure Resolve_Qualified_Expression. * sinfo.adb, sinfo.ads: New node N_Quantified_Expression * snames.ads-tmpl: New name Some. * sprint.adb: Output quantified_expression. 2010-10-19 Robert Dewar <dewar@adacore.com> * a-exexda.adb: Minor reformatting Minor code reorganization. From-SVN: r165698
2010-10-11[multiple changes]Arnaud Charlet1-7/+7
2010-10-11 Robert Dewar <dewar@adacore.com> * aspects.ads, aspects.adb: Major revision of this package for 2nd stage of aspects implementation. * gcc-interface/Make-lang.in: Add entry for aspects.o * gcc-interface/Makefile.in: Add aspects.o to GNATMAKE_OBJS * par-ch13.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * par-ch3.adb (P_Type_Declaration): Handle aspect specifications (P_Derived_Type_Def_Or_Private_Ext_Decl): Handle aspect specifications (P_Identifier_Declarations): Handle aspect specifications (P_Component_Items): Handle aspect specifications (P_Subtype_Declaration): Handle aspect specifications * par-ch6.adb (P_Subprogram): Handle aspect specifications * par-ch9.adb (P_Entry_Declaration): Handle aspect specifications * par.adb (Aspect_Specifications_Present): New function (P_Aspect_Specifications): New procedure * sem.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_cat.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch11.adb (Analyze_Exception_Declaration): Analyze aspect specifications. * sem_ch12.adb (Analyze_Formal_Object_Declaration): Handle aspect specifications. (Analyze_Formal_Package_Declaration): New name (add _Declaration) (Analyze_Formal_Package_Declaration): Handle aspect specifications (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) (Analyze_Formal_Subprogram_Declaration): Handle aspect specifications (Analyze_Formal_Type_Declaration): Handle aspect specifications (Analyze_Generic_Package_Declaration): Handle aspect specifications (Analyze_Generic_Subprogram_Declaration): Handle aspect specifications (Analyze_Package_Instantiation): Handle aspect specifications (Analyze_Subprogram_Instantiation): Handle aspect specifications * sem_ch12.ads (Analyze_Formal_Package_Declaration): New name (add _Declaration). (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration) * sem_ch13.adb (Analyze_Aspect_Specifications): New procedure (Duplicate_Clause): New function, calls to this function are added to processing for all aspects. * sem_ch13.ads (Analyze_Aspect_Specifications): New procedure * sem_ch3.adb (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch3.ads (Analyze_Full_Type_Declaration): New name for Analyze_Type_Declaration. * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Analyze aspect specifications. (Analyze_Subprogram_Declaration): Analyze aspect specifications * sem_ch7.adb (Analyze_Package_Declaration): Analyze aspect specifications. (Analyze_Private_Type_Declaration): Analyze aspect specifications * sem_ch9.adb (Analyze_Protected_Type_Declaration): Analyze aspect specifications. (Analyze_Protected_Type_Declaration): New name (add _Declaration) (Analyze_Single_Protected_Declaration): Analyze aspect specifications (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): Analyze aspect specifications (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): Analyze aspect specifications (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_ch9.ads (Analyze_Protected_Type_Declaration): New name (add _Declaration). (Analyze_Single_Protected_Declaration): New name (add _Declaration) (Analyze_Single_Task_Declaration): New name (add _Declaration) (Analyze_Task_Type_Declaration): New name (add _Declaration) * sem_prag.adb: Use Get_Pragma_Arg systematically so that we do not have to generate unnecessary pragma argument associations (this matches the doc). Throughout do changes to accomodate aspect specifications, including specializing messages, handling the case of not going through all homonyms, and allowing for cancellation. * sinfo.ads, sinfo.adb: Clean up obsolete documentation for Flag1,2,3 (Aspect_Cancel): New flag (From_Aspect_Specification): New flag (First_Aspect): Removed flag (Last_Aspect): Removed flag * sprint.adb (Sprint_Aspect_Specifications): New procedure (Sprint_Node_Actual): Add calls to Sprint_Aspect_Specifications 2010-10-11 Bob Duff <duff@adacore.com> * sem_res.adb (Resolve_Actuals): Minor change to warning messages so they match in Ada 95, 2005, and 2012 modes, in the case where the language didn't change. Same thing for the run-time exception message. 2010-10-11 Javier Miranda <miranda@adacore.com> * debug.adb Document that switch -gnatd.p enables the CIL verifier. 2010-10-11 Robert Dewar <dewar@adacore.com> * s-htable.adb: Minor reformatting. From-SVN: r165299
2010-10-11[multiple changes]Arnaud Charlet1-0/+1
2010-10-11 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Do not emit error for AI05-0033 in CodePeer mode. 2010-10-11 Robert Dewar <dewar@adacore.com> * atree.h, atree.ads, atree.adb (Flag3): New flag (replaces Unused_1) * csinfo.adb: Aspect_Specifications is a new special field * einfo.adb (Flag3): New unused flag * exp_util.adb (Insert_Actions): Add processing for N_Aspect_Specification. * sem.adb: Add entry for N_Aspect_Specification. * sinfo.ads, sinfo.adb (N_Aspect_Specification): New node (Has_Aspect_Specifications): New flag (Permits_Aspect_Specifications): New function (Aspect_Specifications): New function (Set_Aspect_Specifications): New procedure * sprint.adb (Sprint_Node): Put N_At_Clause in proper alpha order (Sprint_Node): Add dummy entry for N_Aspect_Specification * treepr.adb (Flag3): New flag to be listed 2010-10-11 Vincent Celier <celier@adacore.com> * adaint.c: Minor reformatting. From-SVN: r165279
2010-10-07gnat_rm.texi, [...]: Change spelling parametrize(d) => parameterize(d).Robert Dewar1-2/+2
2010-10-07 Robert Dewar <dewar@adacore.com> * gnat_rm.texi, exp_util.adb, sinfo.adb, sinfo.ads, sem_ch12.adb, sem.adb, gnat_ugn.texi, sem_util.ads, par-ch6.adb, targparm.ads, restrict.adb, sem_ch6.adb, sem_ch6.ads, sprint.adb, i-c.ads: Change spelling parametrize(d) => parameterize(d). From-SVN: r165103
2010-10-07exp_util.adb (Insert_Actions): Add handling of N_Parametrized_Expression.Robert Dewar1-0/+3
2010-10-07 Robert Dewar <dewar@adacore.com> * exp_util.adb (Insert_Actions): Add handling of N_Parametrized_Expression. * par-ch6.adb (P_Subprogram): Add parsing of parametrized expression * sem.adb: Add entry for N_Parametrized_Expression * sem_ch6.adb (Analyze_Parametrized_Expression): New procedure * sem_ch6.ads (Analyze_Parametrized_Expression): New procedure * sinfo.ads, sinfo.adb: Add N_Parametrized_Expression * sprint.adb (Sprint_Node): Add handling for N_Parametrized_Expression * par-ch4.adb: Minor reformatting. From-SVN: r165098
2010-09-10sem.adb: Minor reformatting.Robert Dewar1-6/+5
2010-09-10 Robert Dewar <dewar@adacore.com> * sem.adb: Minor reformatting. From-SVN: r164190
2010-09-10[multiple changes]Arnaud Charlet1-2/+7
2010-09-10 Thomas Quinot <quinot@adacore.com> * scos.ads: Add comments. 2010-09-10 Vincent Celier <celier@adacore.com> * gnatcmd.adb (Get_Closure): Remove useless invocation of Close. 2010-09-10 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb, exp_ch6.adb (Expand_Call): Establish a transient scope for a controlled build-in-place function call which appears in an anonymous context. The transient scope ensures that the intermediate function result is cleaned up after the master is left. (Make_Build_In_Place_Call_In_Anonymous_Context): Remove the creation of the transient scope. This is now done in Exand_Call which covers additional cases other than secondary stack release. 2010-09-10 Arnaud Charlet <charlet@adacore.com> * sem.adb (Do_Unit_And_Dependents): Add guard. 2010-09-10 Robert Dewar <dewar@adacore.com> * exp_ch5.adb: Update comments. * exp_dist.adb: Minor reformatting. From-SVN: r164187
2010-09-10[multiple changes]Arnaud Charlet1-15/+43
2010-09-10 Ed Schonberg <schonberg@adacore.com> * sprint.adb (Sprint_Node_Actual, case N_Derived_Type_Definition): Do not reset Sloc when printing keyword "new". 2010-09-10 Vincent Celier <celier@adacore.com> * gnatcmd.adb (GNATCmd): Put the command line in environment variable GNAT_DRIVER_COMMAND_LINE. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Unit_And_Dependents): if Withed_Body is set on a context clause, process the body at once. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Type_Conversion): Do not warn on a redundant conversion is the expression is a qualified expression used to disambiguate a function call. 2010-09-10 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Add_Source): Allow an Ada source to have the same name as a source of another project and of another language. 2010-09-10 Robert Dewar <dewar@adacore.com> * prj-util.adb: Minor reformatting. From-SVN: r164159
2010-09-10[multiple changes]Arnaud Charlet1-43/+72
2010-09-10 Eric Botcazou <ebotcazou@adacore.com> * exp_disp.adb: Minor reformatting. 2010-09-10 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Analyze_Pragma): Ignore Inline_Always pragma in CodePeer mode. 2010-09-10 Thomas Quinot <quinot@adacore.com> * sem_res.adb: Minor reformatting. * exp_ch9.adb, rtsfind.ads, exp_ch4.adb, exp_ch3.adb: Do not hardcode magic constants for task master levels (instead, reference named numbers from System.Tasking). 2010-09-10 Eric Botcazou <ebotcazou@adacore.com> * gnatvsn.ads (Ver_Prefix): New constant string. * bindgen.adb (Gen_Output_File_Ada): Use it in lieu of hardcoded value. (Gen_Output_File_C): Likewise. * g-comver.adb (Ver_Prefix): Add cross-reference to Gnatvsn.Ver_Prefix in comment. 2010-09-10 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Items): Do not traverse children of the main unit, to prevent spurious circularities in the walk order. (Depends_On_Main): Use elsewhere to prevent circularities when the body of an ancestor of the main unit depends on a child of the main unit. From-SVN: r164157
2010-09-09[multiple changes]Arnaud Charlet1-2/+34
2010-09-09 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Items): Traverse context of subunits of the main unit. (Is_Subunit_Of_Main): Handle null nodes properly. 2010-09-09 Robert Dewar <dewar@adacore.com> * par-ch2.adb: Update comments. From-SVN: r164083
2010-09-09[multiple changes]Arnaud Charlet1-5/+5
2010-09-09 Ed Schonberg <schonberg@adacore.com> * exp_ch3.adb (Build_Untagged_Equality): Do not set alias of implicit inequality, it is always rewritten as the negation of the corresponding equality operation. * exp_ch8.adb (Expand_N_Subprogram_Renaming): If the subprogram renames the predefined equality of an untagged record, create a body at the point of the renaming, to capture the current meaning of equality for the type. 2010-09-09 Robert Dewar <dewar@adacore.com> * sem.adb, sem_warn.adb: Minor reformatting. From-SVN: r164064
2010-09-09[multiple changes]Arnaud Charlet1-3/+5
2010-09-09 Ed Schonberg <schonberg@adacore.com> * sem_ch6.adb: Improve error message on untagged equality. * sem.adb (Semantics): Include subprogram bodies that act as spec. 2010-09-09 Javier Miranda <miranda@adacore.com> * sem_ch13.adb, exp_ch13.adb: Undo previous change, unneeded. From-SVN: r164062
2010-09-09[multiple changes]Arnaud Charlet1-1/+1
2010-09-09 Robert Dewar <dewar@adacore.com> * par-ch4.adb (Box_Error): New procedure. 2010-09-09 Thomas Quinot <quinot@adacore.com> * sem.adb: Minor reformatting. 2010-09-09 Pascal Obry <obry@adacore.com> * prj-env.adb: Style fix, use /and then/ and /or else/. * gnat_ugn.texi: Fix typos. From-SVN: r164053
2010-08-05[multiple changes]Arnaud Charlet1-3/+25
2010-08-05 Robert Dewar <dewar@adacore.com> * gnat1drv.adb: Minor reformatting. 2010-08-05 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Unit_And_Dependents): If some parent unit is an instantiation, process its body before the spec of the main unit, because it may contain subprograms invoked in the spec of main. * einfo.ads: Add documention of delayed freeze. 2010-08-05 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Process_Linker): Take into account new values for attribute Response_File_Format. * prj.ads (Response_File_Format): New enumeration values GCC_GNU, GCC_Object_List and GCC_Option_List. 2010-08-05 Ed Schonberg <schonberg@adacore.com> * exp_ch4.adb (Expand_N_Selected_Component): Do not constant-fold a selected component that denotes a discriminant if it is the discriminant of a component of an unconstrained record type. From-SVN: r162908
2010-08-05sem.adb: Minor reformattingArnaud Charlet1-5/+4
* sem.adb: Minor reformatting * sem_ch4.adb (Analyze_Reference): Disable error message in CodePeer mode, not useful. From-SVN: r162901
2010-06-23[multiple changes]Arnaud Charlet1-54/+60
2010-06-23 Thomas Quinot <quinot@adacore.com> * exp_attr.adb (Expand_Access_To_Protected_Op): When rewriting a reference to a protected subprogram outside of the protected's scope, ensure the corresponding external subprogram is frozen before the reference. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_prag.adb: Fix typo in error message. * sem.adb: Refine previous change. 2010-06-23 Robert Dewar <dewar@adacore.com> * impunit.adb, a-suewen.adb, a-suewen.ads, a-suenco.adb, a-suenco.ads, a-suezen.adb, a-suezen.ads, a-stuten.adb, a-stuten.ads, Makefile.rtl: Implement Ada 2012 string encoding packages. 2010-06-23 Arnaud Charlet <charlet@adacore.com> * a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads, a-swunau-shared.adb, a-swuwti-shared.adb, a-szunau-shared.adb, a-szuzti-shared.adb: New files. * gcc-interface/Makefile.in: Enable use of above files. From-SVN: r161277
2010-06-23[multiple changes]Arnaud Charlet1-4/+7
2010-06-23 Thomas Quinot <quinot@adacore.com> * sem_util.adb, sem_util.ads: Minor reformatting. 2010-06-23 Vincent Celier <celier@adacore.com> * prj.ads (Gprclean_Flags.Missing_Source_Files): Set to Error to keep the previous behavior of gprclean when there are missing files. 2010-06-23 Ed Schonberg <schonberg@adacore.com> * sem_ch12.adb (Load_Body_Of_Generic): In CodePeer mode, a missing generic body is not a fatal error. (Mark_Context): Handle properly names of child units. * sem.adb (Walk_Library_Items.Do_Action): Remove assertion on instantiations. 2010-06-23 Vincent Celier <celier@adacore.com> * ali.adb (Scan_ALI): When ignoring R lines, do not skip the next non-empty line. 2010-06-23 Bob Duff <duff@adacore.com> * g-pehage.ads, g-pehage.adb: Switch default optimization mode to Memory_Space, because CPU_Time doesn't seem to provide any significant speed advantage in practice. Cleanup: Get rid of constant Default_Optimization; doesn't seem to add anything. Use case statements instead of if statements; seems cleaner. From-SVN: r161259
2010-06-23[multiple changes]Arnaud Charlet1-5/+3
2010-06-23 Robert Dewar <dewar@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Properly handle checking returns in generic case. (Check_Missing_Return): New procedure. 2010-06-23 Robert Dewar <dewar@adacore.com> * bindgen.adb, switch-b.adb: Minor reformatting. 2010-06-23 Javier Miranda <miranda@adacore.com> * frontend.adb (Frontend): Add call to initialize the new package SCIL_LL. * exp_ch7.adb (Wrap_Transient_Expression): Remove call to Adjust_SCIL_Node. (Wrap_Transient_Statement): Remove call to Adjust_SCIL_Node. * sem_ch5.adb (Analyze_Iteration_Scheme.Process_Bounds): Remove call to Adjust_SCIL_Node. * exp_util.adb (Insert_Actions): Remove code for N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. (Remove_Side_Effects): Remove calls to Adjust_SCIL_Node. * sinfo.adb (SCIL_Entity, SCIL_Tag_Value): Remove checks on N_SCIL_Tag_Init and N_SCIL_Dispatch_Table_Object_Init in the assertion. (SCIL_Related_Node, Set_SCIL_Related_Node): Removed. * sinfo.ads (SCIL_Related_Node): Field removed. (N_SCIL_Dispatch_Table_Object_Init): Node removed. (N_SCIL_Tag_Init): Node removed. * sem_scil.ads, sem_scil.adb (Adjust_SCIL_Node): Removed. (Check_SCIL_Node): New implementation. (Find_SCIL_Node): Removed. * sem.adb (Analyze): Remove management of N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. * sem_util.adb (Insert_Explicit_Dereference): Remove call to Adjust_SCIL_Node. * exp_ch4.adb (Expand_N_In): Code cleanup: remove call to Set_SCIL_Related_Node and avoid adding the SCIL node before the referenced node using Insert_Action because this is not longer required. (Expand_Short_Circuit_Operator): Remove call to SCIL node. * exp_ch6.adb (Expand_Call): Remove call to Adjust_SCIL_Node. * sem_ch4.adb (Analyze_Type_Conversion): Remove call to Adjust_SCIL_Node * exp_disp.adb (Expand_Dispatching_Call): Minor code reorganization because we no longer require to generate the SCIL node before the call. (Make_DT): Remove generation of SCI_Dispatch_Table_Object_Init node. Remove calls to Set_SCIL_Related_Node and avoid adding the SCIL nodes before the referenced node using Insert_Action because this is not longer required. * atree.adb (Allocate_Initialize_Node, Replace, Rewrite): Add call to update the SCIL_Node field. * sprint.adb (Sprint_Node_Actual): Remove code for N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes. * treepr.adb (Print_Node): Print the SCIL node field (if available). * exp_ch3.adb (Build_Init_Procedure): Remove generation of SCIL_Tag_Init nodes. * scil_ll.ads, scil_ll.adb: New files. From-SVN: r161244
2010-06-23sem_ch6.adb, [...]: Minor reformatting.Robert Dewar1-5/+1
2010-06-23 Robert Dewar <dewar@adacore.com> * sem_ch6.adb, exp_ch4.adb, s-rannum.ads, sem.adb, sem_ch12.adb: Minor reformatting. Add comments. * errout.adb (Finalize): Properly adjust warning count when deleting continuations. From-SVN: r161242
2010-06-22[multiple changes]Arnaud Charlet1-1/+17
2010-06-22 Robert Dewar <dewar@adacore.com> * errout.adb (Finalize): Set Prev pointers. (Finalize): Delete continuations for deletion by warnings off(str). * erroutc.ads: Add Prev pointer to error message structure. 2010-06-22 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Unit_And_Dependents): If the spec of the main unit is a child unit, examine context of parent units to locate instantiated generics whose bodies may be needed. * sem_ch12.adb: (Mark_Context): if the enclosing unit does not have a with_clause for the instantiated generic, examine the context of its parents, to set Withed_Body flag, so that it can be visited earlier. * exp_ch4.adb (Expand_N_Op_Not): If this is a VMS operator applied to an unsigned type, use a type of the proper size for the intermediate value, to prevent alignment problems on unchecked conversion. 2010-06-22 Geert Bosch <bosch@adacore.com> * s-rannum.ads Change Generator type to be self-referential to allow Random to update its argument. Use "in" mode for the generator in the Reset procedures to allow them to be called from the Ada.Numerics packages without tricks. * s-rannum.adb: Use the self-referencing argument to get write access to the internal state of the random generator. * a-nudira.ads: Make Generator a derived type of System.Random_Numbers.Generator. * a-nudira.adb: Remove use of 'Unrestricted_Access. Put subprograms in alpha order and add headers. * g-mbdira.ads: Change Generator type to be self-referential. * g-mbdira.adb: Remove use of 'Unrestricted_Access. From-SVN: r161215
2010-06-18checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression ↵Robert Dewar1-1/+5
(cannot count on a particular branch being executed). 2010-06-18 Robert Dewar <dewar@adacore.com> * checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression (cannot count on a particular branch being executed). * exp_ch4.adb (Expand_N_Case_Expression): New procedure. * exp_ch4.ads (Expand_N_Case_Expression): New procedure. * exp_util.adb (Insert_Actions): Deal with proper insertion of actions within case expression. * expander.adb (Expand): Add call to Expand_N_Case_Expression * par-ch4.adb Add calls to P_Case_Expression at appropriate points (P_Case_Expression): New procedure (P_Case_Expression_Alternative): New procedure * par.adb (P_Case_Expression): New procedure * par_sco.adb (Process_Decisions): Add dummy place holder entry for N_Case_Expression. * sem.adb (Analyze): Add call to Analyze_Case_Expression * sem_case.ads (Analyze_Choices): Also used for case expressions now, this is a documentation change only. * sem_ch4.ads, sem_ch4.adb (Analyze_Case_Expression): New procedure. * sem_ch6.adb (Fully_Conformant_Expressions): Add handling of case expressions. * sem_eval.ads, sem_eval.adb (Eval_Case_Expression): New procedure. * sem_res.adb (Resolve_Case_Expression): New procedure. * sem_scil.adb (Find_SCIL_Node): Add processing for N_Case_Expression_Alternative. * sinfo.ads, sinfo.adb (N_Case_Expression): New node. (N_Case_Expression_Alternative): New node. * sprint.adb (Sprint_Node_Actual): Add processing for new nodes N_Case_Expression and N_Case_Expression_Alternative. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-ch7.adb, sem_warn.adb, types.ads, par-ch3.adb: Minor reformatting. * gnat1drv.adb: Fix typo. 2010-06-18 Robert Dewar <dewar@adacore.com> * par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style for -gnatg. * sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets gnat style for -gnatg. * gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode. From-SVN: r160971
2010-06-17[multiple changes]Arnaud Charlet1-1/+4
2010-06-17 Robert Dewar <dewar@adacore.com> * exp_ch4.ads: Minor code reorganization (specs in alpha order). 2010-06-17 Robert Dewar <dewar@adacore.com> * debug.adb: New debug flag -gnatd.X to use Expression_With_Actions node when expanding short circuit form with actions present for right opnd. * exp_ch4.adb: Minor reformatting (Expand_Short_Circuit_Operator): Use new Expression_With_Actions node if right opeand has actions present, and debug flag -gnatd.X is set. * exp_util.adb (Insert_Actions): Handle case of Expression_With_Actions node. * nlists.adb (Prepend_List): New procedure (Prepend_List_To): New procedure * nlists.ads (Prepend_List): New procedure (Prepend_List_To): New procedure * sem.adb: Add processing for Expression_With_Actions * sem_ch4.adb (Analyze_Expression_With_Actions): New procedure * sem_ch4.ads (Analyze_Expression_With_Actions): New procedure * sem_res.adb: Add processing for Expression_With_Actions. * sem_scil.adb: Add processing for Expression_With_Actions * sinfo.ads, sinfo.adb (N_Expression_With_Actions): New node. * sprint.ads, sprint.adb: Add processing for Expression_With_Actions 2010-06-17 Doug Rupp <rupp@adacore.com> * sem_intr.adb (Check_Intrinsic_Operator): Check that the types involved both have underlying integer types. * exp_intr.adb (Expand_Binary_Operator) New subprogram to expand a call to an intrinsic operator when the operand types or sizes are not identical. * s-auxdec-vms_64.ads: Revert "+" "-" ops back to Address now that 64/32 Address/Integer works. From-SVN: r160929
2010-06-17[multiple changes]Arnaud Charlet1-0/+12
2010-06-17 Robert Dewar <dewar@adacore.com> * sem_util.adb: Minor reformatting 2010-06-17 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Withed_Unit): if the unit in the with_clause is a generic instance, the clause now denotes the instance body. Traverse the corresponding spec because there may be no other dependence that will force the traversal of its own context. From-SVN: r160925
2010-06-14[multiple changes]Arnaud Charlet1-1/+1
2010-06-14 Robert Dewar <dewar@adacore.com> * sem.adb, sem_ch12.adb, sem_util.adb: Minor reformatting and comment addition. 2010-06-14 Arnaud Charlet <charlet@adacore.com> * lib-xref.ads: Doc updates: - Allocate 'Q' for #include entity kind - Free 'Z' - Allocate 'g' for regular macros - Allocate 'G' for function-like macros From-SVN: r160726
2010-06-14[multiple changes]Arnaud Charlet1-0/+6
2010-06-14 Ed Schonberg <schonberg@adacore.com> * sinfo.ads, sinfo,adb (Withed_Body): New attribute of a with_clause. Indicates that there is an instantiation in the current unit that loaded the body of the unit denoted by the with_clause. * sem_ch12.adb (Mark_Context): When instanting a generic body, check whether a with_clause in the current context denotes the unit that holds the generic declaration, and mark the with_clause accordingly. (Instantiate_Package_Body): call Mark_Context. * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine whether a given body should be traversed before the spec of the main unit. 2010-06-14 Ed Falis <falis@adacore.com> * sysdep.c: Fix 653 build against vThreads headers From-SVN: r160725
2010-06-14[multiple changes]Arnaud Charlet1-1/+0
2010-06-14 Robert Dewar <dewar@adacore.com> * opt.ads, sem.adb, sem_elab.adb: Minor reformatting 2010-06-14 Robert Dewar <dewar@adacore.com> * exp_aggr.adb (Has_Address_Clause): Moved to Exp_Util, and there it is renamed as Has_Following_Address_Clause. * exp_ch3.adb (Needs_Simple_Initialization): Add Consider_IS argument to allow the caller to avoid Initialize_Scalars having an effect. (Expand_N_Object_Declaration): Do not do Initialize_Scalars stuff for scalars with an address clause specified. * exp_ch3.ads (Needs_Simple_Initialization): Add Consider_IS argument to allow the caller to avoid Initialize_Scalars having an effect. * exp_util.adb (Has_Following_Address_Clause): Moved here from Exp_Aggr (where it was called Has_Address_Clause). * exp_util.ads (Has_Following_Address_Clause): Moved here from Exp_Aggr (where it was called Has_Address_Clause). * freeze.adb (Warn_Overlay): Suppress message about overlaying causing problems for Initialize_Scalars (since we no longer initialize objects with an address clause. 2010-06-14 Robert Dewar <dewar@adacore.com> * exp_prag.adb (Expand_Pragma_Check): Set Loc of generated code from condition. 2010-06-14 Gary Dismukes <dismukes@adacore.com> * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed on the entity of an implicitly generated postcondition procedure. 2010-06-14 Thomas Quinot <quinot@adacore.com> * sem_ch7.adb (Preserve_Full_Attributes): Propagate Discriminant_Constraint elist from full view to private view. From-SVN: r160720
2010-06-14[multiple changes]Arnaud Charlet1-110/+168
2010-06-14 Robert Dewar <dewar@adacore.com> * sem_res.adb: Minor reformatting 2010-06-14 Ed Schonberg <schonberg@adacore.com> * sem.adb: New version of unit traversal. * sem_elab.adb (Check_Internal_Call): Do not place a call appearing within a generic unit in the table of delayed calls. From-SVN: r160718
2009-11-30[multiple changes]Arnaud Charlet1-0/+1
2009-11-30 Vincent Celier <celier@adacore.com> * gnatlink.adb (Process_Args): Call Executable_Name on argument of -o with Only_If_No_Suffix set to True. * osint.adb (Executable_Name): Do not add executable suffix if there is already a suffix and Only_If_No_Suffix is True. * osint.ads (Executable_Name): New Boolean parameter Only_If_No_Suffix, defaulted to False. 2009-11-30 Javier Miranda <miranda@adacore.com> * exp_atag.adb (Build_TSD): Change argument name because the actual is now the address of a tag (instead of the tag). Update implementation accordingly. (Build_CW_Membership): New implementation. Converted into a procedure because it has an additional out mode parameter. Its implementation has been rewritten to improve the generated code but also to facilitate referencing the relocated object node in the caller. * exp_atag.ads (Build_CW_Membership): Update profile and documentation. * sinfo.ads (N_SCIL_Membership_Test) New_Node. (SCIL_Tag_Value): New field of N_SCIL_Membership_Test nodes. (Is_Syntactic_Field): Add entry of new node. (SCIL_Tag_Value/Set_SCIL_Tag_Value): New subprograms. * sinfo.adb (SCIL_Related_Node, SCIL_Entity): Update assertions to handle N_SCIL_Membership_Test nodes. (SCIL_Tag_Value/Set_SCIL_Tag_Value): New subprograms. * sem.adb (Analyze): Add null management for new node. * sem_scil.adb (Find_SCIL_Node): Add null management for new node. (Check_SCIL_Node): Add checks of N_SCIL_Membership_Test nodes. * exp_ch4.adb (Tagged_Membership): Change profile from function to procedure. Add generation of SCIL node associated with class-wide membership test. (Expand_N_In): Complete decoration of SCIL nodes. * exp_intr.adb (Expand_Dispatching_Constructor_Call): Tune call to Build_CW_Membership because its profile has been changed. * exp_util.adb (Insert_Actions): Add null management for new node. * sprint.adb (Sprint_Node_Actual): Handle new node. * gcc-interface/trans.c Add no processing for N_SCIL_Membership_Test nodes. * gcc-interface/Make-lang.in: Update dependencies. 2009-11-30 Ed Schonberg <schonberg@adacore.com> * opt.ads: New flags Init_Or_Norm_Scalars_Config, Initialize_Scalars_Config, to capture the presence of the corresponding pragmas in a configuration file. * opt.adb (Register_, Save_, Set_, Restore_Opt_Configuration_Switches): handle new flags so that they are restored for each compilation unit. * frontend.adb: At the end of compilation, scan the context of the main unit to recover occurrences of pragma Initialize_Scalars, to annotate the ALI file accordingly. From-SVN: r154792
2009-08-07[multiple changes]Arnaud Charlet1-3/+1
2009-08-07 Thomas Quinot <quinot@adacore.com> * targparm.adb: Minor reformatting * sem.adb: Minor reformatting * exp_ch4.adb (Expand_N_Conditional_Expression): Add comment. 2009-08-07 Emmanuel Briot <briot@adacore.com> * prj-conf.adb: Remove duplicate directory separator in the output when an object directory does not exist. 2009-08-07 Robert Dewar <dewar@adacore.com> * exp_util.adb: Minor reformatting 2009-08-07 Vincent Celier <celier@adacore.com> * mlib-prj.adb (Build_Library): Fixed bug in name of ALI file (wrong length used). 2009-08-07 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Protected_Type_Declaration): In Ravenscar mode, detect non-static private components that will violate restriction No_Implicit_Heap_Allocation. 2009-08-07 Ben Brosgol <brosgol@adacore.com> * gnat_ugn.texi: Edited Rule Exemption section of gnatcheck chapter. From-SVN: r150562
2009-07-29sem_ch3.ads, [...] (Add_Internal_Interface_Entities): Routine moved from the ↵Javier Miranda1-1/+1
expander to the semantic analyzer to allow the... 2009-07-29 Javier Miranda <miranda@adacore.com> * sem_ch3.ads, sem_ch3.adb (Add_Internal_Interface_Entities): Routine moved from the expander to the semantic analyzer to allow the generation of these internal entities when compiling with no code generation. Required by ASIS. * sem.adb (Analyze): Add processing for N_Freeze_Entity nodes. * sem_ch13.ads, sem_ch13.adb (Analyze_Freeze_Entity): New subprogram. * exp_ch3.adb (Add_Internal_Interface_Entities): Moved to sem_ch3 (Expand_Freeze_Record_Type): Remove call to Add_Internal_Interface_Entities because this routine is now called at early stage --when the freezing node is analyzed. From-SVN: r150205
2009-07-28gnat1drv.adb (Adjust_Global_Switches): Disable generation of SCIL nodes if ↵Javier Miranda1-0/+12
we are not generating code. 2009-07-28 Javier Miranda <miranda@adacore.com> * gnat1drv.adb (Adjust_Global_Switches): Disable generation of SCIL nodes if we are not generating code. * frontend.adb (Check_SCIL_Node): New subprogram. Used to check attribute SCIL_Related_Node of SCIL dispatching nodes. (Check_SCIL_Nodes): New instantiation of Traverse_Proc. * sinfo.ads (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Entity): Update documentation. (SCIL_Related_Node): Update documentation. (SCIL_Controlling_Tag): New attribute. (SCIL_Target_Prim): Update documentation. (N_Null_Statement): Remove attributes associated with SCIL nodes. (N_SCIL_Dispatch_Table_Object_Init): New node. (N_SCIL_Dispatch_Table_Tag_Init): New node. (N_SCIL_Dispatching_Call): New node. (N_SCIL_Tag_Init): New node. * sinfo.adb (Is_SCIL_Node,Set_Is_SCIL_Node): Removed (SCIL_Nkind,Set_SCIL_Nkind): Removed. (SCIL_Controlling_Tag/Set_SCIL_Controlling_Tag): New subprogram. (SCIL_Entity,Set_SCIL_Entity): Applicable only to SCIL nodes. (SCIL_Related_Node,Set_SCIL_Related_Node): Applicable only to SCIL nodes (SCIL_Target_Prim,Set_SCIL_Target_Prim): Applicable only to N_SCIL_Dispatching_Call nodes. * sem.adb (Analyze): No need to analyze SCIL nodes. * sem_aux.ads, sem_aux.adb (First_Non_SCIL_Node): New subprogram (Next_Non_SCIL_Node): New subprogram * sem_ch4.adb (Analyze_Type_Conversion): Adjust relocated SCIL dispatching nodes. * sem_ch5.adb (Analyze_Iteration_Scheme): Adjust relocated SCIL dispatching node. * sem_util.adb (Insert_Explicit_Dereference): Adjust relocated SCIL dispatching node. * exp_ch3.adb (Build_Array_Init_Proc): Skip SCIL nodes when processing null statement nodes. (Build_Init_Procedure): Generate new SCIL node. * exp_ch4.adb (Expand_N_And_Then): Adjust relocated SCIL dispatching node. * exp_ch6.adb (Is_Null_Procedure): Skip SCIL nodes. Required because they are currently implemented as special N_Null_Statement nodes. * exp_ch7.adb (Wrap_Transient_Statement): If the relocated node is a procedure call then check if some SCIL node references it and needs readjustment. * exp_disp.ads (SCIL_Node_Kind): Removed. (Adjust_SCIL_Node): New subprogram. (Find_SCIL_Node): New subprogram. (Get_SCIL_Node_Kind): Removed. (New_SCIL_Node): Removed. * exp_disp.adb (Adjust_SCIL_Node): New subprogram (Expand_Dispatching_Call): Generate new SCIL dispatching node including decoration of its new controlling_tag attribute. (Get_SCIL_Node_Kind): Removed. (Find_SCIL_Node): New subprogram. (Make_Secondary_DT): Generate new SCIL nodes. (Make_Tags): Generate new SCIL nodes. (New_SCIL_Node): Removed. * exp_util.adb (Insert_Actions): Handle SCIL nodes. (Remove_Side_Effects): Check if relocated nodes require readjustment of some SCIL dispatching node. * gcc-interface/trans.c (gnat_to_gnu): Do nothing with new SCIL nodes. From-SVN: r150149
2009-07-27[multiple changes]Ed Schonberg1-1/+1
2009-07-27 Ed Schonberg <schonberg@adacore.com> * sem_eval.adb (Compile_Time_Compare): More precise handling of Known_Valid flag, to prevent spurious range deductions when scalar variables may be uninitialized. New predicate Is_Known_Valid_Operand. 2009-07-27 Robert Dewar <dewar@adacore.com> * sem.adb: Minor reformatting From-SVN: r150118
2009-07-27gnatfind.adb, [...]: Minor reformatting and code clean up.Robert Dewar1-7/+8
2009-07-27 Robert Dewar <dewar@adacore.com> * gnatfind.adb, osint.ads, sem.adb, xr_tabls.adb: Minor reformatting and code clean up. From-SVN: r150117
2009-07-27exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in ↵Ed Schonberg1-1/+9
Ravenscar mode. 2009-07-27 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not attempt expansion in Ravenscar mode. Error has already been posted on specification. * sem.adb: Further code clean ups. From-SVN: r150116
2009-07-27[multiple changes]Arnaud Charlet1-2/+21
2009-07-27 Robert Dewar <dewar@adacore.com> * g-sse.ads: Minor reformatting 2009-07-27 Arnaud Charlet <charlet@adacore.com> * xref_lib.adb (Add_Xref_File_Internal, Find_ALI_Files): Add support for alternate ali extension. * xr_tabls.adb (ALI_File_Name, Get_File, Set_Unvisited): Take into account Osint.ALI_Suffix. * osint.ads (ALI_Suffix): Make visible. * gnatfind.adb (Gnatfind): Add support for --ext= switch. * gnat_ugn.texi: Document new gnatfind --ext= switch. 2009-07-27 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Items): If main unit is an instance body, do its spec first. 2009-07-27 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Expand_Dispatching_Call): Generate the SCIL node after the dispatching call has is expanded. From-SVN: r150115
2009-07-27[multiple changes]Arnaud Charlet1-69/+67
2009-07-27 Ed Schonberg <schonberg@adacore.com> * exp_attr.adb (Expand_Attribute_Reference, case 'Valid): Reset the Is_Known_Valid flag on the temporary created for the value whose validity is being checked. * sem.adb (Do_Unit_And_Dependents): Further code reorganization to handle properly main units that are package specifications. 2009-07-27 Geert Bosch <bosch@adacore.com> * einfo.ads (Checks_May_Be_Suppressed): Fix typo in comment * sem_aux.ads: Fix typo in comment * sem_util.ads (Is_LHS): Adjust comment to match body 2009-07-27 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi (gnatcheck Complex_Inlined_Subprograms rule): Update rule definition. 2009-07-27 Olivier Hainque <hainque@adacore.com> * g-sse.ads, g-ssvety.ads: Update comments. From-SVN: r150113
2009-07-23[multiple changes]Arnaud Charlet1-0/+8
2009-07-23 Ed Schonberg <schonberg@adacore.com> * sem.adb (Do_Unit_And_Dependents): Now that specs and bodies are not done at the same time, guard against listing a body more than once. 2009-07-23 Robert Dewar <dewar@adacore.com> * exp_ch6.adb: Minor reformatting 2009-07-23 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Analyze_Object_Declaration): A scalar constant with a static expression is known valid. * sem_eval.adb (Compile_Time_Compare): Handle properly non-static operands of a subtype with a single value. From-SVN: r150009
2009-07-23sem.adb (Do_Units_And_Dependents): Process bodies only for units that are in ↵Ed Schonberg1-46/+40
the context of the main unit body. * sem.adb (Do_Units_And_Dependents): Process bodies only for units that are in the context of the main unit body. From-SVN: r150008
2009-07-23[multiple changes]Arnaud Charlet1-10/+51
2009-07-23 Olivier Hainque <hainque@adacore.com> * g-ssinty.ads: New unit. GNAT.SSE.Internal_Types. Factorize low level internal type definitions for distinct higher level binding development activities (user type definitions and operations). * gnat_rm.texi: Document it. * g-ssvety.ads: Use it. * gcc-interface/Makefile.in: (x86 32/64 linux, cygwin32 sections): Add g-ssinty.o to EXTRA_GNATRTL_NONTASKING_OBJS. * gcc-interface/utils.c (gnat_internal_attribute_table): Add entry for the "may_alias" attribute. 2009-07-23 Thomas Quinot <quinot@adacore.com> * scos.ads: Minor typo fix * gcc-interface/decl.c (validate_alignment): For the case of an implicit array base type, look for alignment clause on first subtype. Code clean up. 2009-07-23 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Units): Handle properly the case where a unit in the context depends on the spec of the main unit, by delaying processing of the main unit body until all other units have been processed. From-SVN: r149993
2009-07-13[multiple changes]Arnaud Charlet1-1/+1
2009-07-13 Robert Dewar <dewar@adacore.com> * gnat_ugn.texi: The gnatf switch no longer is needed to get full details on unsupported constructs. * rtsfind.adb: Remove references to All_Errors_Mode, give errors unconditionally. * s-trafor-default.adb: Correct some warnings * s-valwch.adb, a-calend.adb, freeze.adb, prj.ads, s-vmexta.adb, sem.adb, sem_ch10.adb, sem_ch6.adb, sem_disp.adb, vxaddr2line.adb: Minor reformatting. * par-ch4.adb (Conditional_Expression): Capture proper location for conditional expression, should point to IF. * s-tassta.adb, a-wtdeau.adb, s-tasren.adb, s-arit64.adb, s-imgdec.adb, s-direio.adb, s-tpobop.adb, g-socket.adb, s-tposen.adb, s-taskin.adb, g-calend.adb, s-regpat.adb, s-scaval.adb, g-catiio.adb: Minor code reorganization (use conditional expressions). 2009-07-13 Ed Schonberg <schonberg@adacore.com> * exp_util.adb (Remove_Side_Effects): If the expression is a call to a build-in-place function that returns an inherently limited type (not just a task type) create proper object declaration so that extra build-in-place actuals are properly added to the call. From-SVN: r149551
2009-06-20[multiple changes]Arnaud Charlet1-30/+27
2009-06-20 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Units): Check instantiations first. * sem_ch6.adb (Analyze_Subprogram_Declaration): Mark a subprogram as a private primitive if it is a function with a controlling result that is a type extension with progenitors. * exp_ch9.adb (Build_Wrapper_Spec, Build_Wrapper_Body): Handle properly a primitive operation of a synchronized tagged type that has a controlling result. 2009-06-20 Thomas Quinot <quinot@adacore.com> * einfo.ads: Fix typo. 2009-06-20 Ed Falis <falis@adacore.com> * s-vxwext.ads, s-vxwext-kernel.adb: Complete previous change. From-SVN: r148743
2009-06-19[multiple changes]Arnaud Charlet1-5/+5
2009-06-19 Robert Dewar <dewar@adacore.com> * sem_type.ads, sem_ch12.adb: Minor reformatting * s-wchcnv.adb (UTF_32_To_Char_Sequence): Handle invalid data properly 2009-06-19 Ed Schonberg <schonberg@adacore.com> * exp_ch9.adb (Build_Wrapper_Spec): Handle properly an overridden primitive operation of a rivate extension whose controlling argument is an out parameter. * sem.adb (Walk_Library_Units): exclude generic package declarations from check. From-SVN: r148696
2009-06-19sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse...Arnaud Charlet1-17/+21
* sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse, to account for front-end inlining and instantiations in a spec or in the main unit. From-SVN: r148695
2009-06-19[multiple changes]Arnaud Charlet1-12/+21
2009-06-19 Jose Ruiz <ruiz@adacore.com> * env.c (__gnat_environ): RTX does not support this functionality. 2009-06-19 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi, vms_data.ads: Fix VMS qualifiers. 2009-06-19 Ed Schonberg <schonberg@adacore.com> * sem.adb (Walk_Library_Items): Include bodies in the list of units to traverse, to account for front-end inlining and instantiations in a spec or in the main unit. 2009-06-19 Robert Dewar <dewar@adacore.com> * checks.adb (Determine_Range): Do not attempt to get range of generic type. From-SVN: r148693