aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2020-06-08[Ada] Remove processing of SPARK_05 restrictionArnaud Charlet31-2587/+36
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_aggr.adb, exp_ch6.adb, par-ch11.adb, par-ch6.adb, par-ch7.adb, par-prag.adb, restrict.adb, restrict.ads, scans.ads, scng.adb, sem_aggr.adb, sem_attr.adb, sem_ch11.adb, sem_ch12.adb, sem_ch3.adb, sem_ch3.ads, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb, sem_util.ads, snames.ads-tmpl, gnatbind.adb, libgnat/s-rident.ads, doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Remove processing of SPARK_05 restriction. * gnat_rm.texi: Regenerate. * opt.ads: Remove processing of old checksum which is now handled by gprbuild directly.
2020-06-08[Ada] AI12-0287 Legality Rules for null exclusions in renaming are too fierceArnaud Charlet2-19/+25
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_ch12.adb (Instantiate_Object): Relax rules related to null exclusions and generic objects. Handle all anonymous types consistently and not just E_Anonymous_Access_Type. * sem_ch8.adb (Analyze_Object_Renaming): Change wording so that it applies to both renamings and instantiations to avoid confusion.
2020-06-08[Ada] Ada.Text_IO: fix typoArnaud Charlet1-1/+1
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-textio.ads (File_Mode): Fix typo in comment.
2020-06-08[Ada] Do not warn on partial access to atomic object with address clauseEric Botcazou1-7/+9
2020-06-08 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Indexed_Component): Do not give a warning for a nonatomic component of an atomic array which is subject to an address clause in Ada 2020 mode. (Resolve_Selected_Component): Likewise for an atomic record.
2020-06-08[Ada] Add gnatname use for multiple units files supportPhilippe Gil2-32/+22
2020-06-08 Philippe Gil <gil@adacore.com> gcc/ada/ * doc/gnat_ugn/the_gnat_compilation_model.rst: in "Handling Files with Multiple Units" part documents gnatname use for unmodified files handling and gnatchop use for files refactoring. * gnat_ugn.texi: Regenerate.
2020-06-08[Ada] Update doc on Enum_Rep/Enum_ValArnaud Charlet2-0/+12
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Enum_Rep/Enum_Val are standard Ada 202x attributes. * gnat_rm.texi: Regenerate.
2020-06-08[Ada] Better code generation for nested aggregatesJavier Miranda1-5/+0
2020-06-08 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_aggr.adb (Safe_Component): Remove code that considers as unsafe components that are aggregates; such removal allows the frontend to proceed and evaluate if they are safe by means of invoking Safe_Aggregate.
2020-06-08[Ada] Reuse standard expansion of 'First and 'Last in GNATprove modePiotr Trojanek1-0/+7
2020-06-08 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Apply standard expansion to attributes First and Last.
2020-06-08[Ada] Reuse Get_Index_Subtype in the special expander for GNATprovePiotr Trojanek4-59/+37
2020-06-08 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_attr.adb, exp_util.ads, exp_util.adb (Get_Index_Subtype): Move from the body of Exp_Attr to Exp_Util and expose from the spec. * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Replace duplicated code with a call to Get_Index_Subtype.
2020-06-08[Ada] AI12-0226 Make objects more consistentArnaud Charlet2-110/+53
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Simplify code by moving many special cases to Is_Object_Reference and removing others by only checking renamings coming from sources. * sem_util.adb (Is_Object_Reference): Update for AI12-0226 and add more regular handling of 'Priority. Remove special cases no longer needed now that we are only checking renamings coming from sources.
2020-06-08[Ada] Silence spurious warning on instances of formal vectorsClaire Dross1-0/+4
2020-06-08 Claire Dross <dross@adacore.com> gcc/ada/ * libgnat/a-cofove.adb (Insert_Space): The computation of Index generates a spurious compiler warning about a value not being in range for a statically dead branch. Silence it using pragma Warnings.
2020-06-08[Ada] gnatbind: Deterministic No_Entry_Calls_In_Elaboration_Code messagesBob Duff3-79/+198
2020-06-08 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.adb (function Add_Edge): Rename Add_Edge_With_Return to Add_Edge; we can tell it returns because it's a function, and overloading seems appropriate in this case. If Activates_Task=True, and we're not going to add a new edge because an existing Pred-->Succ edge already exists, then set Activates_Task to True on the preexisting edge. This ensures that the message: info: use pragma Restrictions (No_Entry_Calls_In_Elaboration_Code) appears when appropriate, no matter in what order the edges happened to be processed. (procedure Add_Edge): Remove redundant assertions. (Activates_Task): Other kinds of edges can have Activates_Task=True. For example, if we had a With_Edge and then an Invocation_Edge with Activates_Task=True, then the With_Edge has Activates_Task set to True. (Add_Edge_Kind_Check): New procedure to prevent other bugs of this nature. For example, if we were to sometimes call Add_Edge for a Spec_Before_Body_Edge followed by Add_Edge for a With_Edge, and sometimes in the other order, that would cause a similar bug to what we're fixing here. (Set_Is_Recorded_Edge): Val parameter is not used. Get rid of it. (Set_Activates_Task): New procedure to set the Activates_Task flag. * bindo-graphs.ads (Library_Graph_Edge_Kind): Reorder the enumeration literals to facilitate Add_Edge_Kind_Check. * ali.adb (Known_ALI_Lines): The comment about "still available" was wrong. Fix that by erasing the comment, and encoding the relevant information in real code. Take advantage of Ada's full coverage rules by removing "others =>". Also DRY.
2020-06-08[Ada] Ada_2020: shared variable control aspects on formal derived typesEd Schonberg2-2/+12
2020-06-08 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * par-ch12.adb (P_Formal_Derived_Type_Definition): Handle properly formal derived types that include aspect specifications, so that the "with" keyword appears twice in the formal type declaration. * sem_ch13.adb (Has_Generic_Parent): Return true if the type itself is a generic formal.
2020-06-08[Ada] Fix socket timeout correction for Windows Server 2019 caseDmitriy Anisimkov1-4/+6
2020-06-08 Dmitriy Anisimkov <anisimko@adacore.com> gcc/ada/ * socket.c (__gnat_minus_500ms): Remove IsWindowsVersionOrGreater from condition.
2020-06-08[Ada] Add Depends contracts to Delete procedures of formal containersClaire Dross5-15/+20
2020-06-08 Claire Dross <dross@adacore.com> gcc/ada/ * libgnat/a-cfdlli.ads, libgnat/a-cfhama.ads, libgnat/a-cfhase.ads, libgnat/a-cforma.ads, libgnat/a-cforse.ads (Delete): Add Depends contract.
2020-06-08[Ada] AI12-0309 Missing checks for pragma SuppressArnaud Charlet2-1/+5
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * snames.ads-tmpl (Name_Program_Error_Check, Name_Tasking_Check): New constants. * types.ads (Program_Error_Check, Tasking_Check): New constants. (All_Checks): Update accordingly.
2020-06-06Daily bump.GCC Administrator1-0/+212
2020-06-05[Ada] Replace ? by ?? in Error_Msg_NArnaud Charlet1-1/+1
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_prag.adb (Validate_Compile_Time_Warning_Or_Error): Use ??.
2020-06-05[Ada] Update comments wrt Ada 83 handlingArnaud Charlet1-1/+3
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * cstand.adb (Create_Standard): Update comments.
2020-06-05[Ada] Support 'Reduce under -gnatXArnaud Charlet4-2/+14
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * scng.adb (Scan): Fix typo to take into account all future versions of Ada. * sem_attr.ads (Attribute_Impl_Def): Add Attribute_Reduce for now. * sem_attr.adb (Analyze_Attribute): Only allow 'Reduce under -gnatX. * snames.ads-tmpl (Name_Reduce): Update comment.
2020-06-05[Ada] Add note about gnatcov reliance on thunk namesThomas Quinot1-0/+5
2020-06-05 Thomas Quinot <quinot@adacore.com> gcc/ada/ * exp_disp.adb (Expand_Interface_Thunk): Add comment about gnatcov reliance on specific name used for thunks.
2020-06-05[Ada] Subtype inherits Atomic flag from base typeEd Schonberg1-0/+9
2020-06-05 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): For scalar types, and for subtype declarations without a constraint, subtype inherits Atomic flag from base type.
2020-06-05[Ada] Fix punctuation in description of Enum_Rep attributePiotr Trojanek2-3/+3
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Enum_Rep): Remove extra colon. * gnat_rm.texi: Regenerate.
2020-06-05[Ada] Make the Has_Dynamic_Range_Check flag obsoleteEric Botcazou5-22/+45
2020-06-05 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * atree.adb (New_Copy): Clear Has_Dynamic_Range_Check on subexpression nodes. * checks.adb (Append_Range_Checks): Assert that the node doesn't have the Has_Dynamic_Range_Check flag set. (Insert_Range_Checks): Likewise. * exp_ch3.adb (Expand_N_Subtype_Indication): Do not apply range checks for a full type or object declaration. * sem_ch3.ads: Move with and use clauses for Nlists to... (Process_Range_Expr_In_Decl): Change default to No_List for the Check_List parameter. * sem_ch3.adb: ...here. (Process_Range_Expr_In_Decl): Likewise. When the insertion node is a declaration, only insert on the list if is present when the declaration involves discriminants, and only insert on the node when there is no list otherwise.
2020-06-05[Ada] Do not create an empty list of nodes that confuses GNATprovePiotr Trojanek1-5/+6
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_aggr.adb (Resolve_Record_Aggregate): Create the N_Aggregate node with its Expressions field set to No_List and not to an empty list.
2020-06-05[Ada] Optimize Normalize_PathnameDmitriy Anisimkov1-122/+136
2020-06-05 Dmitriy Anisimkov <anisimko@adacore.com> gcc/ada/ * libgnat/s-os_lib.adb (Is_Dirsep): Moved from Build_Path to package level to reuse. (Normalize_Pathname.Final_Value): Reduce 2 'if' statements to one. (Normalize_Pathname.Fill_Directory): New procedure instead of function Get_Directory. Remove slash to backslash conversion and drive letter uppercasing on Windows.
2020-06-05[Ada] Spurious assert failure in Walk_Library_ItemsArnaud Charlet1-1/+3
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem.adb (Assert_Done): Relax check for main unit, as it was overzealous in the case of the main unit itself.
2020-06-05[Ada] Use Is_Incomplete_Type instead of a low-level Ekind testPiotr Trojanek3-3/+3
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_ch3.adb, sem_ch8.adb, sem_util.adb: Use Is_Incomplete_Type to make the code easier to read.
2020-06-05[Ada] Simplify iteration over componentsPiotr Trojanek2-74/+67
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * einfo.adb: Minor reformatting. * sem_util.adb (Has_Full_Default_Initialization, Is_Partially_Initialized_Type, Caller_Known_Size_Record, Large_Max_Size_Mutable): Iterate with First_Component/Next_Component; rename Ent to Comp.
2020-06-05[Ada] Fix incorrect initialization for array of non-standard enumeration typeEric Botcazou3-6/+24
2020-06-05 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use Expr_Rep_Value instead of Expr_Value to obtain the equivalent integer value. * sem_eval.ads (Expr_Value): Document more supported cases. * sem_eval.adb (Expr_Rep_Value): Copy missing cases from Exp_Value.
2020-06-05[Ada] Put_Image attribute: Rtsfind cleanupsBob Duff2-117/+109
2020-06-05 Bob Duff <duff@adacore.com> gcc/ada/ * rtsfind.adb, rtsfind.ads: Move subtypes of RTU_Id into package body, because they are not needed by clients. Change "Child_" to "Descendant", because grandchildren and great grandchildren are involved. Replace all the repetitive comments with a single concise one. Change the parent subtypes to be more consistent; use the most specific parent.
2020-06-05[Ada] Move routine for detecting special Text_IO packages from GNATprovePiotr Trojanek2-0/+37
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * rtsfind.ads, rtsfind.adb (Is_Text_IO_Special_Package): Moved from the GNATprove backend to the frontend.
2020-06-05[Ada] Add comment about function only used in CodePeerYannick Moy1-0/+1
2020-06-05 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_util.ads: Add comment about function only used in CodePeer.
2020-06-05[Ada] Spurious error on address clause in task bodyEd Schonberg1-0/+18
2020-06-05 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch9.adb, (Analyze_Task_Body): After analying the task body, indicate that all local variables have no delayed aspects. This prevents improper later calls to Check_Aspect_At_End_Of_Declarations, that would happen when the constructed task_procedure body (generated during expansion) is analyzed. The legality of aspect specifications that may appear on local declarations has already been established, and it is in general not possible to recheck them properly during expansion, when visibility may not be fully established.
2020-06-05[Ada] Add missing Global contract to Ada.Containers.Functional_VectorsPiotr Trojanek1-1/+2
2020-06-05 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * libgnat/a-cofuve.ads (First): Add Global contract.
2020-06-05[Ada] AI12-0207 Convention of anonymous access typesArnaud Charlet1-17/+29
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_prag.adb (Set_Convention_From_Pragma): Set the convention of anonymous access array components.
2020-06-05[Ada] AI12-0336 Meaning of Time_OffsetArnaud Charlet3-7/+19
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-calfor.ads, libgnat/a-catizo.ads, libgnat/a-catizo.adb (Local_Time_Offset, Local_Image): New. (UTC_Time_Offset): Now a renaming of Local_Time_Offset.
2020-06-05[Ada] Fix assertion failure on double rederivation of private typeEric Botcazou1-19/+45
2020-06-05 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch3.adb (Available_Full_View): New function returning either the full or the underlying full view. (Build_Full_Derivation): Add guard for the full view. (Copy_And_Build): Retrieve the underlying full view, if any, also if deriving a completion. (Build_Derived_Private_Type): Use Available_Full_View throughout to decide whether a full derivation must be done.
2020-06-05[Ada] Put_Image attributeBob Duff7-42/+21
2020-06-05 Bob Duff <duff@adacore.com> gcc/ada/ * exp_attr.adb, exp_ch11.adb, exp_imgv.adb, exp_tss.ads, par-ch4.adb, sem_attr.adb, sem_util.ads: Misc cleanup.
2020-06-05[Ada] AI12-0144 Make Discrete_Random more flexibleArnaud Charlet2-0/+17
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-nudira.ads, libgnat/a-nudira.adb (Random): New function.
2020-06-05[Ada] AI12-0237 Getting the representation of an enumeration valueArnaud Charlet2-32/+13
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_attr.ads (Attribute_Impl_Def): Remove Enum_Rep/Val. * sem_attr.adb (Attribute_20): New, move Enum_Rep/Val here. (Analyze_Attribute): Take Attribute_20 into account.
2020-06-05[Ada] AI12-0318 No_IO should apply to Ada.DirectoriesArnaud Charlet1-0/+1
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * restrict.ads (Unit_Array): Add a-direct.
2020-06-05[Ada] AI12-0235 System.Storage_Pools should be pureArnaud Charlet1-3/+4
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-stopoo.ads: Mark package Pure and leave room for Nonblocking once this aspect is supported.
2020-06-05[Ada] Add No_Truncation flag on view conversion for GNAT-LLVMEric Botcazou1-0/+6
2020-06-05 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference) <Valid_Scalars>: Set the No_Truncation flag on the unchecked conversion built for scalar types.
2020-06-05[Ada] Assertion_Policy (Ignore) ignores invariantsBob Duff4-42/+19
2020-06-05 Bob Duff <duff@adacore.com> gcc/ada/ * einfo.adb, einfo.ads, exp_util.adb: Remove Invariants_Ignored flag. * sem_prag.adb (Invariant): Instead of setting a flag to be checked elsewhere, remove the pragma as soon as it is analyzed and checked for legality.
2020-06-05[Ada] Rename parameter of routines in ChecksEric Botcazou2-138/+132
2020-06-05 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.ads (Apply_Length_Check): Rename Ck_Node parameter to Expr. (Apply_Range_Check): Likewise. (Get_Range_Checks): Likewise. * checks.adb (Apply_Float_Conversion_Check): Likewise. (Apply_Selected_Length_Checks): Likewise. (Apply_Selected_Range_Checks): Likewise. (Guard_Access): Likewise. (Selected_Length_Checks): Likewise. Also avoid shadowing in child procedures. (Selected_Range_Checks): Likewise.
2020-06-05[Ada] Minor wording changes wrt Ada 202xArnaud Charlet7-14/+16
2020-06-05 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * par-ch3.adb, par-ch4.adb, scng.adb, sem_aggr.adb, sem_ch10.adb, sem_ch12.adb, sem_prag.adb: Update wording: change Ada_2020 to Ada 2020 in comments and mention -gnat2020 instead of -gnatX switch.
2020-06-05Daily bump.GCC Administrator1-0/+303
2020-06-04[Ada] AI12-0184: Long Long C Data typesArnaud Charlet1-3/+5
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/i-c.ads (long_long, unsigned_long_long): New definitions.
2020-06-04[Ada] New package Ada.Task_InitializationArnaud Charlet6-0/+104
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * Makefile.rtl: add a-tasini object * impunit.adb (Non_Imp_File_Names_95): Add s-tasini. * libgnarl/a-tasini.ads, libgnarl/a-tasini.adb: New files. * libgnarl/s-taskin.ads (Global_Initialization_Handler): New. * libgnarl/s-tassta.adb (Task_Wrapper): Call Global_Initialization_Handler if non null.