aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2020-03-11Fix GIMPLE verification failure in LTO mode on Ada codeEric Botcazou1-1/+1
The issue is that tree_is_indexable doesn't return the same result for a FIELD_DECL with QUAL_UNION_TYPE and the QUAL_UNION_TYPE, resulting in two instances of the QUAL_UNION_TYPE in the bytecode. The result for the type is the correct one (false, since it is variably modified) while the result for the field is falsely true because: else if (TREE_CODE (t) == FIELD_DECL && lto_variably_modified_type_p (DECL_CONTEXT (t))) return false; is not satisfied. The reason for this is that the DECL_QUALIFIER of fields of a QUAL_UNION_TYPE depends on a discriminant in Ada, which means that the size of the type does too (CONTAINS_PLACEHOLDER_P), which in turn means that it is reset to a mere PLACEHOLDER_EXPR by free_lang_data, which finally means that the size of DECL_CONTEXT is too, so RETURN_TRUE_IF_VAR is false. In other words, the CONTAINS_PLACEHOLDER_P property of the DECL_QUALIFIER of fields of a QUAL_UNION_TYPE hides the variably_modified_type_p property of these fields, if you look from the outside. PR middle-end/93961 * tree.c (variably_modified_type_p) <RECORD_TYPE>: Recurse into fields whose type is a qualified union.
2020-03-11Fix internal error on locally-defined subpoolsEric Botcazou2-1/+13
If the type is derived in the current compilation unit, and Allocate is not overridden on derivation (as is typically the case with Root_Storage_Pool_With_Subpools), the entity for Allocate of the derived type is an alias for System.Storage_Pools.Subpools.Allocate. The main assertion in gnat_to_gnu_entity fails in this case, since this is not a definition and Is_Public is false (since the entity is nested in the same compilation unit). 2020-03-11 Richard Wai <richard@annexi-strayline.com> * gcc-interface/decl.c (gnat_to_gnu_entity): Also test Is_Public on the Alias of the entitiy, if is present, in the main assertion.
2020-02-06Initialize barrier_cache for ARM EH ABI complianceAlexandre Oliva2-0/+15
The ARM Exception Handling ABI requires personality functions in phase1 to initialize barrier_cache before returning _URC_HANDLER_FOUND, and we don't. Although our own ARM personality function does not use barrier_cache at all, other languages' ARM personality functions, during phase2, are allowed and expected to test barrier_cache.sp to check whether the handler frame was reached, which implies that personality functions is in charge of the frame, and the remaining fields of barrier_cache hold whatever values it put there in phase1. Since we did not set barrier_cache.sp, an earlier exception, already handled by a non-Ada handler and then released, may have its storage reused for a new exception, that phase1 matches to an Ada frame, but if that leaves barrier_cache.sp alone, the phase2 personality function that handled the earlier exception, upon reaching the frame that handled the earlier exception, may believe the information in barrier_cache applies to the current exception. The C++ personality function, for example, would take the information in the barrier_cache and end up activating the handler that handled the earlier exception: try { throw 1; } catch (int i) { std::cout << "caught " << i << " by c++" << std::endl; } raise_ada_exception (); // might loop back to the handler above for gcc/ada/ChangeLog * raise-gcc.c (personality_body) [__ARM_EABI_UNWINDER__]: Initialize barrier_cache.sp when ending phase1.
2020-01-04* gnatvsn.ads: Bump copyright year.Eric Botcazou2-2/+6
From-SVN: r279880
2020-01-01Update copyright years.Jakub Jelinek1-0/+2
From-SVN: r279813
2020-01-01gcc.c (process_command): Update copyright notice dates.Jakub Jelinek4-6712/+6722
* gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/d/ * gdc.texi: Bump @copyrights-d year. gcc/go/ * gccgo.texi: Bump @copyrights-go year. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. libitm/ * libitm.texi: Bump @copying's copyright year. libgomp/ * libgomp.texi: Bump @copying's copyright year. libquadmath/ * libquadmath.texi: Bump @copying's copyright year. From-SVN: r279811
2019-12-22libada: Fix shared library installation with `--disable-libada'Maciej W. Rozycki2-0/+10
Provide a default value of $(toolexeclibdir) for $(ADA_RTL_DSO_DIR), so that in a `--disable-libada' configuration `make install' places shared gnatlib libraries, built with `make -C gcc gnatlib-shared', in their intended version-specific location, fixing a commit r276424 ("libada: Respect `--enable-version-specific-runtime-libs'") regression. gcc/ada/ * gcc-interface/Makefile.in (toolexeclibdir): New variable. From-SVN: r279702
2019-12-18trans.c (Pragma_to_gnu): Push a diagnostics state for pragma Warnings (Off) ↵Eric Botcazou2-1/+21
before turning off all the... * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Push a diagnostics state for pragma Warnings (Off) before turning off all the warnings and only pop it for pragma Warnings (On). From-SVN: r279519
2019-12-18[Ada] Missing accessibility check on access discriminantsJustin Squirek2-46/+186
2019-12-18 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_ch6.adb (Analyze_Function_Return): Modify handling of extended return statements to check accessibility of access discriminants. (Check_Aggregate_Accessibility): Removed. (Check_Return_Obj_Accessibility): Added to centralize checking of return aggregates and subtype indications in the case of an extended return statement. From-SVN: r279518
2019-12-18[Ada] Fix uninitialized out parameter in s-regpat.adbArnaud Charlet2-6/+9
2019-12-18 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-regpat.adb (Parse_Literal, Parse_Piece): Ensure Expr_Flags is always fully initialized. From-SVN: r279517
2019-12-18[Ada] Atomic aspect on formal generic params now supported in Ada 202x modeArnaud Charlet3-2/+11
2019-12-18 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-atopar.ads, libgnat/s-atopex.ads (Atomic_Type): Can now be marked Atomic. This requires marking the unit Ada 202x. From-SVN: r279516
2019-12-18[Ada] Simplify Big_Integer and Big_Real interfaceArnaud Charlet5-87/+70
2019-12-18 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-nbnbin.ads, libgnat/a-nbnbin.adb, libgnat/a-nbnbre.ads, libgnat/a-nbnbre.adb: Replace Optional_Big_* types by a simple check and exception raise in Get_Bignum. (Set_Bignum): Arg should be 'out' and not 'in out'. (Invalid_Big_Integer, No_Big_Real): Removed. (Is_Valid): Now convention Intrinsic. From-SVN: r279515
2019-12-18[Ada] Fix three-letter typos like "sss" in comments and docsPiotr Trojanek14-15/+24
2019-12-18 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst, doc/gnat_rm/obsolescent_features.rst, doc/gnat_ugn/gnat_and_program_execution.rst, exp_attr.adb, exp_ch9.adb, init.c, libgnat/s-valrea.adb, par-ch6.adb, sem_attr.adb, sem_ch4.adb, sem_util.ads: Fix trivial typos. * gnat_rm.texi, gnat_ugn.texi: Regenerate. From-SVN: r279514
2019-12-18[Ada] Missing accessibility actuals on calls to interface conversion functionsGary Dismukes2-0/+36
2019-12-18 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Type_Conversion): Add handling for access types with designated operand and target types that are referenced in places that have a limited view of an interface type by retrieving the nonlimited view when it exists. Add ??? comments related to missing limited_with_clause handling for Target (in the non-access case). From-SVN: r279513
2019-12-18[Ada] AI12-0282: shared variable control aspects on formal typesEd Schonberg5-17/+172
2019-12-18 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * par-ch12.adb (P_Formal_Derived_Type_Definition): In Ada_2020 the keyword WITH can indicate the start of aspect specifications and not a private type extension. * sem_ch12.adb (Analyze_Formal_Type): Indicate that it is a first subtype. (Instantiate_Type): New procedure Check_Shared_Variable_Control_Aspects to verify matching rules between formal and actual types. Note that an array type with aspect Atomic_Components is considered compatible with an array type whose component type is Atomic, even though the array types do not carry the same aspect. * sem_ch13.adb (Analyze_One_Aspect): Allow shared variable control aspects to appear on formal types. (Rep_Item_Too_Early): Exclude aspects on formal types. * sem_prag.adb (Mark_Type): Handle properly pragmas that come from aspects on formal types. (Analyze_Pragma, case Atomic_Components): Handle formal types. From-SVN: r279512
2019-12-18[Ada] Minor housekeeping work in Create_StandardEric Botcazou2-2/+6
2019-12-18 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * cstand.adb (Create_Standard): Remove duplicate line and adjust. From-SVN: r279511
2019-12-18[Ada] Reserving switch d_K for known problem isssues detectionJavier Miranda2-1/+9
2019-12-18 Javier Miranda <miranda@adacore.com> gcc/ada/ * debug.adb: Document -gnatd_K as a reserved switch for the detection of known problem issues of previous releases. From-SVN: r279510
2019-12-18[Ada] Reject aspect specifications on number constantsGhjuvan Lacambre2-1/+8
2019-12-18 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * par-ch13.adb: Check if declarations allow aspect specifications. From-SVN: r279509
2019-12-18[Ada] Einfo: fix typo in commentPiotr Trojanek2-1/+5
2019-12-18 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * einfo.ads (Is_Ghost_Entity): Fix typo in comment. From-SVN: r279508
2019-12-18[Ada] Do not propagate Object_Size onto Size for composite typesEric Botcazou3-13/+31
2019-12-18 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * layout.adb (Layout_Type): In the case of composite types, do not copy the Esize onto the RM_Size if the latter is not set. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Also cap the alignment if an Object_Size clause has been specified. Pass VAR_DECL in the call to validate_size for the Esize of a type. (validate_size): Be prepared to give an error on an Object_Size clause. From-SVN: r279507
2019-12-18[Ada] Document the introduction of the Object_Size attribute in Ada 2020Eric Botcazou3-17/+29
2019-12-18 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * einfo.ads (Handling of Type'Size Value): Add references to the introduction of Object_Size in Ada 2020. * sem_eval.adb (Subtypes_Statically_Match): Likewise. From-SVN: r279506
2019-12-18[Ada] Wrong error on hidden must-override primitiveBob Duff2-2/+16
2019-12-18 Bob Duff <duff@adacore.com> gcc/ada/ * sem_ch3.adb (Derive_Subprogram): Do not set the Requires_Overriding flag in the above-mentioned case. From-SVN: r279505
2019-12-18[Ada] Bad "already use-visible" warning re: use in private partBob Duff2-6/+12
2019-12-18 Bob Duff <duff@adacore.com> gcc/ada/ * sem_ch8.adb (Note_Redundant_Use): It was already checking for a use clause in the visible part of the child. Add an additional check for a use clause in the context clause of the child. From-SVN: r279504
2019-12-16[Ada] Suppress unused warnings in the presence of errorsBob Duff2-0/+13
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * errout.adb (Handle_Serious_Error): Disable the above-mentioned warnings. From-SVN: r279441
2019-12-16[Ada] Minor: improve commentsBob Duff3-3/+11
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * errout.adb, errout.ads: Improve comments. From-SVN: r279440
2019-12-16[Ada] Minor comment fixBob Duff2-1/+5
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * sem_util.ads: Minor comment fix. From-SVN: r279439
2019-12-16[Ada] Check for "size for" in Special_Msg_DeleteBob Duff3-1/+19
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * errout.ads, errout.adb (Is_Size_Too_Small_Message): Check for "size for" instead of "size for& too small, minimum allowed is ^". From-SVN: r279438
2019-12-16[Ada] Do not set a bogus Esize on subtype built for Component_Size clauseEric Botcazou2-1/+7
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Set only the RM_Size on the subtype built for a Component_Size clause when the component type is a biased integer type. From-SVN: r279437
2019-12-16[Ada] Fix warning on _REENTRANTArnaud Charlet2-0/+6
2019-12-16 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * socket.c: Shutdown warning. From-SVN: r279436
2019-12-16[Ada] Mark Deallocator as Favor_Top_LevelArnaud Charlet2-0/+5
2019-12-16 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnarl/s-tataat.ads (Deallocator): Mark as Favor_Top_Level. From-SVN: r279435
2019-12-16[Ada] AI12-0234/321 atomic operationsArnaud Charlet11-2/+620
2019-12-16 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-aotase.adb, libgnat/s-aotase.ads, libgnat/s-atoope.ads, libgnat/s-atopar.adb, libgnat/s-atopar.ads, libgnat/s-atopex.adb, libgnat/s-atopex.ads: New files. * libgnat/s-atopri.ads: Add new intrinsics. * Makefile.rtl: Add new runtime files. * impunit.adb: Add new units to Ada 2020 list. From-SVN: r279434
2019-12-16[Ada] Remove new strict-alignment check added by AI12-0001Eric Botcazou2-16/+19
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * freeze.adb (Check_Strict_Alignment): Remove new check on Has_Aliased_Components for array types. From-SVN: r279433
2019-12-16[Ada] Crash on constrained container in generalized indexing operationEd Schonberg2-1/+13
2019-12-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch4.adb (Try_Container_Indexing): In the case of a derived container type, use the base type to look for candidate indexing operations, because the object may be a constrained subtype or itype with no explicit declaration. Candidate indexing operations are found in the same scope and list of declarations as the declaration of the base type. From-SVN: r279432
2019-12-16[Ada] Prototype implementastion of Ada2020 Map-reduce constructEd Schonberg10-5/+371
2019-12-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * scng.adb (Scan): In Ada2020, a left-bracket indicates the start of an homogenous aggregate. * par-ch4.adb (P_Reduction_Attribute_Reference): New procedure. (P_Aggregate): Recognize Ada2020 bracket-delimited aggregates. (P_Primary): Ditto. * par-util.adb (Comma_Present): Return false on a right bracket in Ada2020, indicating the end of an aggregate. * snames.ads-tmpl: Introduce Name_Reduce and Attribute Reduce. * sinfo.ads, sinfo.adb (Is_Homogeneous_Aggregate): New flag on aggregates, to designate an Ada2020 array or container aggregate that is bracket-delimited in the source. * sem_attr.adb (Analyze_Attribute): For attribute Reduce, verify that two arguments are present, and verify that the prefix is a stream or an object that is iterable (array or contrainer). (Resolve_Attribute): For attribute Reduce, resolve initial value with the type of the context. Type-checking of element type of prefix is performed after expansion. * exp_attr.adb (Expand_N_Attribute_Reference): For attribute Reduce, expand into a loop: a) If prefix is an aggregate with a single iterated component association, use its iterator specification to construct a loop, b) If prefix is a name, build a loop using an element iterator loop. * scans.ads: Add brackets tokens. From-SVN: r279431
2019-12-16[Ada] AI12-0001: Independence and Representation clauses for atomic objectsEric Botcazou10-267/+388
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust calls to validate_size. (gnat_to_gnu_component_type): Likewise. (gnat_to_gnu_field): Likewise and pass string for error messages. (components_need_strict_alignment): Remove test on Is_Aliased and add test for the independence of the component. (validate_size): Add S1 and S2 string parameters and use them to give better error messages for fields. Tweak a couple of messages. * einfo.ads (Has_Independent_Components): Document more cases. (Is_Independent): Likewise. (Strict_Alignment): Document new semantics. * exp_ch9.adb (Install_Private_Data_Declarations): Also set the Is_Independent flag along with Is_Aliased on the renaming entity. * freeze.adb (Size_Known): Remove always-false test and add test for the strict-alignment on the record type. Remove redundant tests and add test for the strict-alignment on the component type. (Check_Strict_Alignment): Set the flag if the type is by-ref and remove now redundant conditions. Set the flag on an array type if it has aliased components. In the record type case, do not set type for C_Pass_By_Copy convention. (Freeze_Array_Type): Move code checking for conflicts between representation aspects and clauses to before specific handling of packed array types. Give a warnind instead of an error for a conflict with pragma Pack. Do not test Has_Pragma_Pack for the specific handling of packed array types. (Freeze_Record_Type): Move error checking of representation clause to... (Freeze_Entity): ...here after Check_Strict_Alignment is called. * sem_aggr.adb (Array_Aggr_Subtype): Also set the Is_Independent flag along with Is_Aliased on the Itype. * sem_ch13.adb (Check_Record_Representation_Clause): Do not set the RM size for a strict-alignment type. * sem_ch3.adb (Add_Interface_Tag_Components): Also set the Is_Independent flag along with Is_Aliased on the tag. (Add_Interface_Tag_Components): Likewise on the offset. (Analyze_Component_Declaration): Likewise on the component. (Analyze_Object_Declaration): Likewise on the object. (Constrain_Array): Likewise on the array. (Record_Type_Declaration: Likewise on the tag. (Array_Type_Declaration): Also set the Has_Independent_Components flag along with Has_Aliased_Components on the array. (Copy_Array_Base_Type_Attributes): Copy Has_Independent_Components. (Copy_Array_Subtype_Attributes): Copy Is_Atomic, Is_Independent and Is_Volatile_Full_Access. (Analyze_Iterator_Specification): Set Is_Independent on the loop variable according to Independent_Components on the array. * sem_ch5.adb: Likewise. * sem_ch6.adb (Process_Formals): Also set the Is_Independent flag along with Is_Aliased on the formal. gcc/testsuite/ * gnat.dg/specs/clause_on_volatile.ads, gnat.dg/specs/size_clause3.ads: Update expected diagnostics. From-SVN: r279430
2019-12-16[Ada] Fully propagate representation aspects through renamingEric Botcazou5-134/+216
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Set Atomic, Independent and Volatile_Full_Access aspects on the entity of the renaming the same way as the Volatile aspect is set. * sem_util.ads (Is_Atomic_Object_Entity): Move declaration to... (Is_Independent_Object): New function. (Is_Volatile_Full_Access_Object): Likewise. * sem_util.adb (Is_Atomic_Object_Entity): ...here. (Prefix_Has_Atomic_Components): Minor tweak. (Is_Atomic_Object): Test Is_Atomic on the Etype uniformly. (Is_Atomic_Or_VFA_Object): Call Is_Volatile_Full_Access_Object. (Is_Independent_Object): New predicate. (Is_Subcomponent_Of_Atomic_Object): Remove redundant test. (Is_Volatile_Full_Access_Object): New predicate. (Is_Volatile_Prefix): Rename into... (Prefix_Has_Volatile_Components): ... and call Is_Volatile_Object. (Object_Has_Volatile_Components): Delete. (Is_Volatile_Object): Simplify. * gcc-interface/trans.c (node_is_volatile_full_access): Adjust comment. From-SVN: r279429
2019-12-16[Ada] Syntax error on improperly indented imported subprogramBob Duff13-187/+232
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * par.adb: Add Scopes function to do range checking on the scope stack. Call Scopes all over the parser. Add SIS_Aspect_Import_Seen flag. * par-ch6.adb (P_Subprogram): Initialize SIS_Aspect_Import_Seen to False at the start, and check it at the end. * par-ch13.adb (Get_Aspect_Specifications): Set SIS_Aspect_Import_Seen to True when appropriate. * par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb, par-ch5.adb, par-ch7.adb, par-ch9.adb, par-endh.adb, par-util.adb: Call Scopes. From-SVN: r279428
2019-12-16[Ada] Fix couple of oversights in the implementation of AI12-0128Eric Botcazou4-143/+203
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_prag.adb (Atomic_Components): Remove local variable and fix consistency issues. Call Component_Type on the Etype of E. (Independent_Components): Remove local variable. * sem_util.adb (Is_Subcomponent_Of_Atomic_Object): Properly deal with prefixes that are access values. * gcc-interface/trans.c (atomic_acces_t): New enumeral type. (node_is_atomic) <N_Indexed_Component>: Test the prefix. (node_has_volatile_full_access): Rename into... (node_is_volatile_full_access): ...this. (node_is_component): New predicare. (gnat_strip_type_conversion): Delete. (outer_atomic_access_required_p): Likewise. (atomic_access_required_p): Rename into... (get_atomic_access): ...this. Implement the 3 different semantics of Atomic and Volatile_Full_Access. (simple_atomic_access_required_p): New predicate. (Call_to_gnu): Remove outer_atomic_access parameter and change the type of atomic_access parameter to atomic_acces_t. Replace call to atomic_access_required_p with simple_atomic_access_required_p for the in direction and call get_atomic_access for the out direction instead of [outer_]atomic_access_required_p. (lhs_or_actual_p): Constify local variables. (present_in_lhs_or_actual_p): Likewise. (gnat_to_gnu) <N_Identifier>: Replace call to atomic_access_required_p with simple_atomic_access_required_p. <N_Explicit_Dereference>: Likewise. <N_Indexed_Component>: Likewise. <N_Selected_Component>: Likewise. <N_Assignment_Statement>: Call get_atomic_access for the name instead of [outer_]atomic_access_required_p. Adjust call to Call_to_gnu. <N_Function_Call>: Adjust call to Call_to_gnu. (get_controlling_type): Fix typo in comment. From-SVN: r279427
2019-12-16[Ada] Export the Ada version through the C interfaceEric Botcazou3-2/+22
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * fe.h (Ada_Version_Type): New typedef. (Ada_Version): Declare. * opt.ads (Ada_Version_Type): Add Convention C and WARNING line. (Ada_Version): Add WARNING line. (Exception_Mechanism_Type): Likewise. From-SVN: r279426
2019-12-16[Ada] Minor reformatting and U.S. spelling adjustmentGary Dismukes3-12/+16
2019-12-16 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * checks.adb, sem_util.adb: Minor reformatting and U.S. spelling adjustment. From-SVN: r279425
2019-12-16[Ada] Better error message for "is null" subunitBob Duff2-0/+20
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * sem_ch10.adb (Analyze_Subunit): Give an error if the subunit is not a proper body. This hides the confusing "duplicate body" message that was previously given. From-SVN: r279424
2019-12-16[Ada] Expand renamings of subcomponents of an atomic or VFA objectEric Botcazou2-5/+25
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Document third special case of renamings requiring special handling. (Evaluation_Required): Return true for an atomic or VFA prefix. From-SVN: r279423
2019-12-16[Ada] Crash on conversion in branch of if-expressionEd Schonberg2-1/+26
2019-12-16 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * checks.adb (Apply_Float_Conversion_Check): Use node of type conversion and not its parent, when inserting the declaration for the temporary that hold the result of the conversion. Previously the declaration was inserted above the parent of the conversion, apparently as a small optimization for the subsequent traversal in Insert_Actions. Unfortunately a similar optimization takes place in Insert_Actions, assuming that the insertion point must be above the expression that creates the actions to insert. This is not correct in the presence of conditional expressions (i.e. since Ada2012), where the insertion must be in the list of actions attached to the current alternative. From-SVN: r279422
2019-12-16[Ada] Bad warning: Size in Compile_Time_Error in nested instanceBob Duff2-2/+12
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * sem_attr.adb (Analyze_Attribute): Use Known_RM_Size. But we still need Size_Known_At_Compile_Time, because when the size really is known, sometimes only one or the other of these is True. From-SVN: r279421
2019-12-16[Ada] Small consistency fix for Volatile_Full_Access objectsEric Botcazou3-7/+51
2019-12-16 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_util.adb (Is_Atomic_Or_VFA_Object): Also return true for components whose type is Volatile_Full_Access or which are subject to the aspect/pragma individually. * sem_util.ads (Is_Atomic_Object_Entity): Small comment fix. From-SVN: r279420
2019-12-16[Ada] Do not issue restriction violations on ignored ghost codeYannick Moy3-3/+16
2019-12-16 Yannick Moy <moy@adacore.com> gcc/ada/ * exp_ch6.adb: Fix comment. * sem_res.adb (Resolve_Call): Do not check No_Recursion restriction or indirectly No_Secondary_Stack restriction, when inside an ignored ghost subprogram. From-SVN: r279419
2019-12-16[Ada] AI12-0208 Support for Ada.Numerics.Big_Numbers.Big_Integers and Big_RealsArnaud Charlet13-1100/+3454
2019-12-16 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * impunit.adb: Add a-nbnbin, a-nbnbre, a-nubinu to Ada 2020 units. * Makefile.rtl: Enable new file. * libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads, libgnat/a-nbnbre.adb, libgnat/a-nbnbre.ads, libgnat/a-nubinu.ads: New files. Provide default standalone implementation of Ada.Numerics.Big_Numbers.Big_* based on System.Generic_Bignum. * libgnat/a-nbnbin__gmp.adb: Alternate implementation of Ada.Numerics.Big_Numbers.Big_Integers based on GMP. Not enabled for now. * libgnat/s-bignum.ads, libgnat/s-bignum.adb: Now a simple wrapper on top of s-genbig.ads. * libgnat/s-genbig.ads, libgnat/s-genbig.adb: New files, making s-bignum generic for reuse in Ada.Numerics.Big_Numbers. From-SVN: r279418
2019-12-16[Ada] Correct documentation of -gnatw_C switchBob Duff3-2/+8
2019-12-16 Bob Duff <duff@adacore.com> gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Correct documentation of -gnatw_C switch * gnat_ugn.texi: Regenerate. From-SVN: r279417
2019-12-16[Ada] Reword the impact of -minimal on the debuggerJoel Brobecker3-2/+15
2019-12-16 Joel Brobecker <brobecker@adacore.com> gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (_Switches_for_gnatbind): Reword the section explaining the impact of -minimal on debugging. * gnat_ugn.texi: Regenerate. From-SVN: r279416
2019-12-16[Ada] Typo fixes and minor reformattingGary Dismukes3-8/+17
2019-12-16 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * libgnat/g-exptty.adb, libgnat/g-exptty.ads: Typo fixes and minor reformatting. From-SVN: r279415