aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-05[Ada] introduce stack scrub (strub) featureAlexandre Oliva10-851/+1178
gcc/ada/ * doc/gnat_rm.rst: Add... * doc/gnat_rm/security_hardening_features.rst: New. * doc/gnat_rm/about_this_guide.rst: Link to new chapter. * gnat_rm.texi: Regenerate. * gcc-interface/utils.c (handle_strub_attribute): New. (gnat_internal_attribute_table): Add strub. * libgnat/a-except.adb: Make Rcheck_CE_* strub-callable. * libgnat/a-except.ads (Raise_Exception): Likewise. (Raise_Exception_Always): Likewise. * libgnat/s-arit128.ads (Multiply_With_Ovflo_Check128): Likewise. * libgnat/s-arit64.ads (Multiply_With_Ovflo_Check64): Likewise. * libgnat/s-secsta.ads (SS_Allocate, SS_Mark, SS_Release): Likewise.
2021-10-05[Ada] Mark private component renaming as coming from sourceEric Botcazou1-6/+13
gcc/ada/ * exp_ch9.adb (Install_Private_Data_Declarations): Copy the Sloc of components for the local renamings as well as the Comes_From_Source flag, and also set Warnings_Off on them. Use Nam local variable.
2021-10-05[Ada] Add comments in Ada.Task_InitializationArnaud Charlet1-1/+5
gcc/ada/ * libgnarl/a-tasini.ads (Set_Initialization_Handler): Update comments.
2021-10-05[Ada] Include errno.h in QNX specific part of the signal handlingCorentin Gay1-0/+1
gcc/ada/ * init.c (QNX): Add #include errno.h.
2021-10-05[Ada] Remove left-overs of Unaligned_Valid attributeEric Botcazou2-3/+1
gcc/ada/ * exp_attr.adb (Expand_Fpt_Attribute): Likewise. * snames.ads-tmpl (Name_Unaligned_Valid): Delete.
2021-10-05[Ada] Forbids use of Compile_Time_(Error|Warning) as configuration pragmaEtienne Servais5-142/+130
gcc/ada/ * sem_prag.adb (Analyze_Pragma): Forbid use of Compile_Time_(Error|Warning) as configuration pragma. * doc/gnat_ugn/the_gnat_compilation_model.rst: Compile_Time_(Error|Warning) and Compiler_Unit(_Warning) are not configuration pragmas and shall not be listed as such. The following pragmas are either obsolete or undocumented: No_Run_Time, Propagate_Exceptions, Rational, Ravenscar, Restricted_Run_Time, Short_Descriptors, Universal_Data. Fix some typos (notably on Restriction_Warnings). * doc/gnat_rm/implementation_defined_pragmas.rst: Move Rename_Pragma documentation to alphabetical order. * gnat_rm.texi, gnat_ugn.texi: Regenerate.
2021-10-05[Ada] Add sys/time.h #include for QNXCorentin Gay1-0/+1
gcc/ada/ * adaint.c (QNX): Add #include for sys/time.h.
2021-10-05[Ada] Issue a proper error message when no format specifier foundPascal Obry1-1/+1
gcc/ada/ * libgnat/g-forstr.adb (Next_Format): When there is no more format specifier found issue a proper error message instead of raising a contraint error.
2021-10-05[Ada] Fix negative numbers formatted with leading zeroPascal Obry1-1/+1
gcc/ada/ * libgnat/g-forstr.adb (Get_Formatted): Fix computation of the number of zero to use in the formatted string. This was a wrong copy/paste.
2021-10-05[Ada] Minor code clean-upPascal Obry1-1/+1
gcc/ada/ * libgnat/g-forstr.adb (Get_Formatted): Minor code clean-up.
2021-10-05[Ada] Add missing functions to Wide_Wide_Characters HandlingEtienne Servais4-4/+90
gcc/ada/ * libgnat/a-zchhan.ads, libgnat/a-zchhan.adb (Character_Set_Version, Is_Basic, To_Basic): New. * libgnat/a-zchuni.ads, libgnat/a-zchuni.adb (Is_Basic, To_Basic): New.
2021-10-05[Ada] Improve error message on array aggregatesYannick Moy1-1/+1
gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Improve error message.
2021-10-05[Ada] Front-end support for Storage_Model featureGary Dismukes9-5/+834
gcc/ada/ * aspects.ads (type Aspect_Id): Add Aspect_Designated_Storage_Model and Aspect_Storage_Model_Type. (Aspect_Argument): Add associations for the above new aspects. (Is_Representation_Aspect): Likewise. (Aspect_Names, Aspect_Delay): Likewise. * exp_ch4.adb (Expand_N_Allocator): Call Find_Storage_Op rather than Find_Prim_Op. * exp_intr.adb (Expand_Unc_Deallocation): Likewise. * exp_util.ads (Find_Storage_Op): New function that locates either a primitive operation of a storage pool or an operation of a storage-model type specified in its Storage_Model_Type aspect. * exp_util.adb (Find_Storage_Op): New function that calls either Find_Prim_Op or Get_Storage_Model_Type_Entity to locate a storage-related operation that is associated with a type. * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Analyzes, resolves, and validates the arguments of aspect Designated_Storage_Model_Type. (Analyze_Aspect_Specifications): Sets delay-related flags on storage-model aspects when Delay_Required. Checks that aspect Designated_Storage_Model is only specified for an access type and that aspect Storage_Model_Type is only specified on an immutably limited type. Also records such aspects for their associated types. (Check_Aspect_At_Freeze_Point): Resolve each of the argument associations given for a Storage_Model_Type aspect. (Resolve_Storage_Model_Type_Argument): New procedure that resolves an argument given in the association for a given entity name associated with a type with aspect Storage_Model_Type, ensuring that it has the proper kind or profile. (Validate_Storage_Model_Type_Aspect): New procedure that checks the legality and completeness of the entity associations given in a Storage_Model_Type aspect. * sem_util.ads (package Storage_Model_Support): New nested package that encapsulates a set of convenient utility functions for retrieving entities, etc. associated with storage-model-related types and objects. (Get_Storage_Model_Type_Entity): New function to return a specified entity associated with a type that has aspect Storage_Model_Type. (Has_Designated_Storage_Model_Aspect): New function that returns whether a type has aspect Designated_Storage_Model. (Has_Storage_Model_Type_Aspect): New function that returns whether a type has aspect Storage_Model_Type. (Storage_Model_Object): New function that returns the object Entity_Id associated with a type's Designated_Storage_Model aspect. (Storage_Model_Type): New function that returns the type associated with a storage-model object (when the object's type specifies Storage_Model_Type). (Storage_Model_Address_Type): New function that returns the Address_Type associated with a type that has aspect Storage_Model_Type. (Storage_Model_Null_Address): New function that returns the Null_Address constant associated with a type that has aspect Storage_Model_Type. (Storage_Model_Allocate): New function that returns the Allocate procedure associated with a type that has aspect Storage_Model_Type. (Storage_Model_Deallocate): New function that returns the Deallocate procedure associated with a type that has aspect Storage_Model_Type. (Storage_Model_Copy_From): New function that returns the Copy_From procedure associated with a type that has aspect Storage_Model_Type. (Storage_Model_Copy_To): New function that returns the Copy_To procedure associated with a type that has aspect Storage_Model_Type. (Storage_Model_Storage_Size): New function that returns the Storage_Size function associated with a type that has aspect Storage_Model_Type. * sem_util.adb (package Storage_Model_Support): Body of new nested package that contains the implementations the utility functions declared in the spec of this package. * snames.ads-tmpl: Add new names Name_Designated_Storage_Pool, Name_Storage_Model, Name_Storage_Model_Type, Name_Address_Type, Name_Copy_From, Name_Copy_To, and Name_Null_Address for the new aspects and associated aspect arguments.
2021-10-05[Ada] Note that -gnatd_t is used in CCGRichard Kenner1-1/+5
gcc/ada/ * debug.adb: Add documentation for -gnatd_t.
2021-10-05[Ada] Add case to consider ENODEV a "file not found error"Corentin Gay1-0/+4
gcc/ada/ * sysdep.c (__gnat_is_file_not_found_error): Add else if case.
2021-10-05[Ada] Rewrite operator entity in derived class-wide expressionsPiotr Trojanek1-1/+1
gcc/ada/ * exp_util.adb (Build_Class_Wide_Expression): Replace entities of both identifiers and operator symbols.
2021-10-05[Ada] Propagate Ghost status from parent to derived subprogramsPiotr Trojanek1-0/+8
gcc/ada/ * sem_ch3.adb (Derive_Subprogram): Copy ghost status from parent to derived subprogram.
2021-10-05[Ada] Add Default_Initial_Condition to type Unbounded_StringJoffrey Huguet2-2/+4
gcc/ada/ * libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Add Default_Initial_Condition to Unbounded_String.
2021-10-05[Ada] Disable contract cases on formal containersClaire Dross7-0/+7
gcc/ada/ * libgnat/a-cfdlli.ads: Use pragma Assertion_Policy to disable contract cases at execution. * libgnat/a-cfinve.ads: Idem. * libgnat/a-cofove.ads: Idem. * libgnat/a-cfhase.ads: Idem. * libgnat/a-cfhama.ads: Idem. * libgnat/a-cforse.ads: Idem. * libgnat/a-cforma.ads: Idem.
2021-10-05[Ada] Improve message on missing all/for in pre-Ada-2022 modesBob Duff2-44/+49
gcc/ada/ * par-ch4.adb (P_Iterated_Component_Association): Parse these features the same way in all language versions. Move the call to Error_Msg_Ada_2022_Feature into semantic analysis. * sem_aggr.adb (Resolve_Iterated_Component_Association, Resolve_Iterated_Association): Move the call to Error_Msg_Ada_2022_Feature here from par-ch4.adb.
2021-10-05[Ada] Improve error message on missing all/for in quantified expressionYannick Moy1-0/+18
gcc/ada/ * sem_res.adb (Resolve): Recognize specially that case.
2021-10-05[Ada] Proof of Ada.Strings.MapsYannick Moy2-38/+395
gcc/ada/ * libgnat/a-strmap.adb: Add ghost code for proof. (To_Range): This is the most involved proof, as it requires creating the result of the call to To_Domain as a ghost variable, and show the unicity of this result in order to prove the postcondition. * libgnat/a-strmap.ads: (SPARK_Proof_Sorted_Character_Sequence): New ghost function. (To_Domain): Add postcondition regarding sorting of result. (To_Range): Fix postcondition that should compare Length instead of Last for the results of To_Domain and To_Range, as the value of Last for an empty result is not specified in the Ada RM.
2021-10-05[Ada] Proof of Ada.Characters.HandlingYannick Moy3-84/+428
gcc/ada/ * libgnat/a-chahan.adb: Add loop invariants as needed to prove subprograms. Also use extended return statements where appropriate and not done already. Mark data with Relaxed_Initialization where needed for initialization by parts. Convert regular functions to expression functions where needed for proof. * libgnat/a-chahan.ads: Add postconditions. * libgnat/a-strmap.ads (Model): New ghost function to create a publicly visible model of the private data Character_Mapping, needed in order to prove subprograms in Ada.Characters.Handling.
2021-10-05Adjust gfortran.dg/predict-2.f90Richard Biener1-2/+2
After teaching VN to handle internal functions we now optimize the redundant inner loop preheader check of the testcase making the dump scanning fail because there's nothing to predict left. The following restores the inner preheader check by making it not redundant. 2021-10-05 Richard Biener <rguenther@suse.de> * gfortran.dg/predict-2.f90: Adjust to avoid redundant inner loop preheader checking code.
2021-10-05Daily bump.GCC Administrator10-1/+475
2021-10-04c-family: Implement -Warray-compare [PR97573]Marek Polacek8-3/+164
This patch addresses one of my leftovers from GCC 11. C++20 introduced [depr.array.comp]: "Equality and relational comparisons between two operands of array type are deprecated." so this patch adds -Warray-compare. Since the code in question is dubious (the comparison doesn't actually compare the array elements), I've added this warning for C too, and enabled it in all C++ modes. PR c++/97573 gcc/c-family/ChangeLog: * c-common.h (do_warn_array_compare): Declare. * c-warn.c (do_warn_array_compare): New. * c.opt (Warray-compare): New option. gcc/c/ChangeLog: * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare. gcc/cp/ChangeLog: * typeck.c (cp_build_binary_op): Call do_warn_array_compare. gcc/ChangeLog: * doc/invoke.texi: Document -Warray-compare. gcc/testsuite/ChangeLog: * c-c++-common/Warray-compare-1.c: New test. * c-c++-common/Warray-compare-2.c: New test.
2021-10-04avoid hardreg autoinitRichard Biener2-0/+11
This avoids initializating "uninitialized" hardregs like SP. 2021-10-04 Richard Biener <rguenther@suse.de> * gimplify.c (is_var_need_auto_init): DECL_HARD_REGISTER variables are not to be initialized. * gcc.dg/auto-init-hardreg-1.c: New testcase.
2021-10-04d: gdc driver ignores -static-libstdc++ when automatically linking libstdc++ ↵Iain Buclaw1-9/+34
library Adds handling of `-static-libstc++' in the gdc driver, so that libstdc++ is appropriately linked if libstdc++ is either needed or seen on the command-line. PR d/102574 gcc/d/ChangeLog: * d-spec.cc (lang_specific_driver): Link libstdc++ statically if -static-libstdc++ was given on command-line.
2021-10-04d: Save target node before parsing optimize options in case it changes.Iain Buclaw1-0/+8
Fixes an ICE seen on PowerPC targets with the attr_optimize*.d tests in the gdc.dg testsuite. gcc/d/ChangeLog: * d-attribs.cc (d_handle_optimize_attribute): Save target node before calling parse_optimize_options in case it changes.
2021-10-04middle-end/102285 - refine .DEFERRED_INIT expansionRichard Biener4-4/+20
This refines the way we figure whether we are facing a register that cannot be initialized by emitting a memset away from inspecting expanded RTL of the LHS to using the predicates expand_assignment is using to detect decls or MEM_REFs with non-memory DECL_RTL. 2021-10-04 Richard Biener <rguenther@suse.de> * expr.h (non_mem_decl_p): Declare. (mem_ref_refers_to_non_mem_p): Likewise. * expr.c (non_mem_decl_p): Export. (mem_ref_refers_to_non_mem_p): Likewise. * internal-fn.c (expand_DEFERRED_INIT): Do not expand the LHS but check the base with mem_ref_refers_to_non_mem_p and non_mem_decl_p. * c-c++-common/pr102285.c: New testcase.
2021-10-04tree-optimization/102570 - teach VN about internal functionsRichard Biener5-47/+103
We're now using internal functions for a lot of stuff but there's still missing VN support out of laziness. The following instantiates support and adds testcases for FRE and PRE (hoisting). 2021-10-04 Richard Biener <rguenther@suse.de> PR tree-optimization/102570 * tree-ssa-sccvn.h (vn_reference_op_struct): Document we are using clique for the internal function code. * tree-ssa-sccvn.c (vn_reference_op_eq): Compare the internal function code. (print_vn_reference_ops): Print the internal function code. (vn_reference_op_compute_hash): Hash it. (copy_reference_ops_from_call): Record it. (visit_stmt): Remove the restriction around internal function calls. (fully_constant_vn_reference_p): Use fold_const_call and handle internal functions. (vn_reference_eq): Compare call return types. * tree-ssa-pre.c (create_expression_by_pieces): Handle generating calls to internal functions. (compute_avail): Remove the restriction around internal function calls. * gcc.dg/tree-ssa/ssa-fre-96.c: New testcase. * gcc.dg/tree-ssa/ssa-pre-33.c: Likewise.
2021-10-04libstdc++: Implement P1518R2 for container deduction guidesJonathan Wakely33-39/+568
This implements the C++23 P1518R2 proposal "Stop overconstraining allocators in container deduction guides" as a fix for C++17 and C++20 too. The changes allow class template argument deduction to ignore the type of a constructor argument that initializes an allocator_type parameter if the type should be deducible only from the other arguments. So for the constructor vector(const vector&, const allocator_type&) only the first argument is used for deduction, allowing the second argument to be anything that is implicitly convertible to argument_type. Previously deduction would fail or an ill-formed type would be deduced if the second argument wasn't of type allocator_type. The unordered containers do not need changes, because their allocator-extended constructors use the allocator_type alias, which comes from the dependent base class so is already a non-deduced context. libstdc++-v3/ChangeLog: * include/bits/forward_list.h (forward_list): Use non-deduced context for allocator parameter of allocator-extended copy and move constructors. * include/bits/stl_bvector.h (vector<bool>): Likewise. * include/bits/stl_deque.h (deque): Likewise. * include/bits/stl_list.h (list): Likewise. * include/bits/stl_map.h (map): Likewise. * include/bits/stl_multimap.h (multimap): Likewise. * include/bits/stl_multiset.h (multiset): Likewise. * include/bits/stl_set.h (set): Likewise. * include/bits/stl_vector.h (vector): Likewise. * include/bits/stl_queue.h (queue, priority_queue): Do not constrain Allocator template parameter of deduction guides that have a Container parameter. * include/bits/stl_stack.h (stack): Likewise. * include/debug/deque (__gnu_debug::deque): Use non-deduced context for allocator parameter of allocator-extended copy and move constructors. * include/debug/list (__gnu_debug::list): Likewise. * include/debug/map.h (__gnu_debug::map): Likewise. * include/debug/multimap.h (__gnu_debug::multimap): Likewise. * include/debug/multiset.h (__gnu_debug::multiset): Likewise. * include/debug/set.h (__gnu_debug::set): Likewise. * include/debug/vector (__gnu_debug::vector): Likewise. * testsuite/23_containers/deque/cons/deduction.cc: Test class template argument deduction with non-deduced allocator arguments. * testsuite/23_containers/forward_list/cons/deduction.cc: Likewise. * testsuite/23_containers/list/cons/deduction.cc: Likewise. * testsuite/23_containers/map/cons/deduction.cc: Likewise. * testsuite/23_containers/multimap/cons/deduction.cc: Likewise. * testsuite/23_containers/multiset/cons/deduction.cc: Likewise. * testsuite/23_containers/priority_queue/deduction.cc: Likewise. * testsuite/23_containers/queue/deduction.cc: Likewise. * testsuite/23_containers/set/cons/deduction.cc: Likewise. * testsuite/23_containers/stack/deduction.cc: Likewise. * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise. * testsuite/23_containers/unordered_multimap/cons/deduction.cc: Likewise. * testsuite/23_containers/unordered_multiset/cons/deduction.cc: Likewise. * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise. * testsuite/23_containers/vector/cons/deduction.cc: Likewise.
2021-10-04libstdc++: Add missing noexcept to std::variant helperJonathan Wakely1-1/+1
libstdc++-v3/ChangeLog: * include/std/variant (__detail::__variant::__as): Add missing noexcept to first overload.
2021-10-04libstdc++: Disable std::string{,_view} construction from nullptr (P2166R1)Jonathan Wakely6-2/+13
Implement this C++23 feature. Because construction from a null pointer is undefined, we can implement it for C++11 and up, turning undefined behaviour into a compilation error. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_string(nullptr_t)): Define as deleted. (operator=(nullptr_t)): Likewise. * include/bits/cow_string.h (basic_string(nullptr_t)): Likewise. (operator=(nullptr_t)): Likewise. * include/std/string_view (basic_string_view(nullptr_t)): Likewise. * testsuite/21_strings/basic_string/cons/char/nullptr.cc: New test. * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Change dg-warning to dg-error. * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Likewise.
2021-10-04Remove static marker for range in alloca pass.Aldy Hernandez2-4/+9
The m_ranges[] field in int_range<N> are trees, so they live in GC space. Since invalid_range is static, it must be marked with GTY magic. However, calculating invalid_range is not particularly slow, or on a critical path, so we can just put it in local scope and recalculate every time. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/102560 * gimple-ssa-warn-alloca.c (alloca_call_type): Remove static marker for invalid_range. gcc/testsuite/ChangeLog: * g++.dg/Walloca2.C: New test.
2021-10-04middle-end/102587 - avoid auto-init for VLA vectorsRichard Biener3-1/+10
This avoids ICEing for VLA vector auto-init by not initializing. 2021-10-04 Richard Biener <rguenther@suse.de> PR middle-end/102587 * internal-fn.c (expand_DEFERRED_INIT): Guard register initialization path an avoid initializing VLA registers with it. * gcc.target/aarch64/sve/pr102587-1.c: New testcase. * gcc.target/aarch64/sve/pr102587-2.c: Likewise.
2021-10-04[Ada] Incremental patch for restriction No_Dynamic_Accessibility_ChecksJustin Squirek5-388/+518
gcc/ada/ * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Add new entry for No_Dynamic_Accessibility_Checks documenting behavior. * gnat_rm.texi: Regenerate. * exp_ch4.adb (Expand_N_In): Perform special expansion for membership tests when No_Dynamic_Accessibility_Checks is active. * sem_attr.adb (Resolve_Attribute): Skip static accessibility check on actuals for anonymous access type formal parameters, and add constants for readability. * sem_util.adb (Function_Call_Or_Allocator_Level): Use the innermost master for determining the level for function calls within the alternative accessibility model. (Type_Access_Level): Properly get the level for anonymous access function result types.
2021-10-04[Ada] Document the current behaviour of -gnateA switchPiotr Trojanek2-6/+8
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnateA): This switch no longer looks at the formal parameter type being composite (as originally mandated by SPARK), but in the parameter passing mechanism being not specified (as currently mandated by Ada). * gnat_ugn.texi: Regenerate.
2021-10-04[Ada] Handle properly user_defined literals given by operators.Ed Schonberg2-4/+27
gcc/ada/ * sem_ch6.adb (Analyze_Operator_Symbol): Recognize strings as operator names when they are the value of one of the Ada2022 aspects for User_Defined_Literals. * sem_ch13.adb (Analyze_One_Aspect): Handle an aspect value given by an Operator_Name. (Validate_Literal_Aspect): Call Analyze_Operator_Symbol when needed.
2021-10-04[Ada] Fix indentation in generated AST construction functionsPiotr Trojanek1-1/+2
gcc/ada/ * gen_il-gen.adb (Put_Make_Spec): Don't emit the LF character in the middle of a string, because the Put routine won't indent it properly.
2021-10-04[Ada] Implement CUDA_DeviceGhjuvan Lacambre3-22/+88
gcc/ada/ * gnat_cuda.adb (Remove_CUDA_Device_Entities): New function. (Expand_CUDA_Package): Call Remove_CUDA_Device_Entities. * gnat_cuda.ads (Expand_CUDA_Package): Expand documentation. * sem_prag.adb (Analyze_Pragma): Remove warning about CUDA_Device not being implemented.
2021-10-04[Ada] Completion of support for AI12-0409 (attribute ↵Gary Dismukes11-63/+130
Preelaborable_Initialization) gcc/ada/ * sem_ch7.adb (Analyze_Package_Specification): For types marked as Must_Have_Preelab_Init, we now check for the presence of a Preelaborable_Initialization aspect on the type, and pass the aspect's expression (if any) on the call to Has_Preelaborable_Initialization (or pass Empty if the type has no such aspect or the aspect has no associated expression). * sem_util.ads (Has_Preelaborable_Initialization): Change Boolean formal parameter Formal_Types_Have_Preelab_Init to instead be a formal of type Node_Id (named Preelab_Init_Expr), to allow passing an expression that may be a conjunction of Preelaborable_Initialization aspects. Revise spec comment accordingly (and remove ??? comment). * sem_util.adb (Type_Named_In_Preelab_Init_Expression): New nested function with a result indicating whether a given type is named as the prefix of a Preelaborable_Initialization attribute in the expression of a corresponding P_I aspect. (Has_Preelaborable_Initialization): For generic formal derived and private types, test whether the type is named in the expression Preelab_Init_Expr (by calling Type_Named_In_Preelab_Init_Expression), and if so, treat the formal type as having preelaborable initialization (returning True). * libgnat/a-cobove.ads (Vector): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cbdlli.ads (List): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cbhama.ads (Map): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as (Element_Type'Preelaborable_Initialization and Key_Type'Preelaborable_Initialization). (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cborma.ads (Map): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as (Element_Type'Preelaborable_Initialization and Key_Type'Preelaborable_Initialization). (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cbhase.ads (Set): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cborse.ads (Set): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-cbmutr.ads (Tree): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True). * libgnat/a-coboho.ads (Holder): Replace pragma Preelaborable_Initialization with the aspect, specifying its value as Element_Type'Preelaborable_Initialization. (Cursor): Replace pragma P_I with the aspect (defaulting to True).
2021-10-04[Ada] Mark Ada.Text_IO in SPARKYannick Moy3-4/+12
gcc/ada/ * libgnat/a-textio.adb: Mark body out of SPARK. * libgnat/a-textio.ads: Mark spec in SPARK and private part out of SPARK. * sem.adb (Semantics.Do_Analyze): Similar to ghost code attributes, save and restore value of Ignore_SPARK_Mode_Pragmas_In_Instance.
2021-10-04[Ada] Minor comment fix in System.RegpatBob Duff1-6/+5
gcc/ada/ * libgnat/s-regpat.ads: Change Data_First to Data'First. Change "still" to "always". Similar changes for Data_Last.
2021-10-04[Ada] Refactor duplicate code for pretty-printing GNAT ASTPiotr Trojanek1-9/+1
gcc/ada/ * sprint.adb (Sprint_Node_Actual): Refactor code for generic package and subprogram declarations.
2021-10-04[Ada] Remove repeated calls to Prefix in resolution of array accessesPiotr Trojanek1-43/+40
gcc/ada/ * sem_res.adb (Resolve_Indexed_Component, Resolve_Slice): Rename the local constant Name to Pref; remove repeated calls to Prefix.
2021-10-04[Ada] Emit specific SCOs for decisions of quantified expressionsMatthieu Eyraud2-1/+9
gcc/ada/ * scos.ads: Extend the documentation. * par_sco.adb (Process_Decisions): Emit specific SCOs for quantified expressions.
2021-10-04[Ada] Fix comment about expansion of slicesPiotr Trojanek3-5/+5
gcc/ada/ * checks.adb (Selected_Range_Checks): Fix style. * exp_ch4.adb (Expand_N_Slice): Fix style and comment. * sem_res.adb (Resolve_Indexed_Component): Fix style.
2021-10-04[Ada] Add Ada RM description of Ada.Strings.Bounded as comments in the specYannick Moy1-0/+90
gcc/ada/ * libgnat/a-strbou.ads: Add comments.
2021-10-04[Ada] Fix for a static Leading_Part attribute raising constraint errorPiotr Trojanek1-2/+16
gcc/ada/ * sem_attr.adb (Eval_Attribute): Evaluation of attribute Leading_Part with illegal second parameter is now similar to evaluation of Remainder with its second parameter being zero.