aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
AgeCommit message (Collapse)AuthorFilesLines
2020-05-25[Ada] Change pragma Compile_Time_Error to force compile-time evaluationYannick Moy7-29/+99
2020-05-25 Yannick Moy <moy@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document changes to pragmas Compile_Time_Error/Compile_Time_Warning. * gnat_rm.texi: Regenerate. * libgnat/g-bytswa.adb: Change uses of Compile_Time_Error to Compile_Time_Warning, as the actual expression may not always be known statically. * sem_prag.adb (Analyze_Pragma): Handle differently pragma Compile_Time_Error in both compilation and in GNATprove mode. (Validate_Compile_Time_Warning_Or_Error): Issue an error or warning when the expression is not known at compile time. * usage.adb: Add missing documentation for warning switches _c and _r. * warnsw.ads: Update comment.
2020-05-25[Ada] Spurious accessibility error on return aggregate in GNATprove modeJustin Squirek2-12/+17
2020-05-25 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_ch6.adb (Check_Return_Obj_Accessibility): Use original node to avoid looking at expansion done in GNATprove mode.
2020-05-25Fix internal error on problematic renamingEric Botcazou2-46/+64
This is an internal renaming generated for a generalized loop iteration made on a tagged record type with predicate, and gigi cannot use the most efficient way of implementing renamings because the renamed object is an expression with a non-empty Actions list. gcc/ada/ChangeLog * gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable and use it throughout the function. <E_Variable>: Rename local variable and adjust accordingly. In the case of a renaming, materialize the entity if the renamed object is an N_Expression_With_Actions node. <E_Procedure>: Use Alias accessor function consistently. gcc/testsuite/ChangeLog * gnat.dg/renaming16.adb: New test. * gnat.dg/renaming16_pkg.ads: New helper.
2020-05-25Fix small fallout of earlier changeEric Botcazou2-0/+8
gcc/ada/ChangeLog * gcc-interface/misc.c (get_array_bit_stride): Get to the debug type, if any, before calling gnat_get_array_descr_info.
2020-05-25Fix missing back-annotation for derived typesEric Botcazou2-27/+53
Gigi fails to back-annotate the Present_Expr field of variants present in a type derived from a discriminated untagged record type, which is for example visible in the output -gnatRj. gcc/ada/ChangeLog * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Tidy up. (build_variant_list): Add GNAT_VARIANT_PART parameter and annotate its variants if it is present. Adjust the recursive call by passing the variant subpart of variants, if any. (copy_and_substitute_in_layout): Rename GNU_SUBST_LIST to SUBST_LIST and adjust throughout. For a type, pass the variant part in the call to build_variant_list.
2020-05-25Fix incorrect handling of Component_SizeEric Botcazou2-3/+24
The compiler can mishandle a Component_Size clause on an array type specifying a size multiple of the storage unit, when this size is not a multiple of the alignment of the component type. gcc/ada/ChangeLog * gcc-interface/decl.c (gnat_to_gnu_component_type): Cap alignment of the component type according to the component size. gcc/testsuite/ChangeLog * gnat.dg/array40.adb: New test. * gnat.dg/array40_pkg.ads: New helper.
2020-05-25Change description of fat pointertype with -fgnat-encodings=minimalEric Botcazou4-91/+84
This makes a step back in the representation of fat pointer types in the debug info with -fgnat-encodings=minimal so as to avoid hiding the data indirection and making it easiser to synthetize the construct. gcc/ada/ChangeLog * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Add a description of the various types associated with the unconstrained type. Declare the fat pointer earlier. Set the current function as context on the template type, and the fat pointer type on the array type. Always mark the fat pointer type as artificial and set it as the context for the pointer type to the array. Also reuse GNU_ENTITY_NAME. Finish up the unconstrained type at the very end. * gcc-interface/misc.c (gnat_get_array_descr_info): Do not handle fat pointer types and tidy up accordingly. * gcc-interface/utils.c (build_unc_object_type): Do not set the context on the template type.
2020-05-25Add missing ChangeLog entries in previous commitEric Botcazou1-0/+8
2020-05-25Fix wrong assignment to mutable Out parameter of task entryEric Botcazou3-31/+32
Under very specific circumstances the compiler can generate a wrong assignment to a mutable record object which contains an array component, because it does not correctly handle the update of the discriminant. gcc/ada/ChangeLog * gcc-interface/gigi.h (operand_type): New static inline function. * gcc-interface/trans.c (gnat_to_gnu): Do not suppress conversion to the resulty type at the end for array types. * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Do not remove conversions between array types on the LHS. gcc/testsuite/ChangeLog * gnat.dg/array39.adb: New test. * gnat.dg/array39_pkg.ads: New helper. * gnat.dg/array39_pkg.adb: Likewise.
2020-05-12Be prepared for more aggregates in gigiEric Botcazou5-7/+34
This makes sure that gigi is prepared to handle more aggregates in the special memset code path. * sem_aggr.ads (Is_Single_Aggregate): New function. * sem_aggr.adb (Is_Others_Aggregate): Use local variable. (Is_Single_Aggregate): New function to recognize an aggregate with a single association containing a single choice. * fe.h (Is_Others_Aggregate): Delete. (Is_Single_Aggregate): New declaration. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Call Is_Single_Aggregate instead of Is_Others_Aggregate.
2020-05-12Fix incorrect scalar storage order handlingEric Botcazou2-5/+18
This fixes an oversight in the new canonicalization code for packable types: it does not take into account the scalar storage order. PR ada/95035 * gcc-interface/utils.c (packable_type_hasher::equal): Also compare the scalar storage order. (hash_packable_type): Also hash the scalar storage order. (hash_pad_type): Likewise.
2020-05-09Update copyright yearEric Botcazou13-12/+16
2020-05-09Add assertion for access attributesEric Botcazou2-0/+8
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Assert that the prefix is not a type.
2020-05-09Fix small issues with -fgnat-encodings=minimalEric Botcazou7-208/+247
This is the mode where the GNAT compiler does not use special encodings in the debug info to describe some Ada constructs, for example packed array types. * gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Rename into... (TYPE_BIT_PACKED_ARRAY_TYPE_P): ...this. (TYPE_IS_PACKED_ARRAY_TYPE_P): Rename into... (BIT_PACKED_ARRAY_TYPE_P): ...this. (TYPE_IMPL_PACKED_ARRAY_P): Adjust to above renaming. * gcc-interface/gigi.h (maybe_pad_type): Remove IS_USER_TYPE.. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Adjust call to maybe_pad_type. <E_Ordinary_Fixed_Point_Type>: Remove const qualifiers for tree. <E_Signed_Integer_Subtype>: Remove redundant test and redundant call to associate_original_type_to_packed_array. Turn into assertion. Call associate_original_type_to_packed_array and modify gnu_entity_name accordingly. Explicitly set the parallel type for GNAT encodings. Call create_type_decl in the misaligned case before maybe_pad_type. <E_Array_Type>: Do not use the name of the implementation type for a packed array when not using GNAT encodings. <E_Array_Subtype>: Move around setting flags. Use the result of the call to associate_original_type_to_packed_array for gnu_entity_name. <E_Record_Subtype>: Create XVS type and XVZ variable only if debug info is requested for the type. Call create_type_decl if a padded type was created for a type entity (gnat_to_gnu_component_type): Use local variable and adjust calls to maybe_pad_type. (gnat_to_gnu_subprog_type): Adjust call to maybe_pad_type. (gnat_to_gnu_field): Likewise. (validate_size): Adjust to renaming of macro. (set_rm_size): Likewise. (associate_original_type_to_packed_array): Adjust return type and return the name of the original type if GNAT encodings are not used * gcc-interface/misc.c (gnat_get_debug_typ): Remove obsolete stuff. (gnat_get_fixed_point_type_info): Remove const qualifiers for tree. (gnat_get_array_descr_info): Likewise and set variables lazily. Remove call to maybe_debug_type. Simplify a few computations. (enumerate_modes): Remove const qualifier for tree. * gcc-interface/utils.c (make_type_from_size): Adjust to renaming. (maybe_pad_type): Remove IS_USER_TYPE parameter and adjust. Remove specific code for implementation types for packed arrays. (compute_deferred_decl_context): Remove const qualifier for tree. (convert): Adjust call to maybe_pad_type. (unchecked_convert): Likewise. * gcc-interface/utils2.c (is_simple_additive_expressio): Likewise.
2020-05-09Fix tree sharing issue with slicesEric Botcazou2-2/+14
This can happen because we build an array type on the fly in case there is an apparent type inconsistency in the construct. * gcc-interface/utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Use build_nonshared_array_type to build the common type and declare it.
2020-05-09Do not override -fnon-call-exceptions in default modeEric Botcazou2-1/+7
This was already the case in -gnatp mode. * gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the user for -fnon-call-exceptions in default mode.
2020-05-09Do not make a local copy of large aggregateEric Botcazou2-13/+83
This prevents gigi from making a local copy of large aggregates. * gcc-interface/trans.c (lvalue_required_p) <N_Selected_Component>: Merge with N_Slice. <N_Allocator>: Move to... (lvalue_for_aggregate_p): ...here. New function. (Identifier_to_gnu): For an identifier with aggregate type, also call lvalue_for_aggregate_p if lvalue_required_p returned false before substituting the identifier with the constant.
2020-05-09Fix problematic cases of wrappingEric Botcazou2-2/+8
* gcc-interface/trans.c (gnat_to_gnu): Do not wrap boolean values if they appear in any kind of attribute references.
2020-05-09Accept qualified aggregates in memset pathEric Botcazou2-12/+21
Aggregates can be surrounded by a qualified expression and this prepares the support code in gigi for accepting them. * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Deal with qualified "others" aggregates in the memset case.
2020-05-09Fix missing back-annotation for Out parameterEric Botcazou2-1/+9
This happens when it is passed by copy and not passed in. * gcc-interface/decl.c (gnat_to_gnu_param): Also back-annotate the mechanism in the case of an Out parameter only passed by copy-out.
2020-05-09Small housekeeping work in gigiEric Botcazou5-81/+66
No functional changes. * gcc-interface/gigi.h (change_qualified_type): Move around. (maybe_vector_array): Likewise. (maybe_padded_object): New static line function. * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Component_Size>: Remove useless code. <Attr_Null_Parameter>: Remove obsolete code. (Call_to_gn): Likewise. Use maybe_padded_object to remove padding. (gnat_to_gnu): Likewise. <N_String_Literal>: Do not add a useless null character at the end. <N_Indexed_Component>: Likewise and remove obsolete code. (add_decl_expr): Likewise. (maybe_implicit_deref): Likewise. * gcc-interface/utils.c (maybe_unconstrained_array): Likewise. * gcc-interface/utils2.c (gnat_invariant_expr): Likewise.
2020-05-09Remove last use of expr_alignEric Botcazou2-1/+11
It was in the ada/gcc-interface repository and is outdated. * tree.h (expr_align): Delete. * tree.c (expr_align): Likewise. ada/ * gcc-interface/utils2.c: Include builtins.h. (known_alignment) <ADDR_EXPR>: Use DECL_ALIGN for DECL_P operands and get_object_alignment for the rest.
2020-05-08Fix uniqueness of address for aliased objectsEric Botcazou2-3/+18
Two aliased objects must have distinct addresses, even if they have size zero, so we make sure to allocate at least one byte for them. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Force at least the unit size for an aliased object of a constrained nominal subtype whose size is variable.
2020-05-08Couple of tweaks to help in LTO modeEric Botcazou3-8/+141
The first tweak is to remove the TREE_OVERFLOW flag on INTEGER_CSTs because it prevents them from being uniquized in LTO mode. The second, unrelated tweak is to canonicalize the packable types made by gigi so that at most one per type is present in the GENERIC IL. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Deal with artificial maximally-sized types designed by access types. * gcc-interface/utils.c (packable_type_hash): New structure. (packable_type_hasher): Likewise. (packable_type_hash_table): New hash table. (init_gnat_utils): Initialize it. (destroy_gnat_utils): Destroy it. (packable_type_hasher::equal): New method. (hash_packable_type): New static function. (canonicalize_packable_type): Likewise. (make_packable_type): Make sure not to use too small a type for the size of the new fields. Canonicalize the type if it is named.
2020-05-08Fix missing information in exception messages with -gnateEEric Botcazou2-25/+33
The information was missing in cases the front-end was able to turn the range comparison into a simple comparison. * gcc-interface/trans.c (Raise_Error_to_gnu): Always compute a lower bound and an upper bound for use by the -gnateE switch for range and comparison operators.
2020-05-08Small tweak to gnat_to_gnu_paramEric Botcazou2-2/+10
We mark the type of In parameters in Ada with the const qualifier, but it is stripped by free_lang_data_in_type so do not do it in LTO mode. * gcc-interface/decl.c (gnat_to_gnu_param): Do not make a variant of the type in LTO mode.
2020-05-04Fix Ada bootstrap on Cygwin64Eric Botcazou3-1/+9
This fixes two compilation errors preventing bootstrap with Ada on x86_64-pc-cygwin. 2020-05-04 Mikael Pettersson <mikpelinux@gmail.com> PR bootstrap/94918 * mingw32.h: Prevent windows.h from including emmintrin.h on Cygw64. * s-oscons-tmplt.c (Serial_Port_Descriptor): Use System.Win32.HANDLE also on Cygwin.
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