aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2020-06-15[Ada] Remove excessive parensPiotr Trojanek2-3/+3
2020-06-15 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_ch6.adb, sem_util.adb: Remove excessive parents, especially since they don't make the code any easier to read.
2020-06-15[Ada] Support aspect Relaxed_Initialization and attribute InitializedPiotr Trojanek11-11/+402
2020-06-15 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * aspects.ads (Aspect_Id): Add Aspect_Relaxed_Initialization. (Implementation_Defined_Aspect): Add new aspect. (Aspect_Argument): Add new aspect with Optional_Expression argument. (Is_Representation_Aspect): Add new aspect as a non-representation one. (Aspect_Names): Add name for the new aspect. (Aspect_Delay): Add new aspect as a non-delayed one. * sem_ch3.adb: Minor reformatting. * einfo.ads, einfo.adb (Is_Relaxed_Initialization_State): New query; reuses existing code for querying abstract state options. * exp_attr.adb (Expand_N_Attribute_Reference): For now ignore attribute 'Initialized. * sem_attr.adb (Analyze_Attribute_Old_Result): Allow attribute 'Result to be used in the aspect Relaxed_Initialization expression. (Analyze_Attribute): Analyze attribute 'Initialized; based on existing code for attribute 'Valid_Scalars. (Eval_Attribute): Do not expect attribute 'Initialized, just like attribute 'Valid_Scalars is not expected. * sem_ch13.adb (Analyze_Aspect_Relaxed_Initialization): New routine. (Analyze_Aspect_Specifications): Analyze new aspect in a dedicated routine. (Check_Aspect_At_Freeze_Point): Do not expect new aspect. * sem_prag.adb (Analyze_Abstract_State): Support option Relaxed_Initialization on abstract states. * sem_util.ads, sem_util.adb (Has_Relaxed_Initialization): New query for the GNATprove backend. * snames.ads-tmpl (Snames): Add Name_Ids for the new aspect and attribute; add an Attribute_Id for the new attribute.
2020-06-15[Ada] Put_Image: Enable for access-to-subprogram typesBob Duff4-11/+9
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * exp_put_image.adb, libgnat/s-putima.adb, libgnat/s-putima.ads, rtsfind.ads: Enable Put_Image if Is_Access_Subprogram_Type (Typ). Remove comment saying it's disabled in that case. Rename Put_Image_Access_Prot to be Put_Image_Access_Prot_Subp to clarify that we're talking about access-to-subprogram, not access-to-protected-object.
2020-06-15[Ada] Clean up error handling of 'ImageBob Duff2-37/+39
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * sem_attr.adb (Check_Image_Type): New procedure for checking the type, depending on language version. Disable the Ada 2020 support until the corresponding expander work is done. (Analyze_Image_Attribute): Call Check_Image_Type. Rearrange the code to be simplier and more logical. When P_Type is modified, modify P_Base_Type accordingly. * sem_util.adb (Is_Object_Image): Do not return False if the prefix is a type. X'Image should be considered an image of an object iff X is an object (albeit illegal pre-2020 if nonscalar).
2020-06-15[Ada] Put_Image: Enable for access-to-subprogram typesBob Duff4-6/+43
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * libgnat/s-putima.ads, libgnat/s-putima.adb (Put_Image_Access_Subp, Put_Image_Access_Prot): New procedures for printing access-to-subprogram objects. Remove an explicit " ", because Put_Image includes the annoying leading blank. * rtsfind.ads: Add new procedures in s-putima. * exp_put_image.adb: Call new procedures as appropriate.
2020-06-15[Ada] Put_Image: Implement for private types with full real typeBob Duff2-9/+24
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * exp_imgv.adb (Expand_Image_Attribute): Allow private types. Put_Image generates Image for numeric types, and private types whose full type is numeric. This requires the Conversion_OK flag for integer and floating-point types. For fixed point, we need the extra conversion. * exp_put_image.adb (Build_Elementary_Put_Image_Call): Remove special handling of real types. (Enable_Put_Image): Enable for reals.
2020-06-15[Ada] Put_Image improvements for stringsBob Duff6-64/+61
2020-06-15 Bob Duff <duff@adacore.com> gcc/ada/ * exp_attr.adb (Put_Image): Use underlying type for strings. Remove unchecked union processing. * exp_put_image.adb (Tagged_Put_Image_Enabled): Use -gnatd_z to enable default Put_Image for tagged types. This allows testing that feature. (Build_String_Put_Image_Call): Set Conversion_OK flag. (Make_Component_List_Attributes): Remove unchecked union processing. (Enable_Put_Image): Disable for unchecked unions. Enable for nonscalar types (which were mistakenly disabled in earlier changes). * debug.adb: Document -gnatd_z switch. * libgnat/s-putima.adb (Put_Image_String, Put_Image_Wide_String, Put_Image_Wide_Wide_String): Double double-quote characters. Forget about special handling of control characters for now -- that's rare enough to not be a priority, and it's not clear what the right thing to do is anyway. * namet.adb: Minor: Improve debugger-friendliness. * sinfo.ads: Minor: Add "???" comment.
2020-06-15[Ada] Remove unreferenced and dubious Is_Renaming_DeclarationPiotr Trojanek2-25/+0
2020-06-15 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_util.ads, sem_util.adb (Is_Renaming_Declaration): Remove.
2020-06-15[Ada] Link failure with call to expression function in preconditionEd Schonberg1-3/+9
2020-06-15 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * freeze.adb (Freeze_Expression): When traversing the tree looking for the proper insertion point for the freeze node of an entity that is declared in an outer scope, set the candidate subprogram body node properly. Previous code has an off-by-one error.
2020-06-15[Ada] Implement AI12-0077 Has_Same_Storage on objects of size zeroEric Botcazou1-12/+25
2020-06-15 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference) <Has_Same_Storage>: Do not do superfluous work. Add the condition (X'Size /= 0) on both paths and turn binary AND into short-circuit AND THEN.
2020-06-15[Ada] Update 'Loop_Entry checking to match changes in 'Old rules.Steve Baird1-3/+3
2020-06-15 Steve Baird <baird@adacore.com> gcc/ada/ * sem_attr.adb (Analyze_Attribute): In the Loop_Entry case, replace a call to Statically_Denotes_Object with a call to Statically_Names_Object and clean up the preceding comment.
2020-06-15[Ada] Use uniform type resolution for membership testsEric Botcazou1-14/+13
2020-06-15 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Set_Membership): Remove local variable. In the non-overloaded case, call Intersect_Types on the left operand and the first alternative to get the resolution type. But test the subtype of the left operand to give the warning.
2020-06-13Daily bump.GCC Administrator1-0/+316
2020-06-12[Ada] Fix anonymous-to-named access type implicit conversion legality checkingSteve Baird1-6/+83
2020-06-12 Steve Baird <baird@adacore.com> gcc/ada/ * sem_res.adb (Valid_Conversion): The simpler cases of violations of the aforementioned 8.6 rule are already handled correctly. These include cases where the operand of the type conversion is an access parameter or a stand-alone object of an anonymous access type. Add code to detect violations where the operand of the type conversion is an access discriminant whose accessibility level is tied to one of the other simpler cases. This is implemented in a new function, Valid_Conversion.Is_Discrim_Of_Bad_Access_Conversion_Argument, which is called in place of the previous test.
2020-06-12[Ada] Enable Put_Image in pre-Ada-2020 modesBob Duff7-35/+80
2020-06-12 Bob Duff <duff@adacore.com> gcc/ada/ * exp_attr.adb (Put_Image): Remove assertion. This assertion is False in mixed-Ada-version programs. * exp_put_image.adb (Tagged_Put_Image_Enabled): New flag to make it easy to experiment with Put_Image on tagged types. False in this version. (Enable_Put_Image): Enable in pre-2020. Workarounds: Disable for tagged types if Tagged_Put_Image_Enabled is False. Disable for access-to-subprogram types. Disable if errors have been detected, or Sink is unavailable. (Preload_Sink): Move all conditionals here, from Sem_Ch10, so they can be nearby related code in Enable_Put_Image. Load Sink only if we have seen a tagged type. This removes the dilemma about calling Preload_Sink when compiling the compiler, which caused unwanted dependences. * exp_put_image.ads (Preload_Sink): New formal Compilation_Unit, needed to move all conditionals here, from Sem_Ch10. * libgnat/a-stouut.adb (Put_UTF_8): Make this suitable for inlining, so we don't get warnings about inlining in some tests. And so it can be inlined! * opt.ads (Tagged_Seen): New flag (see Preload_Sink). * scng.adb (Scan): Set new Tagged_Seen flag. * sem_ch10.adb (Analyze_Compilation_Unit): Move conditionals and comments regarding Preload_Sink into Preload_Sink.
2020-06-12[Ada] AI12-0074 View conversions and out parameters passed by copyArnaud Charlet1-56/+81
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Actuals): Check for AI12-0074.
2020-06-12[Ada] Bump secondary stack alignment factor in full runtimesOlivier Hainque2-4/+17
2020-06-12 Olivier Hainque <hainque@adacore.com> gcc/ada/ * libgnat/s-secsta.ads (Memory_Alignment): New constant, memory alignment for chunks and allocated blocks. Initialize to Standard'Maximum_Alignment * 2. (Chunk_Memory): Use it. * libgnat/s-secsta.adb (Round_Up): Likewise.
2020-06-12[Ada] Alphabetic ordering for name and pragmasPiotr Trojanek3-21/+21
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * par-prag.adb: Fix ordering. * snames.ads-tmpl (Name_Test_Case, Pragma_Test_Case): Likewise. * sem_prag.adb (Sig_Flags): Likewise.
2020-06-12[Ada] Fix handling of Ada 83 OUT parameter ruleArnaud Charlet1-2/+24
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Entity_Name): Fix handling of expressions containing array attributes wrt Ada 83 detection.
2020-06-12[Ada] Implement AI12-0369Steve Baird4-127/+205
2020-06-12 Steve Baird <baird@adacore.com> gcc/ada/ * sem_util.ads, sem_util.adb: Define 3 new Boolean-valued functions - Statically_Denotes_Entity, Statically_Denotes_Object, and Statically_Names_Object. The first two were taken from sem_attr.adb. The term "statically names" is defined in the Ada RM and the new function Statically_Names_Object is intended to reflect that definition, or more precisely, as described in a comment in the code, to reflect the expected future definition of that term. * sem_attr.adb: Delete functions Statically_Denotes_Object and Statically_Denotes_Entity; these two functions have been moved to package Sem_Util. Replace call to Statically_Denotes_Object with a call to Statically_Names_Object as per AI12-0217 (a binding interpretation, so no Ada_Version check). * exp_ch9.adb (Expand_Entry_Barrier.Is_Simple_Barrier): Change name of function (it was previously Is_Simple_Barrier_Name) because the function should return True in the case of a static expression; implement this requirement. Change function to include a call to Statically_Names_Object so that, for Ada_2020 and later, it will return True for appropriate subcomponent names. (Expand_Entry_Barrier.Is_Pure_Barrier): Handle N_Indexed_Component and N_Selected_Component cases by calling Statically_Names_Object. (Expand_Entry_Barrier): Reorganize to treat Simple_Barriers and Pure_Barriers more uniformly. Prevent cascaded errors.
2020-06-12[Ada] Compiler locks up with -gnatX and formal subprogram with aspectsEd Schonberg1-7/+14
2020-06-12 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Find_Matching_Actual): Add guard on search loops to detect a compilation error when using a compiler built without assertions. (Instantiate_Formal_Subprogram): Create a new subprogram name for the actual only if formal has contract aspects and expansion is enabled.
2020-06-12[Ada] Improve code generated for assignment of dynamic record aggregatesEric Botcazou1-80/+231
2020-06-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_aggr.adb: Add with and use clauses for Sem_Mech. (Get_Base_Object): New function to get the base object of a node. (In_Place_Assign_OK): Add Target_Object parameter. Deal with a qualified expression on entry. Remove short-circuit for array aggregates with a single "others" choice. Do not look into the components of the aggregate if the parent is an allocator. (Check_Component): Add T_OK parameter and rewrite. (Safe_Component): Invoke Check_Component with T_OK set to False. (Convert_To_Assignments): Try to use an in-place assignment for any target; for that, call Get_Base_Object on the target and pass the result to In_Place_Assign_OK. (Expand_Array_Aggregate): Use Parent_Kind and Parent_Node more consistently. For an assignment, call Get_Base_Object on the target and pass the result to In_Place_Assign_OK.
2020-06-12[Ada] Don't correct socket timeout on Windows Server 2019Dmitriy Anisimkov3-12/+29
2020-06-12 Dmitriy Anisimkov <anisimko@adacore.com> gcc/ada/ * socket.c (__gnat_minus_500ms): Use GetVersionEx to detect Windows Server version. * libgnat/g-sothco.ads (Minus_500ms_Windows_Timeout): Remade to Boolean constant. * libgnat/g-socket.adb (Set_Socket_Option): Use Minus_500ms_Windows_Timeout constant instead of function call.
2020-06-12[Ada] AI12-0350 Swap for Indefinite_HoldersArnaud Charlet4-0/+52
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-coinho.ads, libgnat/a-coinho.adb, libgnat/a-coinho__shared.ads, libgnat/a-coinho__shared.adb (Swap): New procedure.
2020-06-12[Ada] Fix handling of subprograms declared in a protected bodyArnaud Charlet4-290/+238
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_ch6.adb (Expand_N_Subprogram_Declaration): Do nothing for a subprogram declared in a protected body. * exp_ch9.ads, exp_ch9.adb (Build_Private_Protected_Declaration): Moved to sem_ch6.adb. (Expand_N_Protected_Body): Do nothing for a subprogram declared in a protected body. * sem_ch6.adb (Build_Internal_Protected_Declaration): Moved from exp_ch9.adb and renamed and fixed to ensure in particular that such subprograms have convention Intrinsic and have no protected version. (Analyze_Subprogram_Body_Helper): Call Build_Internal_Protected_Declaration. (Move_Pragmas): Moved up and merged with the more general version from Build_Private_Protected_Declaration. We only want to copy selected pragmas, most pragmas are not suitable for a copy on the spec.
2020-06-12[Ada] Diagnose illegal overriding indicators in protected bodiesEd Schonberg1-0/+13
2020-06-12 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch6.adb (Check_Overriding_Indicatior): Reject an overriding indicator on a subprogram declared within a protected body.
2020-06-12[Ada] Reuse Is_Entry where possiblePiotr Trojanek6-15/+12
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * contracts.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb, sem_res.adb, sem_util.adb: Replace Ekind_In with Is_Entry.
2020-06-12[Ada] Detect overlapping actuals in entry callsPiotr Trojanek1-0/+7
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Entry_Call): Add call to Warn_On_Overlapping_Actuals.
2020-06-12[Ada] ACATS 4.2Q - BDD2007Arnaud Charlet2-0/+139
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * aspects.ads (Is_Representation_Aspect): New array. * sem_ch13.adb (Analyze_Aspect_Specifications): Check 13.1(9.2/5) for representation aspects. gcc/testsuite/ * gnat.dg/rep_clause8.adb: Update error location.
2020-06-12[Ada] Put_Image: preload type Sink, change what types have it enabledBob Duff4-4/+53
2020-06-12 Bob Duff <duff@adacore.com> gcc/ada/ * exp_put_image.ads, exp_put_image.adb (Preload_Sink): Procedure for preloading type Sink. This has the side effect of loading various dependents, including Ada.Strings.UTF_Encoding. (Enable_Put_Image): Disable Put_Image in pre-2020 versions of Ada. This limitation can probably be lifted later. Enable for tagged types except in predefined units. Disable for CPP types; Put_Image is legal, just prints the type name. * sem_attr.adb (Check_Put_Image_Attribute): Don't complain about Put_Image of CPP types; instead call the "unknown" version of Put_Image. * sem_ch10.adb (Analyze_Compilation_Unit): Call Preload_Sink.
2020-06-12[Ada] Remove redundant iterations in checks for overlapping actualsPiotr Trojanek1-60/+42
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Simplify.
2020-06-12[Ada] Remove suppression for overlapping actuals in internal unitsPiotr Trojanek1-8/+2
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Remove suppression for internal units.
2020-06-12[Ada] ACATS 4.1Q - CDD2A04 - RLS not followedArnaud Charlet6-22/+246
2020-06-12 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_strm.adb (Build_Elementary_Input_Call): Add support for 24 bits elementary types. * rtsfind.ads: Add 24 bits integer streaming routines. * sem_ch13.adb (Analyze_Attribute_Definition_Clause [Attribute_Stream_Size]): Add support for 24 bits elementary types. * libgnat/s-stratt.ads, libgnat/s-stratt.adb, libgnat/s-stratt__xdr.adb: Add support for signed and unsigned 24 bits integers.
2020-06-12[Ada] Simplify getting discriminant value from a list of constraintsPiotr Trojanek1-8/+12
2020-06-12 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_ch3.adb (Get_Discr_Value): Cleanup.
2020-06-12[Ada] Implement AI12-0175 Preelaborable packages with address clausesEric Botcazou5-19/+181
2020-06-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * rtsfind.ads (RTU_Id): Add System_Address_To_Access_Conversions. * sem_elab.adb (Elaboration_Phase_Active): Alphabetize. (Finalize_All_Data_Structures): Likewise. (Error_Preelaborated_Call): New procedure. (Build_Call_Marker): Set Is_Preelaborable_Call flag in marker. (Build_Access_Marker): Likewise. (Build_Subprogram_Invocation): Likewise. (Build_Task_Activation): Likewise. (Check_Preelaborated_Call): Return when the call is preelaborable. Call Error_Preelaborated_Call to give the error otherwise. (Check_Elab_Call): Likewise. * sem_util.adb (Is_Preelaborable_Function): New predicate. (Is_Non_Preelaborable_Construct.Visit): Recurse on the Explicit_Actual_Parameter field of N_Parameter_Association. (Is_Non_Preelaborable_Construct.Visit_Subexpression): In Ada 2020, for a call to a preelaborable function, visit the parameter list; otherwise, raise Non_Preelaborable exception. (Is_Preelaborable_Construct): Likewise, but recursively check the parameters instead and return false upon failure, otherwise true. * sinfo.ads (Is_Preelaborable_Call): New flag in call marker nodes. (Is_Preelaborable_Call): New inline function. (Set_Is_Preelaborable_Call): New inline procedure. * sinfo.adb (Is_Preelaborable_Call): New inline function. (Set_Is_Preelaborable_Call): New inline procedure.
2020-06-12[Ada] Remove unnecessary use_clause from stringt.adsBob Duff1-1/+1
2020-06-12 Bob Duff <duff@adacore.com> gcc/ada/ * stringt.ads: Remove "use System;".
2020-06-12[Ada] Small cleanup in handling of Ada 2012 implicit dereferencesEric Botcazou4-46/+13
2020-06-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch4.adb (Try_Container_Indexing): Replace call to First_Discriminant by Get_Reference_Discriminant to get the reference discriminant. * sem_ch13.adb (Check_Indexing_Functions): Likewise. * sem_ch5.adb (Preanalyze_Range): Call Get_Reference_Discriminant to get the reference discriminant. * sem_util.adb (Is_OK_Variable_For_Out_Formal): Treat all Ada 2012 implicit dereferences in only one place. (Is_Variable): Minor tweak.
2020-06-12[Ada] Compiler crash on instance with overloaded actual and aspectsEd Schonberg1-18/+69
2020-06-12 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Has_Contracts): New predicate to check whether a formal subprogram carries an aspect specification for a pre- or postcondition. (Build_Subprogram_Wrappers): If actual is overloaded, create a new name to be used in call inside wrapper body. This names carries the interpretations of the actual, and is resolved when the body is analyzed. (Build_Subprogram_Body_Wrapper): Use this generated name in call. (Build_Subprogram_Decl_Wrapper): Build profile of wrapper from the profile of formal, and reset type entities for subsequent analysis.
2020-06-12[Ada] Put_Image attributeBob Duff4-29/+34
2020-06-12 Bob Duff <duff@adacore.com> gcc/ada/ * debug.adb: Remove usage of -gnatd_z. * exp_attr.adb, exp_put_image.ads, exp_put_image.adb: Clean up the enable/disable code. If Put_Image is disabled for a type, systematically call the "unknown" version. Improve comments. Consolidate workarounds. Remove usage of -gnatd_z.
2020-06-12[Ada] Fix typos in commentsEric Botcazou1-12/+12
2020-06-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_elab.adb: Fix typos in comments.
2020-06-12[Ada] Missing accessibility error on object in type conversionJustin Squirek1-1/+12
2020-06-12 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_util.adb (Object_Access_Level): Add processing of implicit dereferences.
2020-06-12[Ada] Ada2020: update Big_Numbers.* specsBob Duff7-31/+41
2020-06-12 Bob Duff <duff@adacore.com> gcc/ada/ * libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads, libgnat/a-nbnbin__gmp.adb, libgnat/a-nbnbre.adb, libgnat/a-nbnbre.ads: Update Put_Image, and uncomment the aspect specification. Add pragmas Ada_2020. * libgnat/a-stouut.ads, libgnat/a-stteou.ads: Add Preelaborate, because the Big_Numbers packages have Preelaborate, and now depend on these Text_Output packages.
2020-06-12[Ada] Implement AI12-0269 No_Return for functionsEric Botcazou7-25/+101
2020-06-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * einfo.ads (No_Return): Document it for all subprograms. * einfo.adb (Set_No_Return): Adjust assertion accordingly. * sem_ch3.adb (Check_Abstract_Overriding): Implement the check prescribed by RM 6.5.1(6/2) here instead of... (Derive_Subprogram): Adjust comment accordingly. * sem_disp.adb (Override_Dispatching_Operation): ...here. Remove superfluous return statement. * sem_ch6.adb (Check_No_Return_Expression): New procedure. (Analyze_Function_Return): Call it to implement the check prescribed by AI12-0269 for simple return statements of No_Return functions, and also checks extended statements. (Analyze_Return_Statement): Only give an error on a return statement in No_Return procedures. Use idiomatic form. * sem_ch8.adb (Analyze_Subprogram_Renaming): Adjust error message for No_Return renaming subprogram. * sem_prag.adb (Analyze_Pragma) <Pragma_No_Return>: Accept it on functions and generic functions in Ada 2020.
2020-06-12Daily bump.GCC Administrator1-0/+324
2020-06-11[Ada] Fix missing insertion of explicit dereference in instanceEric Botcazou1-0/+11
2020-06-11 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Implicit_Dereference): In an instance, reset the type of the prefix if it is private before building the dereference.
2020-06-11[Ada] Fix assertion failure on entry call through unchecked conversionEric Botcazou1-7/+4
2020-06-11 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_util.adb (Safe_Unchecked_Type_Conversion): Add missing Is_Type guard before calling Has_Discriminants on Etype.
2020-06-11[Ada] Make libgnat/a-nbnbin__gmp.adb compileBob Duff1-30/+23
2020-06-11 Bob Duff <duff@adacore.com> gcc/ada/ * libgnat/a-nbnbin__gmp.adb: There's no Optional_Big_Integer anymore. Invalid_Big_Integer is not used. Greatest_Common_Divisor returns Big_Positive.
2020-06-11[Ada] Refine type of a routine parameter from Node_Id to Entity_IdPiotr Trojanek1-2/+2
2020-06-11 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_aggr.adb (Get_Value): Refine type of the Compon parameter.
2020-06-11[Ada] Refine type of a counter-like variablePiotr Trojanek1-1/+1
2020-06-11 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_aggr.adb (Resolve_Record_Aggregate): Refine type of Others_Box.
2020-06-11[Ada] Iterate with procedural version of Next routine where possiblePiotr Trojanek15-33/+33
2020-06-11 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * checks.adb, exp_ch7.adb, exp_ch9.adb, exp_smem.adb, lib.adb, nlists.adb, sem.adb, sem_aggr.adb, sem_ch3.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_res.adb, sem_util.adb, sem_warn.adb: Replace uses of Next function with procedure.