blob: 71b5dbdcf5489b8288587d3b3d152f4cf377a3f7 [file]
2026-06-09 Eric Botcazou <ebotcazou@adacore.com>
PR ada/125695
* libgnat/s-genbig.adb ("**"): Do not drop the sign on the floor.
(Big_Exp): Take into account the parity of the exponent for -2.
2026-06-05 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Analyze_Private_Extension_Declaration): Revert latest
change.
(Find_Type_Of_Subtype_Indic): Return Any_Type if Find_Type fails to
resolve the type.
* sem_ch12.adb (Analyze_Formal_Derived_Type): Restore more specific
error recovery path.
2026-06-05 Ronan Desplanques <desplanques@adacore.com>
* exp_ch6.adb (Needs_BIP_Collection): Fix condition.
2026-06-05 Mathias Aparicio <aparicio@adacore.com>
* libgnat/a-textio.adb
(Get_Upper_Half_Char, Get_Upper_Half_Char_Immed): Replace
Constraint_Error with Data_Error
2026-06-05 Viljar Indus <indus@adacore.com>
* sem_warn.adb (Warn_On_Suspicious_Index): Only check elements
that are coming from source.
2026-06-05 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Analyze_Private_Extension_Declaration): Be prepared
for Find_Type_Of_Subtype_Indic returning no type.
* sem_ch4.adb (Process_Generic_Instantiation): Give an error if the
generic instantation is referenced in a generic formal part.
* sem_ch12.adb (Analyze_Formal_Derived_Type): Return early in every
case of serious errors.
2026-06-04 Viljar Indus <indus@adacore.com>
* expander.adb: Handle pragma statements in the expander.
* sem_ch6.adb (Check_Statement_Sequence): Handle cases where
an ignored assertion pragma is at the end of a function body
that is known to trigger an assertion.
* sem_prag.adb (Analyze_Pragma): Remove the if-statement
creation for ignored pragmas. Relocate checks for assertion
pragma conditions that were performed on these transformed
if-statements here.
* sem_res.adb (Resolve_Short_Circuit): Remove the code for
ignored assertion pragmas.
* sem_util.adb (Original_Aspect_Pragma_Name): use the identifier
name for pragma Check only when it did not come from source.
* tbuild.adb (Make_Implicit_Loop_Statement): Adjust the code
for ignored Check pragmas.
2026-06-04 Viljar Indus <indus@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove overflow supression
workaround.
2026-06-04 Viljar Indus <indus@adacore.com>
* ghost.adb (Set_Ghost_Mode): Create ignored ghost regions
for ignored pragamas.
* sem_prag.adb (Analyze_Pragma): Mark ignored pragmas checks as
ignored ghost pragmas.
2026-06-04 Artur Pietrek <pietrek@adacore.com>
* exp_ch7.adb (Make_Address_For_Finalize): check
Has_Controlled_Component predicate before emitting the shift to be
consistant with what Is_Constr_Array_Subt_With_Bounds says.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb (Type_Access_Level): Revert ealier change.
* sem_ch3.adb (Derive_Subprogram.Replace_Type): Set the Scope of
the new anonymous access type to the scope of the derived type.
Do not (temporarily) sets the Scope of the subprogram to itself.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* errout.adb, exp_util.adb, sem_case.adb, sem_ch4.adb, sem_res.adb:
Replace low-lever inequality with a high-level routine.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* sem_intr.adb (Check_Intrinsic_Subprogram): Recognize pragmas that
do not come from source because they come from aspect specification.
2026-06-04 Ronan Desplanques <desplanques@adacore.com>
* opt.ads (Latest_Ada_Only): Remove.
* par-prag.adb (Prag): Adapt to removal.
* sem_prag.adb (Analyze_Pragma): Likewise.
* switch-c.adb (Scan_Front_End_Switches): Likewise.
* usage.adb (Usage): Likewise.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.ads (Apply_Accessibility_Check_For_Parameter):
Rename to...
(Apply_Accessibility_Check_For_Conversion): ...this.
* accessibility.adb (Apply_Accessibility_Check_For_Parameter):
Rename to...
(Apply_Accessibility_Check_For_Conversion): ...this.
* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Access>:
Adjust to above renaming.
* exp_ch4.adb (Expand_N_Type_Conversion): Likewise.
* exp_ch6.adb (Expand_Actuals): Likewise.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Local_Anonymous_Access): Mention return objects.
* accessibility.adb (Type_Access_Level): Call Enclosing_Subprogram.
* sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
on the anonymous access type of return objects.
2026-06-04 Steve Baird <baird@adacore.com>
* libgnat/a-cbinho.adb (Adjust): Avoid null pointer dereference.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Local_Anonymous_Access): Mention access results.
* accessibility.adb (Accessibility_Level): Add missing guard on
the entity for error cases. In the component cases, retrieve the
function call if the prefix is a captured function call. Remove
the bypass returning the library level in a return context if the
prefix is a function call. Call Function_Call_Or_Allocator_Level
in this case when the level of the prefix is tied to that of the
result of the enclosing function.
(Check_Return_Construct_Accessibility): Change the implementation
to do a bona-fide static accessibility check.
* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Merge the
implementations of the RM 3.10.2(28) rule for named and anonymous
access types.
* sem_ch6.adb (Analyze_Expression_Function): Set the Ekind of the
entity created for the body very early.
* sem_util.adb (In_Return_Value): Fix typo in comment.
2026-06-04 Mathias Aparicio <aparicio@adacore.com>
* sem_ch13.adb (Build_Discrete_Static_Predicate.Get_RList): If
case expression alternatives are False return False_Range.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Extra_Accessibility): Rename to...
(Extra_Accessibility_Of_Object): ...this and adjust description.
* gen_il-fields.ads (Opt_Field_Enum): Replace Extra_Accessibility
with Extra_Accessibility_Of_Object.
* gen_il-gen-gen_entities.adb (Constant_Or_Variable_Kind): Ditto.
(Formal_Kind): Ditto.
* accessibility.ads (Effective_Extra_Accessibility): Rename to...
(Extra_Accessibility): ...this.
* accessibility.adb (Apply_Accessibility_Check_For_Parameter): Do
not manually look through renamings and adjust.
(Effective_Extra_Accessibility): Rename to...
(Extra_Accessibility): ...this and add guard.
* exp_ch3.adb (Expand_N_Object_Declaration): Adjust.
* exp_ch4.adb (Expand_N_Type_Conversion): Likewise.
* exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
* exp_ch6.adb (Expand_Actuals): Likewise.
* sem_ch3.adb (Derive_Subprogram): Likewise.
* sem_ch6.adb (Create_Extra_Formals): Likewise.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): In the case of access
discriminants, pass Zero_On_Dynamic_Level to compute the static
accessibility level of the expression.
* sem_res.adb (Check_Aliased_Parameter): Pass Zero_On_Dynamic_Level
to compute the static accessibility level of actual parameters.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.ads (Accessibility_Level_Kind): Tweak description.
* accessibility.adb (Function_Call_Or_Allocator_Level): Recurse on
the defining identifier for an N_Object_Declaration node.
(Accessibility_Level): Minor tweaks.
* exp_ch3.adb (Expand_N_Object_Declaration): Do not special case
function calls in the computation of accessibility levels.
* exp_ch5.adb (Expand_N_Assignment_Statement): Do not manually
compute the accessibility level of the LHS.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Do not create
object declarations when actual is captured in an object renaming.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* sem_aux.adb (Is_Definite_Subtype): Only call Ekind if necessary.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* sem_ch13.adb (Rep_Item_Too_Late): Simplify with membership test.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* freeze.adb, sem_ch13.adb: Tune whitespace.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_ch4.adb (Expand_N_In): Rewrite with True/False entity array.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_ch9.adb (Scan_Declarations): Remove redundant guard.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_util.adb (Full_Qualified_Name_String): Add assertions; fix style.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Store chars without
converting the actual parameters.
* exp_ch11.adb (Null_String): Likewise.
* exp_disp.adb (Make_DT): Likewise.
* exp_util.adb (Fully_Qualified_Name_String): Likewise.
* sem_attr.adb (Analyze_Attribute): Likewise.
* sem_dist.adb (Full_Qualified_Name): Likewise.
* sem_prag.adb (Process_Interface_Name, Set_Encoded_Interface_Name):
Likewise.
* stringt.adb (Store_String_Chars): Likewise.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* sem_ch9.adb (Analyze_Requeue): Fix unbalanced parens.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_ch4.adb, sem_attr.adb, sem_ch3.adb: Use Access_Protected_Kind
and Access_Subprogram_Kind where possible.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* adaint.c (__gnat_library_template): Move logic to gnatmake.
* make.adb (Get_Library_File): Use simple single template.
2026-06-04 Viljar Indus <indus@adacore.com>
* libgnat/g-comlin.adb (Getopt): Check if Switches
are empty before looking at the first element.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.ads: Alphabetize declarations.
(Subprogram_Access_Level): Beef up description.
* accessibility.adb (Accessibility_Level): Deal with formal objects
of generic subprograms.
* sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Set the
Is_Local_Anonymous_Access flag on the access result type, if any.
* libgnat/g-cppexc.ads (Get_Access_To_Tagged_Object): Do not declare
the formal type parameter as abstract.
* libgnat/g-cppexc.adb (Get_Access_To_Object): Fix illegal code.
(Get_Access_To_Tagged_Object): Likewise.
2026-06-04 Steve Baird <baird@adacore.com>
* exp_attr.adb (Build_And_Insert_Type_Attr_Subp): Test for subunit case before
concluding that a subprogram body has no enclosing declaration list.
2026-06-04 Johannes Kanig <kanig@adacore.com>
* inline.ads: Introduce two new Boolean flags
* inline.adb (Cannot_Inline): Modify the negative message into
a warning, and use new flag
* sem_res.adb (Resolve_Call): Use new flag to guard issue of msg
* debug.adb: Debug flag now unused for GNATprove
2026-06-04 Tonu Naks <naks@adacore.com>
* adaint.c (__gnat_copy_attribs): Fix call to SetFileTime
2026-06-04 Viljar Indus <indus@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation): Remove
forced inlining in configurable run times.
2026-06-04 Marc Poulhiès <poulhies@adacore.com>
* sem_util.adb (Enclosing_Declaration): Refactor membership test.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_attributes.rst (Valid_Scalars):
Remove reference to private tagged types.
* exp_attr.adb (Expand_N_Attribute_Reference) <Valid_Scalars>: Do
not bail out for private tagged types.
* sem_attr.adb (Analyze_Attribute) <Valid_Scalars>: Do not warn for
for private tagged types.
* sem_ch3.adb (Is_Visible_Component): Accept any component reference
whose prefix is a type conversion that does not come from source.
* gnat_rm.texi: Regenerate.
2026-06-04 Mathias Aparicio <aparicio@adacore.com>
* sem_ch13.ads (Is_Predicate_Static): Public declaration,
from the private function in the package body
* sem_ch13.adb (Is_Predicate_Static): Remove the now-redundant
local declaration
* exp_ch4.adb (Expand_N_Case_Expression): Add Is_Predicate_Static
to the static guard
2026-06-04 Mathias Aparicio <aparicio@adacore.com>
* adaint.c (__gnat_is_executable_file_attr): Initialize
attr->regular using __gnat_is_regular_file_attr. Directly return
0 before checking if executable if the attr->regular is 0.
Remove the now unnecessary check for invalid_file_attributes.
2026-06-04 Claire Dross <dross@adacore.com>
* doc/gnat_rm/implementation_defined_aspects.rst (Aspect Iterable):
A Constant_Reference function can be supplied instead of an Element
function.
* gnat_rm.texi: Regenerate.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch3.adb (Is_Visible_Component): Fold Is_Local_Type predicate,
reason only on type entities, and tidy up specific processing added
for ACATS B730006 test.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* libgnat/a-tags.ads (Type_Specific_Data): Move Boolean components
to right after Natural components and put Is_Abstract last.
* exp_disp.adb (Make_DT): Adjust to above reordering.
2026-06-04 Viljar Indus <indus@adacore.com>
* ghost.adb (Is_OK_Statement): Avoid checking for policies and
levels when checking the context of the Initialized attribute.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Do not expand new
attribute.
* par-ch4.adb (Scan_Apostrophe): Parse 'At as an attribute reference;
otherwise, it would be parsed as a keyword.
* sem_attr.adb (Analyze_Attribute): Basic checks for new attribute.
(Eval_Attribute): New attribute will never be evaluated.
* snames.ads-tmpl: (Preset Names): "at" is now also an attribute, not
just a keyword.
(Attribute_Id): New attribute identifier.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.ads (In_Reverse_Storage_Order_Object): Adjust.
* sem_util.adb (In_Reverse_Storage_Order_Object): Rewrite.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* adaint.c (__gnat_prj_add_obj_files): Remove; files that referenced
this variable were removed years ago.
2026-06-04 Mathias Aparicio <aparicio@adacore.com>
* freeze.adb (Check_And_Freeze_Type): Emit a more precise error
message when a component's frozen record is incompletely defined
instead of printing private component error.
* sem_util.ads (Incompletely_Defined): New function that
traverses recursively a type and returns the first incompletely
defined component or itself if it is incompletely defined.
* sem_util.adb (Incompletely_Defined): Likewise.
(Is_Incompletely_Defined): Refactor to a test of the new
Incompletely_Defined function for equality with Empty.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124923
* exp_attr.adb (Expand_N_Attribute_Reference) <Valid_Scalars>: Also
bail out for a private type whose full view alone is tagged.
* sem_attr.adb (Analyze_Attribute) <Valid_Scalars>: Also warn for a
private type whose only full view alone is tagged.
2026-06-04 Steve Baird <baird@adacore.com>
* exp_attr.adb
(Expand_N_Attribute_Reference.Build_And_Insert_Type_Attr_Subp):
handle the case of a library unit subprogram body; do not assume
that every subprogram body has an enclosing declaration list.
2026-06-04 Piotr Trojanek <trojanek@adacore.com>
* par-prag.adb (Prag): Fix order.
* sem_prag.adb (Analyze_Pragma, Sig_Flags): Likewise.
* snames.ads-tmpl (Preset Names, Pragma_Id): Likewise.
2026-06-04 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124923
* exp_attr.adb (Build_Record_VS_Func): Rename first parameter, fix
description and implement support for tagged extensions.
(Expand_N_Attribute_Reference) <Attribute_Valid_Scalars>: Also bail
out for the class-wide type of private tagged types and Adjust call
to Build_Record_VS_Func.
* sem_attr.adb (Analyze_Attribute) <Attribute_Valid_Scalars>: Also
warn for the class-wide type of private tagged types.
* sem_ch4.adb (Try_Selected_Component_In_Instance): Extend a special
case from instance bodies to whole instances.
* sem_util.ads (Validated_View): Adjust description.
* sem_util.adb (Validated_View): Do not recurse on the parent type
for tagged extensions.
2026-06-04 Claire Dross <dross@adacore.com>
* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Use
Constant_Reference instead of Element if necessary.
* sem_ch13.adb (Resolve_Iterable_Operation): Check Constant_Reference.
(Validate_Iterable_Aspect): Handle Constant_Reference if supplied.
* sem_ch5.adb (Analyze_Loop_Parameter_Specification): Iteration over
elements of a container is allowed if Constant_Reference is supplied.
* sem_util.adb (Get_Iterable_Type_Primitive): Fix assertion.
* snames.ads-tmpl (Name_Constant_Reference): New name.
2026-06-04 Javier Miranda <miranda@adacore.com>
* errout.adb (Set_Msg_Node): Improve readability of message for
constructors name, replacing the internal compiler name
generated for direct attribute definitions with a nicer name.
* erroutc.ads (Replace_With_Attribute_Definition): Promote from
a nested subprogram declaration to a public package-level
declaration.
* erroutc.adb (Replace_With_Attribute_Definition): Move its
implementation to package level.
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Make]):
Code cleanup; handle assignment statement and limited type
object declaration.
* exp_ch3.adb (Build_Implicit_Parameterless_Constructor): Add
comment.
(Build_Default_Simple_Initialization): Add comment.
* exp_ch4.adb (Expand_N_Allocator): Fix No_Initialization for
internally generated allocators of types with constructors.
* exp_ch6.adb (Prepend_Constructor_Procedure_Prologue): Install
formals and refactor its body to be consistent with the GNAT
style.
* sem_ch3.adb (OK_For_Limited_Init_In_05): Accept T'Make since
it is semantically equivalent to a function call.
* sem_ch6.adb (Analyze_Direct_Attribute_Definition): Handle
incomplete and private type declarations.
* sem_ch13.adb (Diagnose_Misplaced_Aspects): Remove misleading
error for aspect 'Initializes.
* sem_res.adb (Resolve_Actuals): Skip check on the first actual
of init-proc and constructors because the constructor may be
invoked to initialize a constant object, which is allowed.
2026-06-04 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): In GNATprove mode, call the
back end before exiting on compilation errors.
2026-06-04 Johannes Kanig <kanig@adacore.com>
* comperr.adb (Compiler_Abort): Use the SPARK bug-report URL in
GNATprove mode only, and keep the GCC bug-report URL for other
FSF tools.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Validate
a known alignment on the object even if there is an address clause.
2026-06-02 Marc Poulhiès <poulhies@adacore.com>
* gcc-interface/trans.cc (gnat_to_gnu) <N_Exit_Statement>: Mark
the label tree as used.
(gnat_gimplify_stmt) <LOOP_STMT>: Do not emit end label
definition in unused.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Do not
give the warning about too large a size here but...
* gcc-interface/utils2.cc (build_allocator): ...here instead.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Type>: Do not
derive the layout of C-compatible unchecked union types.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (components_to_record): Tweak comment.
(build_position_list): Deal with unchecked union types.
(build_variant_list): Likewise.
(get_variant_part): Likewise.
(create_variant_part_from): Likewise.
(copy_and_substitute_in_layout): Likewise.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Subtype>: Do
not repeat conditions in chained tests.
(copy_and_substitute_in_layout): For a tagged subtype, inherit the
non-stored dicriminants from the old type explicitely.
* gcc-interface/trans.cc (gnat_to_gnu): Exclude more contexts for
the transformation of boolean rvalues.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/89609
* gcc-interface/gigi.h (adjust_result_decl_for_invisible_reference):
New inline function.
* gcc-interface/decl.cc (update_profile): Adjust the RESULT_DECL of
the function if it returns by invisible reference.
* gcc-interface/trans.cc (Subprogram_Body_to_gnu): Replace manual
adjustment by a call to adjust_result_decl_for_invisible_reference.
(maybe_make_gnu_thunk): Likewise.
* gcc-interface/targtyps.cc: Include stor-layout.h header file.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.cc (maybe_pad_type): Propagate the flag
TYPE_REVERSE_STORAGE_ORDER from the inner type to the record type
if the former is also an aggregate type.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb (Apply_Accessibility_Check_For_Return): Bail out
for the return synthesized in a function with _Wrapped_Statements.
2026-06-02 Tom Tromey <tromey@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst
(GNATLLVM): Remove note about nested functions.
* gnat_ugn.texi: Regenerate.
2026-06-02 Marc Poulhiès <poulhies@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not disable
expander if body comes from an expression function.
2026-06-02 Viljar Indus <indus@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove overflow supression
workaround.
2026-06-02 Viljar Indus <indus@adacore.com>
* rtsfind.adb (Maybe_Add_With): Ensure conistent Implicit_With nodes
traversal after ignored ghost nodes have been removed.
Omit checks on ignored WITH clauses.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* krunch.ads: Fix a few typos in the description.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gen_il-gen-gen_entities.adb (Access_Kind): Add Root_Type_Only for
the Master_Id field.
* einfo.ads (Master_Id): Document that it lives on root types only.
* accessibility.adb (Apply_Accessibility_Check_For_Allocator): Avoid
generating secondary useless checks.
* exp_ch3.adb (Build_Initialization_Call): Use the Master_Id of the
type of target reference directly.
(Build_Master): Minor tweak.
(Expand_N_Full_Type_Declaration): Do not call Build_Master for a
derived access type declaration.
* exp_ch4.adb (Expand_N_Allocator): Test Master_Id directly on the
access type.
* sem_res.adb (Resolve_Actuals): In the case of an allocator, if the
designated type is a CW interface, call Convert_To_And_Rewrite to
add the special conversion but nevertheless resolve the allocator to
the type of the formal afterward; do not establish a transient scope
if the type is a named access type.
2026-06-02 Piotr Trojanek <trojanek@adacore.com>
* libgnat/s-os_lib.adb (Get_Debuggable_Suffix, Get_Executable_Suffix,
Get_Object_Suffix, Get_Target_Debuggable_Suffix,
Get_Target_Executable_Suffix, Get_Target_Object_Suffix): Access strings
like we do in Gnatlink.
* adaint.c (__gnat_object_suffix, __gnat_executable_suffix,
__gnat_debuggable_suffix): Now constants, just like the ones for target
suffixes.
2026-06-02 Marc Poulhiès <poulhies@adacore.com>
* sinfo.ads <Expression_Copy>: Mention it is present in
N_Aspect_Specification nodes.
<N_Aspect_Specification>: Add Expression_Copy field.
2026-06-02 Mathias Aparicio <aparicio@adacore.com>
* env.c (__gnat_setenv): Add _POSIX_VERSION >= 200112L to setenv
availability check.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix a
couple of glitches.
* gnat_ugn.texi: Regenerate.
2026-06-02 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb (Copy_Parent_Attributes): Inherit Linker_Section_Pragma.
2026-06-02 Sebastian Poeplau <poeplau@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Mention
inline assembler limitations.
* gnat_ugn.texi: Regenerate.
2026-06-02 Piotr Trojanek <trojanek@adacore.com>
* adaint.c, adaint.h (__gnat_to_gm_time): Adapt C side, while keeping
the explicit conversion to time_t, if this ever needs to be debugged.
* libgnat/s-os_lib.adb (To_GM_Time): Adapt Ada side.
2026-06-02 Piotr Trojanek <trojanek@adacore.com>
* libgnat/a-calend.adb (localtime_tzoff): Simplify interface.
* sysdep.c (__gnat_localtime_tzoff): Remove duplicated specs; pass
"in" parameters via copy and "out" parameters via pointers.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/42413
* exp_ch4.adb (Process_Transients_In_Expression): Deal with a task
activation chain present in the statement list.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Also
establish a transient scope if the result type has tasks.
* exp_ch7.adb (Make_Transient_Block): Deal with Has_Master_Entity
and Has_Activation_Chain_Entity set on the transient scope.
* exp_ch9.ads (Make_Task_Activation_Call): New declaration from...
* exp_ch9.adb (Make_Task_Activation_Call): ...here.
(Build_Activation_Chain_Entity): Deal with transient scopes.
(Build_Master_Entity): Likewise.
(Find_Enclosing_Context): Likewise.
* sem_elab.adb (Activation_Processor.Process_Activation): Deal with
N_Expression_With_Actions nodes.
* sem_util.adb (Current_Entity_In_Scope): Prevent transient scopes
from being transparent for _Chain and _Master entities.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/42413
* exp_aggr.adb (Build_Record_Aggr_Code): Minor tweak.
* exp_ch9.adb (Make_Task_Activation_Call): New helper function.
(Build_Activation_Chain_Entity): Streamline.
(Build_Master_Entity): Rename local variable.
(Build_Task_Activation_Call): Call Make_Task_Activation_Call.
(Build_Task_Allocate_Block): Likewise. Set Is_Task_Allocation_Block
separately after having created the block.
* gen_il-gen-gen_nodes.adb (N_Block_Statement): Change the category
of Is_Task_Allocation_Block flag from syntactic to semantic.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/42413
* gen_il-fields.ads (Opt_Field_Enum): Remove Activation_Chain_Entity
and add Has_Activation_Chain_Entity.
* gen_il-gen-gen_entities.adb (Entity_Kind): Add new semantic flag
Has_Activation_Chain_Entity.
* gen_il-gen-gen_nodes.adb (N_Subprogram_Body): Remove
Activation_Chain_Entity field.
(N_Task_Body): Likewise.
(N_Package_Declaration): Likewise.
(N_Block_Statement): Likewise.
(N_Extended_Return_Statement): Likewise.
(N_Entry_Body): Likewise.
* einfo.ads (Has_Activation_Chain_Entity): Document new flag.
* sinfo.ads (Activation_Chain_Entity): Delete documentation.
* exp_ch9.adb (Build_Activation_Chain_Entity): Replace uses of
Activation_Chain_Entity by Has_Activation_Chain_Entity.
(Build_Task_Activation_Call): Retrieve the activation chain entity
by means of new helper function Activation_Chain_Entity.
(Build_Task_Allocate_Block): Set Has_Activation_Chain_Entity in
lieu of Activation_Chain_Entity.
(Expand_N_Task_Body): Likewise.
(Find_Enclosing_Context): Fix handling of N_Entry_Body.
* sem_ch7.adb (May_Need_Implicit_Body): Replace test on
Activation_Chain_Entity by Has_Activation_Chain_Entity.
2026-06-02 Viljar Indus <indus@adacore.com>
* exp_ch7.adb (Processing_Actions): Avoid processing
ignored ghost declarations.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/18205
* exp_attr.adb (Rewrite_Attribute_Proc_Call): Skip the conversion to
the formal type only if the actual is of a class-wide type. Generate
a dispatching call when both the prefix is a class-wide type and the
subprogram is a dispatching operation.
(Expand_N_Attribute_Reference) <Input>: Use U_Type consistently and
remove an useless invocation of Root_Type.
<Put_Image>: Minor comment tweak.
<Read>: Likewise.
<Write>: Likewise.
2026-06-02 Marc Poulhiès <poulhies@adacore.com>
* sysdep.c (getc_immediate_common): Cleanup macro test.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* sem_util.ads (Partially_Visible_Subcomponent): Rename into ...
(Partially_Visible_Part): ...this. Improve documentation.
* sem_util.adb: Likewise.
* sem_ch3.adb (Analyze_Component_Declaration,
Array_Type_Declaration): Adapt to renaming.
* sem_ch7.adb (Install_Composite_Operations): Likewise.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* einfo.ads (Contains_Ignored_Ghost_Code): Remove documentation.
2026-06-02 Mathias Aparicio <aparicio@adacore.com>
* sem_util.adb (Has_Assertion_Level_Argument): Invert the final
check in aspect branch and the check in pragma branch to use
early returns for consistency.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* par.adb, par-util.adb (Check_Bad_Layout_At): New procedure.
* par-ch3.adb (P_Declarative_Item): Use new procedure.
* par-ch5.adb (P_Sequence_Of_Statements): Likewise.
2026-06-02 Viljar Indus <indus@adacore.com>
* sem_util.adb (Has_Assertion_Level_Argument): Check for
the correct type of association.
2026-06-02 Viljar Indus <indus@adacore.com>
* err_vars.ads (Error_Msg_Qual_For_Standard): New Variable.
* errout.ads (Error_Msg_Qual_For_Standard): Likewise.
* errout.adb (Set_Qualification): Print all qualified names
when Error_Msg_Qual_For_Standard is set.
* sem_util.adb (Normalize_Actuals): Improve error message.
2026-06-02 Viljar Indus <indus@adacore.com>
* sem_util.adb (Normalize_Actuals): Improve error message.
2026-06-02 Mathias Aparicio <aparicio@adacore.com>
* env.c (__gnat_setenv): Add __linux__ preprocessor macro
directive to the setenv block.
2026-06-02 Viljar Indus <indus@adacore.com>
* ghost.adb (Check_Ghost_Equality_Op): Use Underlying_Type to
look through the private view before checking Is_Record_Type and
Is_Limited_Record.
* sem_ch3.adb (Process_Full_View): After completing the full view,
re-check any primitive equality operators on the private type
against SPARK RM 6.9(23) via Check_Ghost_Equality_Op.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.ads (Build_Task_Allocate_Block): Change return type.
* exp_ch9.adb (Build_Task_Allocate_Block): Likewise. Build an
internal block entity instead of declaring an implicit label.
* exp_aggr.adb (Convert_Aggr_In_Allocator): Adjust to above change.
* exp_ch4.adb (Expand_N_Allocator): Likewise.
* exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): Add default
value for Master_Actual parameter, change name of 4th parameter to
Chain_Actual and deal with them consistently.
(Make_Build_In_Place_Call_In_Allocator): Flatten block statement.
Adjust call to Add_Task_Actuals_To_Build_In_Place_Call.
(Make_Build_In_Place_Call_In_Anonymous_Context): Likewise.
(Make_Build_In_Place_Call_In_Assignment): Likewise.
(Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
* exp_ch7.adb (Build_Cleanup_Statements): Minor tweak.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* sem_aux.ads: Add note.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* sem.ads (Suppress_Stack_Entry): Move down Suppress component.
(Scope_Stack_Entry): Reorder components to eliminate holes.
2026-06-02 Tom Tromey <tromey@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst
(GNATLLVM): Update debugging documentation.
* gnat_ugn.texi: Regenerate.
2026-06-02 Bob Duff <duff@adacore.com>
* sem_ch13.adb
(Insert_Aitem): Remove Ins_Node formal parameter.
(Analyze_One_Aspect): Likewise.
(Analyze_Aspect_Specifications): Remove Ins_Node local variable.
(Insert_After_Place): New function containing the
special case for Annotate.
2026-06-02 Piotr Trojanek <trojanek@adacore.com>
* doc/gnat_rm/implementation_defined_attributes.rst (Attribute_Ref):
New section based on comment in sem_attr.ads.
* gnat_rm.texi: Regenerate.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* sem_util.adb, sem_util.ads (Partially_Visible_Subcomponent): Move
to right spot.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Build_Array_Aggr_Code): Adjust actual parameter in
the call to Build_Master_Entity.
* exp_ch3.adb (Expand_N_Full_Type_Declaration): Likewise.
(Expand_N_Object_Declaration): Likewise.
(Expand_Previous_Access_Type): Likewise.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context):
Likewise.
(Make_Build_In_Place_Iface_Call_In_Allocator): Likewise.
(Make_Build_In_Place_Iface_Call_In_Anonymous_Context): Likewise.
* sem_ch3.adb (Access_Definition): Likewise.
(Access_Type_Declaration): Likewise.
* exp_ch9.ads (Build_Activation_Chain_Entity): Tweak description.
(Build_Master_Entity): Change parameter and tweak description.
* exp_ch9.adb (Build_Master_Entity): Change parameter and adjust.
2026-06-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124143
* libgnat/s-spsufi.ads (Finalize_And_Deallocate): Adjust comment.
* libgnat/s-spsufi.adb: Remove clause for Ada.Unchecked_Deallocation
(Finalize_And_Deallocate): Adjust and implement AI12-0331.
* libgnat/s-stposu.ads (Allocate_From_Subpool): Remove ??? comment.
(Deallocate_Subpool): Likewise.
(SP_Node): Delete.
(SP_Node_Ptr): Likewise.
(Root_Storage_Pool_With_Subpools): Adjust type of Subpools component
(Root_Subpool): Remove Node, add Prev and Next components.
(Detach): Adjust signature.
(Initialize): Delete.
(Initialize_Pool): Likewise.
* libgnat/s-stposu.adb (Allocate_Any_Controlled): Adjust.
(Attach): Reimplement.
(Detach): Likewise.
(Finalize_Pool): Loop over a simple doubly linked list.
(Initialize): Delete.
(Initialize_Pool): Likewise.
(Print_Pool): Adjust.
(Print_Subpool): Likewise.
(Set_Pool_Of_Subpool): Remove obsolete code.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* sem_util.ads (Has_Private_Component): Rename into...
(Is_Incompletely_Defined): ...this.
* sem_util.adb (Has_Private_Component): Rename into...
(Is_Incompletely_Defined): ...this.
(Check_Fully_Declared): Adapt to above renaming.
* exp_ch3.adb (Freeze_Type): Likewise.
* freeze.adb (Check_And_Freeze_Type): Likewise.
* sem_aggr.adb (Array_Aggr_Subtype): Likewise.
* sem_ch12.adb (Instantiate_Type): Likewise.
* sem_ch13.adb (Rep_Item_Too_Early): Likewise.
* sem_ch3.adb (Access_Definition, Analyze_Full_Type_Declaration,
Analyze_Subtype_Declaration, Build_Derived_Access_Type,
Copy_And_Build, Complete_Private_Subtype, Constrain_Access,
Constrain_Array, Build_Constrained_Access_Type, Constrain_Concurrent,
Constrain_Corresponding_Record, Copy_Array_Subtype_Attributes,
Derived_Type_Declaration): Likewise.
* sem_ch6.adb (Create_Extra_Formals): Likewise.
* sem_res.adb (Make_Call_Into_Operator): Likewise.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* gen_il-gen-gen_entities.adb (Gen_Entities): Move
Is_Limited_Composite.
* einfo.ads (Is_Limited_Composite): Update documentation.
2026-06-02 Viljar Indus <indus@adacore.com>
* sem_prag.adb (Analyze_Abstract_State): make error checks
exclusive.
2026-06-02 Ronan Desplanques <desplanques@adacore.com>
* sem_util.ads, sem_util.adb (Private_Component): Rename into...
(Partially_Visible_Subcomponent): ...this.
* sem_ch3.adb (Analyze_Component_Declaration, Array_Type_Declaration):
Adapt to above renaming.
* sem_ch7.adb (Install_Composite_Operations): Likewise.
2026-05-30 Dhruv Chawla <dhruvc@nvidia.com>
* gnathtml.pl: Reflow long line.
2026-05-30 Dhruv Chawla <dhruvc@nvidia.com>
* adaint.c (__gnat_set_OWNER_ACL): Fix typos.
* aux-io.c: Likewise.
* cio.c: Likewise.
* cstreams.c: Likewise.
* doc/gnat_rm/gnat_language_extensions.rst: Likewise.
* doc/gnat_rm/implementation_defined_attributes.rst: Likewise.
* doc/gnat_rm/implementation_defined_characteristics.rst: Likewise.
* doc/gnat_rm/implementation_defined_pragmas.rst: Likewise.
* doc/gnat_rm/interfacing_to_other_languages.rst: Likewise.
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Likewise.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst: Likewise.
* doc/gnat_rm/the_gnat_library.rst: Likewise.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Likewise.
* doc/gnat_ugn/gnat_and_program_execution.rst: Likewise.
* doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
* doc/gnat_ugn/platform_specific_information.rst: Likewise.
* doc/gnat_ugn/the_gnat_compilation_model.rst: Likewise.
* doc/share/conf.py: Likewise.
* gcc-interface/decl.cc (components_to_record): Likewise.
* gcc-interface/misc.cc (gnat_get_array_descr_info): Likewise.
(get_array_bit_stride): Likewise.
* gcc-interface/trans.cc (Loop_Statement_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.cc (gnat_pushdecl): Likewise.
(maybe_pad_type): Likewise.
(finish_record_type): Likewise.
(process_deferred_decl_context): Likewise.
* gnat_rm.texi: Likewise.
* gnat_ugn.texi: Likewise.
* gnathtml.pl: Likewise.
* gsocket.h: Likewise.
* init.c (__gnat_handle_vms_condition): Likewise.
(GNAT$STOP): Likewise.
* raise-gcc.c (db_phases): Likewise.
* rtinit.c (__gnat_runtime_initialize): Likewise.
* sigtramp-arm-qnx.c: Likewise.
* sigtramp-vxworks-target.h (defined): Likewise.
* sigtramp-vxworks.c: Likewise.
* sysdep.c: Likewise.
* terminals.c (defined): Likewise.
(__gnat_new_tty): Likewise.
(__gnat_close_tty): Likewise.
(__gnat_tty_name): Likewise.
* tracebak.c (PC_ADJUST): Likewise.
2026-05-29 Marc Poulhiès <poulhies@adacore.com>
* sysdep.c (getc_immediate_common): Read character as unsigned
value.
2026-05-29 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Delay_Aspect): Remove the side effect.
(Decorate): Rename to be Decorate_Aspect_Links.
Generalize.
(Insert_Aitem): Call Decorate_Aspect_Links.
* aspects.ads: Minor comment improvement: we don't need to worry;
we just need to do it.
* einfo.ads: Minor comment improvement.
2026-05-29 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): Add missing call to
Check_For_Primitive_Subprogram (Is_Primitive must be set).
* sem_ch13.ads (Check_Function_For_Indexing_Aspect): Move declaration
to package body.
* sem_ch13.adb (Check_Indexing_Functions): Remove early return for
derived types. Pass appropriate values for the new Boolean parameters
on existing calls to Check_Function_For_Indexing_Aspect. Perform a
second interpretation loop, calling Check_Function_For_Indexing_Aspect
and passing Indexing_Found for the Has_Eligible_Func parameter and True
for the Error_On_Ineligible parameter, and remove the existing call
to Error_Msg_NE that was flagging nonlocal entities (a similar error
is now reported inside procedure Check_Function_For_Indexing_Aspect).
Suppress call to Check_Inherited_Indexing in derived type cases.
(Check_Nonoverridable_Aspect_Subprograms): Remove early return when
the aspect spec does not come from source, so aspects of derived types
will also go through this procedure. Check restrictions of AI22-0159/01
for derived types and inheritance of aspects. Replace iteration over
overloaded interpretations with iteration over Aspect_Subprograms (and
only do that for indexing aspects). Condition Sloc for existing error
check for nonprimitive operations based on whether the aspect comes
from source, posting the error on the entity rather than the aspect
if the aspect is not given explicitly.
(Analyze_Aspects_At_Freeze_Point): Split off a new case alternative
for iterator aspects, and specialize treatment for indexing aspects
by forcing a search for new indexing functions. When none are found,
issue an error only in the case where the type has no inherited
indexing functions. Test that the version is at least Ada_2012 rather
than Ada_2022 for calling Check_Nonoverridable_Aspect_Subprograms.
(Check_Function_For_Indexing_Aspect): Move declaration from the package
spec to the body. Add Has_Eligible_Func and Error_On_Ineligible formals
and update spec comment.
Return early if the candidate subprogram was already inherited (present
in Aspect_Subprograms).
For a scope mismatch on Subp, report error only when Has_Eligible_Func
is False and Error_On_Ineligible is True (and never a warning).
Add "<<" in several calls to Report_Ineligible_Indexing_Function
(formerly Illegal_Indexing) to allow either warnings or errors.
Return without adding subprogram to Aspect_Subprograms when
Error_On_Ineligible is False.
(Report_Ineligible_Indexing_Function): Name changed from
Illegal_Indexing.
Return early when only a warning can be issued and the ineligible
subprogram is inherited, or if its first formal (if any) does not match
the aspect's associated type (to reduce false-positive warnings).
Set Error_Msg_Warn based on Error_On_Ineligible formal.
Report a continuation message identifying the ineligible entity.
Remove comment preceding body that has been obviated by AI22-0154.
* sem_util.adb (Inherit_Nonoverridable_Aspect): Remove the loop over
primitives that was checking and adding eligible primitives. That code
was incomplete, and collection of new indexing functions for derived
types is now handled by Check_Indexing_Functions. Also remove the
associated "???" comment.
2026-05-29 Tonu Naks <naks@adacore.com>
* doc/gnat_rm.rst: update toctree
* doc/gnat_rm/about_this_guide.rst: add reference
* doc/gnat_rm/gnat_implementation_mode.rst: new file
* opt.ads: remove redundant comment
* gnat_rm.texi: Regenerate.
2026-05-29 Marc Poulhiès <poulhies@adacore.com>
* doc/gnat_rm/gnat_language_extensions.rst (Destructors): fix
typo.
* gnat_rm.texi: Regenerate.
2026-05-29 Ronan Desplanques <desplanques@adacore.com>
* argv.c: Remove unused include directive.
2026-05-29 Viljar Indus <indus@adacore.com>
* erroutc.ads (Warnings_Suppressed): New Boolean overload.
* errout.adb (Error_Msg_Internal): Use Boolean Warnings_Suppressed.
* errutil.adb (Error_Msg): Likewise.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Is_Before): New helper function.
(Find_Msg_Insertion_Point): New procedure.
(Error_Msg_Internal): Use Find_Msg_Insertion_Point and Insert_Error_Msg.
(Finalize): Remove call to Set_Prev_Pointers.
(Set_Prev_Pointers): Removed.
* erroutc.adb (Insert_Error_Msg): New procedure.
* erroutc.ads (Insert_Error_Msg): New declaration.
2026-05-29 Andres Toom <toom@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Do not set
Global_Discard_Names in GNATprove_Mode.
2026-05-29 Ronan Desplanques <desplanques@adacore.com>
* argv.c (__gnat_env_count) (__gnat_len_env) (__gnat_fill_env): Move
to...
* env.c (__gnat_env_count) (__gnat_len_env) (__gnat_fill_env):
...here. Tweak comment.
2026-05-29 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Subprogram_Subtypes_Have_Same_Declaration):
Remove tests for In_Internal_Unit and GNAT_Mode.
2026-05-29 Marc Poulhiès <poulhies@adacore.com>
* vast.adb (Check_Enum)<Check_Entity_Chain>: Add.
(Status)<Check_Entity_Chain>: Set to Print_And_Continue.
(Check_Entity_Chain): New.
(Check_Scope): Call Check_Entity_Chain.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Delete_Warning_And_Continuations): use
Delete_Error_And_Continuation_Msgs.
(Output_Messages): Call new refactored subprograms.
(Delete_Specifically_Suppressed_Warnings): New
procedure.
* (Set_Prev_Pointers): New procedure.
* (Finalize): use Delete_Specifically_Suppressed_Warnigns and
Set_Prev_Pointers.
(Finalize): use Delete_Error_And_Continuation_Msgs.
* erroutc.adb (Delete_Error_And_Continuation_Msgs): New procedure.
(Remove_Duplicate_Errors): New_Function.
(Write_All_Errors_In_Brief_Format): New function.
(Write_All_Errors_In_Verbose_Format): New function.
(Write_Error_Summary): New function.
* erroutc.ads (Delete_Error_And_Continuation_Msgs): Likewise.
(Remove_Duplicate_Errors): Likewise.
(Write_All_Errors_In_Brief_Format): Likewise.
(Write_All_Errors_In_Verbose_Format): Likewise.
(Write_Error_Summary): Likewise.
* errutil.adb (Finalize): Call new refactored subprograms.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Remove_Warning_Messages): Use
Filter_And_Delete_Errors.
* errout.ads (Purge_Messages): Renamed to
Delete_Error_Msgs_In_Range.
* erroutc.adb (Filter_And_Delete_Errors): New procedure.
(Purge_Messages): Renamed to Delete_Error_Msgs_In_Range.
* erroutc.ads (Filter_And_Delete_Errors): New procedure.
(Purge_Messages): Renamed to Delete_Error_Msgs_In_Range.
* par-ch5.adb (Missing_Begin): call Delete_Error_Msgs_In_Range.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Finalize): use Warning_Is_Suppressed.
* erroutc.adb (Warning_Is_Suppressed): New subprogram.
* erroutc.ads (Warning_Is_Suppressed): Likewise.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb: Use Delete_Error_Msg.
* erroutc.adb (Delete_Error_Msg): New subprogram.
* erroutc.ads (Delete_Error_Msg): Likewise.
2026-05-29 Eric Botcazou <ebotcazou@adacore.com>
* exp_unst.adb (Note_Uplevel_Bound_Trav): Do not register an uplevel
reference for a package. Use a single if_statement in the body.
2026-05-29 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): Remove obsolete code that
wraps the return in a block when the expression is an aggregate.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Error_Msg): Add new function
In_Loop_With_Suppressed_Warnings.
2026-05-29 Viljar Indus <indus@adacore.com>
* errout.adb (Error_Msg_N): Simplify code.
2026-05-29 Viljar Indus <indus@adacore.com>
* erroutc-pretty_emitter.adb (To_String): Relocated to erroutc.
(To_File_Name): Likewise.
(Line_To_String): Likewise.
(Column_To_String): Likewise.
* erroutc.adb (dedit): New function for debugging edits.
(dfix): New function for debuging fixes.
(dloc): New function for debugging locations.
(dmsg): Print missing Error_Msg_Object attributes.
(To_String): New function for printing spans
(To_String): Relocated from erroutc-pretty_emitter.adb
(To_File_Name): Likewise.
* erroutc.ads: Likewise.
2026-05-29 Ronan Desplanques <desplanques@adacore.com>
* argv-lynxos178-raven-cert.c: Update comments.
* argv.c (gnat_envp): Add comment about it being unused.
(__gnat_env_count, __gnat_len_env, __gnat_fill_env): Use
__gnat_environ instead of gnat_envp.
* bindgen.adb (Command_Line_Used): Update comment.
(Gen_Main): Remove gnat_envp assignment generation. Remove generated
envp parameter.
(Gen_Output_File_Ada): Remove generated envp parameter.
* env.h: Make usable as C++.
* libgnat/a-colien.ads: Remove comment.
* libgnat/a-comlin.ads: Update comment.
* targparm.ads: Update comment.
2026-05-29 Piotr Trojanek <trojanek@adacore.com>
* par-ch10.adb (P_Compilation_Unit): Require no indentation.
2026-05-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/93702
* exp_ch3.adb (Make_Controlling_Function_Wrappers): Do not set the
Was_Expression_Function flag on the body.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Avoid freezing the
profile only for wrapper functions.
2026-05-29 Piotr Trojanek <trojanek@adacore.com>
* sprint.adb (Sprint_Node_Actual): Print filter in loop parameter
specification.
2026-05-29 Piotr Trojanek <trojanek@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression): If there is a filter,
then suppress the warning.
2026-05-29 Piotr Trojanek <trojanek@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression): Suppress warning for
trivial conditions.
2026-05-29 Viljar Indus <indus@adacore.com>
* inline.adb (Adjust_Node): Renamed from Adjust_Sloc and
additionally unset Comes_From_Source.
2026-05-29 Javier Miranda <miranda@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): When the type of the expression
is Universal Integer we cannot statically determine if the expression
is in the range of the target type.
* sem_eval.adb (In_Subrange_Of): Do not consider T2 in the range of
Universal Integer (since theoretically they are not).
(Test_In_Range): Do not consider Universal type expressions in range
of subtype Typ.
2026-05-29 Marc Poulhiès <poulhies@adacore.com>
* treepr.ads (pech, rpech): New.
(Print_Entity_Chain): Adjust signature and comment to handle
printing only header and doing the simple check.
* treepr.adb (pech, rpech): New.
(Print_Entity_Chain): Support for printing only headers and doing
simple check.
2026-05-29 Claire Dross <dross@adacore.com>
* sem_ch13.adb (Resolve_Iterable_Operation): Handle Previous and Last
like Next and First.
2026-05-29 Claire Dross <dross@adacore.com>
* libgnat/i-cstrin.ads: New C_Addresses volatile state to use as
input of the New_String and New_Char_Array.
2026-05-29 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.adb (Statically_Names_Object) <N_Selected_Component>:
Return False if the selector is neither component nor discriminant.
2026-05-29 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Build_Derived_Record_Type): Record type derivations
inherit Is_Unchecked_Union and Has_Unchecked_Union flags.
(Inherit_Component): Add discriminals to the associations list.
* exp_ch3.adb (Build_Record_Init_Proc): Derivations of Unchecked_Union
types don't need an initialization procedure; they reuse the init proc
of their parent type.
2026-05-29 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Deal with initialization
expression of return object.
(Expand_N_If_Expression): Likewise.
(Insert_Conditional_Object_Declaration): Likewise.
* exp_util.adb (Is_Distributable_Declaration): Lift limitation for
return objects, including those with a class-wide type.
* sem_ch3.adb (Analyze_Object_Declaration): Set Return_Applies_To
on artificial return objects created from within a transient scope.
Remove test on Expander_Active for better error recovery.
2026-05-29 Ronan Desplanques <desplanques@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix
markup.
* gnat_ugn.texi: Regenerate.
2026-05-29 Piotr Trojanek <trojanek@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression): Suppress warning for
variables with junk names.
2026-05-29 Viljar Indus <indus@adacore.com>
* inline.adb (Inline_Static_Function_Call): Reduce source code nesting.
* inline.ads (Inline_Static_Function_Call): Likewise.
2026-05-29 Viljar Indus <indus@adacore.com>
* inline.adb (Inline_Static_Function_Call): Add a Source File Index
entry for the call and apply the necessary sloc adjustment values
for all of the inlined nodes.
2026-05-29 Tonu Naks <naks@adacore.com>
* adaint.c (__gnat_copy_attribs): use GetFileAttributesEx to
to fetch attributes.
2026-05-28 Sebastian Poeplau <poeplau@adacore.com>
* init.c (__gnat_alternate_stack): add alignment attribute.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Also rewrite a choice list
with a single choice as an iterator specification when the choice's
type has the GNAT Iterable aspect specified.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* sem_aggr.adb (Resolve_Array_Aggregate): Analyze the choice before
testing whether it is the name of a subtype with a predicate.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (In_Package_Body): Update description.
(In_Private_Part): Likewise.
* sem_ch3.adb (Analyze_Object_Declaration): Compute In_Package_Body
along with In_Private_Part for the object if its scope is a package.
* sem_ch6.adb (Analyze_Expression_Function): Do not compute
In_Private_Part here.
(Enter_Overloaded_Entity): Compute In_Package_Body & In_Private_Part
for the entity if its scope is a package.
* sem_util.adb (Collect_Primitive_Operations): Skip the subprograms
declared in the body for types declared in a package specification.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Resolve_Aspect_Aggregate.Resolve_Operation): Add
missing guard for the presence of Entity on the node.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/gnat_language_extensions.rst
(Generalized Finalization): Document the new restriction.
* sem_ch13.adb (Resolve_Finalizable_Argument): Adjust wording of
error message.
(Resolve_Finalization_Procedure.Is_Finalizable_Primitive): Require
the procedure to be a primitive operation.
* gnat_rm.texi: Regenerate.
2026-05-28 Piotr Trojanek <trojanek@adacore.com>
* libgnat/g-comlin.adb
(Command_Name): New routine to strip platform-specific suffix.
(Display_Help, Get_Opt): Use new routine.
(Try_Help): Remove hardcoded ".exe" suffix; use new routine.
2026-05-28 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Is_Access_To_Subprogram_Wrapper): Remove useless
call to Can_Have_Formals. Found by Dismukes.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Make_Controlling_Function_Wrappers): Manually set the
Has_Controlling_Result flag on the wrappers.
* sem_disp.ads (Override_Dispatching_Operation): Move to...
* sem_disp.adb (Override_Dispatching_Operation): ...here.
(Find_Dispatching_Type): Return the (controlling) result type for a
controlling function wrapper.
2026-05-28 Vadim Godunko <godunko@adacore.com>
* doc/gnat_rm/implementation_of_ada_2022_features.rst: Fix casing.
* gnat_rm.texi: Regenerate.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Op_Eq): Do not expand an array comparison
for validity checking purposes when the component type is covered
by the suppression of validity checks.
2026-05-28 Marc Poulhiès <poulhies@adacore.com>
* vast.adb (Do_Node_Pass_2): Only check aspect/pragma consistency for pragma nodes.
2026-05-28 Javier Miranda <miranda@adacore.com>
* sem_util.ads (Is_Access_Subprogram_Wrapper): Renamed as
Is_Access_To_Subprogram_Wrapper.
* sem_util.adb (Is_Access_Subprogram_Wrapper): Ditto plus add
assertion.
* sem_disp.adb (Is_Access_To_Subprogram_Wrapper): Removed.
* sem_prag.adb (Find_Related_Declaration_Or_Body): Replace call to
Is_Access_Subprogram_Wrapper by call to Is_Access_To_Subprogram_Wrapper.
* exp_ch6.adb (Expand_Call): Ditto.
* sem_attr.adb (Analyze_Attribute [Attribute_Result]): For access to
subprogram wrappers, report that the expected prefix is the name of
the access type.
2026-05-28 Marc Poulhiès <poulhies@adacore.com>
* sem_ch13.adb (Make_Pragma_From_Boolean_Aspect): Use Decorate.
2026-05-28 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
Major rewrite.
* sem_ch13.ads: Minor comment improvements.
* aspects.ads: Change some aspects to be Never_Delay.
Make Boolean_Aspects include Library_Unit_Aspects.
* exp_ch9.adb (Build_Corresponding_Record):
When copying aspects, set Aspect_Rep_Item to Empty,
so Asp_Copy looks like an unanalyzed tree.
* sem_ch12.adb (Analyze_Formal_Subprogram_Declaration):
Skip Analyze_Aspect_Specifications in case of error.
* sem_ch6.adb (Analyze_Expression_Function): Likewise.
* sinfo.ads: Minor comment improvement.
2026-05-28 Steve Baird <baird@adacore.com>
* sem_ch6.adb (Install_Entity): If the entity to be installed is
already installed, assert that an error has already been flagged
and then return without introducing a cycle in the entity's
Homonyms list.
2026-05-28 Viljar Indus <indus@adacore.com>
* errout.adb (Output_Messages): use the source file name without
the directory path when constructing the name of the SARIF file.
* osint.adb (Strip_Directory): New method for extracting the file name
from a given path.
* osint.ads (Strip_Directory): Likewise.
2026-05-28 Javier Miranda <miranda@adacore.com>
* sem_ch8.adb (Find_Renamed_Entity): Protect call to First_Formal.
2026-05-28 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Declare_Expression): Do not create a
transient scope when expansion is disabled.
2026-05-28 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Declare_Expression): Do not create a
transient scope under GNATprove mode.
2026-05-28 Bob Duff <duff@adacore.com>
* vast.adb (Pass): Add a comment.
2026-05-28 Marc Poulhiès <poulhies@adacore.com>
* vast.adb (Do_Node_Pass_2): Adjust check for aspect consistency.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference) <Constrained>: If the
prefix is a non-In formal parameter of an unchecked union type, give
a warning and insert a raise statement for Program_Error.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.ads (Is_Distributable_Declaration): New predicate.
* exp_util.adb (Is_Distributable_Declaration): New predicate coming
from Expand_N_Case_Expression and Expand_N_If_Expression. Return
False for variables of an unconstrained definite nonlimited subtype.
* exp_ch4.adb (Expand_N_Case_Expression): Replace calls to local
Is_Optimizable_Declaration by calls to Is_Distributable_Declaration.
(Expand_N_If_Expression): Likewise.
* exp_ch6.adb (Expand_Ctrl_Function_Call): Likewise.
2026-05-28 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Insert_Pragma):
Rename to be Insert_Aitem.
2026-05-28 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications):
Misc cleanup.
2026-05-28 Claire Dross <dross@adacore.com>
* inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
Do not inline subprograms with formals of an unchecked union type.
2026-05-28 Marc Poulhiès <poulhies@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* sem_ch3.adb (Find_Type_Of_Object): Adjust freezing of the base
type of a discriminated type.
2026-05-28 Ronan Desplanques <desplanques@adacore.com>
* sem_ch3.adb (Process_Full_View): Simplify test.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb
(Apply_Accessibility_Check_For_Class_Wide_Return): Do not test if
accessibility checks are suppressed here but...
(Apply_Accessibility_Check_For_Return): ...here instead.
2026-05-28 Viljar Indus <indus@adacore.com>
* sem_ch6.adb (Check_For_Primitive_Subprogram): add the
check for ghost equality functions for all branches handling
primitive subprograms.
2026-05-28 Ronan Desplanques <desplanques@adacore.com>
* sem_aux.ads (Is_Immutably_Limited_Type, Is_Inherently_Limited_Type):
Improve documentation comments.
* sem_aux.adb (Is_Inherently_Limited_Type): Replace inline code with
call to Is_Immutably_Limited_Type.
2026-05-28 Bob Duff <duff@adacore.com>
* aspects.ads (Aspect_Initialize):
Add to Implementation_Defined_Aspect.
* einfo.ads (Alignment_Clause): Minor comment fix.
* sem.adb: Remove useless null statements.
* sem_ch13.ads (Rep_Item_Too_Late):
Minor comment fix (this IS Sem_Ch13).
* sem_prag.adb (Fix_Error):
Minor comment fix (aspects are not "abnormal").
* sinfo.ads: Minor comment fix.
2026-05-28 Javier Miranda <miranda@adacore.com>
* gen_il-fields.ads (Scope_Link): New field.
* gen_il-gen-gen_nodes.adb (N_Expression_With_Actions): Added Scope_Link.
* sinfo.ads (N_Expression_With_Actions): Add field Scope_Link.
* sem_ch4.adb (Analyze_Expression_With_Actions): Set field Scope_Link
* sem_ch5.ads (Has_Sec_Stack_Call): Declaration moved to the package spec.
* sem_ch5.adb (Has_Sec_Stack_Call): ditto.
* sem_res.adb (Resolve_Declare_Expression): Push/Pop internally created
scope to provide proper visibility of the declare_items.
2026-05-28 Denis Mazzucato <mazzucato@adacore.com>
* sem_prag.adb (Check_References): Don't call Class_Wide_Type if the
subprogram is a non-primitive procedure as the dispatching type may be
empty.
2026-05-28 Piotr Trojanek <trojanek@adacore.com>
* exp_ch9.adb (Is_Pure_Barrier): Handle unexpanded attribute Count.
2026-05-28 Bob Duff <duff@adacore.com>
* vast.adb (Check_Corresponding_Aspect):
New checks for aspect/pragma consistency.
(Check_Enum): Add documentation of the checks.
2026-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.ads (Build_Master_Declaration): Minor tweaks in comment.
(Build_Master_Entity): Likewise.
(Build_Master_Renaming): Likewise.
(Build_Master_Renaming_Declaration): New function declaration.
* exp_ch9.adb (Build_Master_Declaration): Move around.
(Build_Master_Renaming_Declaration): New function.
(Build_Master_Renaming): Call Build_Master_Renaming_Declaration
to build the renaming declaration.
* sem_ch6.adb (Check_Anonymous_Access_Return_With_Tasks): Remove
useless guard on Declarations (N). Create a renaming declaration
for the current _Master variable and set is as the Master_Id of
the access result type.
2026-05-28 Piotr Trojanek <trojanek@adacore.com>
* exp_spark.adb (Expand_SPARK_N_Delta_Aggregate): Special case for
"others" clause.
2026-05-27 Iain Sandoe <iain@sandoe.co.uk>
* xsintnam.sed: Posix-ify the a, c and i commands.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* xsintnam.sed: Disable style checks.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* xsintnam.sed: Handle special case.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Makefile.in ($(RTSDIR)/s-intnam.ads): Change recipe
to use a basic invocation of 'sed'.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* xsintnam.sed: Do not filter out comments.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* libgnarl/s-interr__sigaction.adb: Add with clause for
System.OS_Interface.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb (Apply_Accessibility_Check_For_Anonymous):
Rename into...
(Apply_Accessibility_Check_For_Anonymous_Return): ...this.
(Apply_Accessibility_Check_For_Class_Wide): Rename into...
(Apply_Accessibility_Check_For_Class_Wide_Return): ...this.
(Apply_Accessibility_Check_For_Discriminant): Rename into...
(Apply_Accessibility_Check_For_Discriminated_Return): ...this.
(Apply_Accessibility_Check_For_Return): Adjust to above renamings.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.ads (Apply_Accessibility_Check): Rename into...
(Apply_Accessibility_Check_For_Parameter): ...this.
(Apply_Accessibility_Check_For_Return): New procedure.
(Effective_Extra_Accessibility): Minor tweak in description.
* accessibility.adb (Function_Call_Or_Allocator_Level): Apply the
specific treatment for returns to anonymous allocators as well.
(Accessibility_Level): Deal with literal null and Deref attribute.
(Apply_Accessibility_Check): Rename into...
(Apply_Accessibility_Check_For_Anonymous): New procedure extracted
from the old Apply_Access_Discrims_Accessibility_Check.
(Apply_Accessibility_Check_For_Class_Wide): New procedure taken
from Exp_Ch6.
(Apply_Accessibility_Check_For_Discriminant): Likewise.
(Apply_Accessibility_Check_For_Parameter): ...this.
(Apply_Accessibility_Check_For_Return): New procedure.
(Static_Accessibility_Level): Minor reformatting.
* exp_attr.adb (Expand_N_Attribute_Reference): Adjust to renaming.
* exp_ch3.adb (Expand_N_Object_Declaration): Generate accessibility
checks for returns by calling Apply_Accessibility_Check_For_Return.
* exp_ch4.adb (Expand_N_Type_Conversion): Adjust to renaming.
* exp_ch6.ads (Apply_Access_Discrims_Accessibility_Check): Delete.
(Apply_CW_Accessibility_Check): Likewise.
* exp_ch6.adb: Remove clauses for Exp_Atag.
(Apply_Access_Discrims_Accessibility_Check): Move to Accessibility.
(Apply_CW_Accessibility_Check): Likewise.
(Expand_Actuals): Adjust to renaming.
(Expand_Simple_Function_Return): Generate accessibility checks by
calling Apply_Accessibility_Check_For_Return.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Tidy up and make
the computation of minimum accessibility levels more uniform.
(Create_Extra_Formals): Minor reformatting.
2026-05-26 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Derive_Subprogram): Do not replace the type when
Derived_Type inherits the first controlling parameter aspect and
it is not the first formal of this operation.
* sem_disp.adb (Check_Controlling_Formals): For overriding
primitives of types with the first controlling parameter aspect
inherit controlling formals of the overridden parent primitive.
2026-05-26 Viljar Indus <indus@adacore.com>
* ghost.adb (Check_Ghost_Equality_Op): Supply the type of the
operation as an argument.
* ghost.ads (Check_Ghost_Equality_Op): Likewise.
* sem_ch6.adb (Valid_Operator_Definition): Remove call to
Check_Ghost_Equality_Op.
(Check_For_Primitive_Subprogram): Call Check_Ghost_Equality_Op.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-inttyp.ads: New file.
* libgnarl/a-interr.ads (Interrupt_ID): Derive from
Preelab_Interrupt_ID.
* libgnarl/s-interr.ads (Interrupt_ID): Derive from
Preelab_Interrupt_ID.
(Ada_Interrupt_ID): Remove.
* libgnarl/s-interr__vxworks.ads (Ada_Interrupt_ID): Remove.
* xsintnam.sed: New file.
* Makefile.rtl: Register new runtime files.
* libgnarl/a-interr.adb: Adjust with clauses.
* rtsfind.ads (RE_Interrupt_Names, RE_Preelab_Interrupt_ID): New
variants.
* sem_prag.adb: Use entities from new preelaborate packages.
* gcc-interface/Makefile.in: Generate System.Interrupt_Names.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-interr.adb (Unprotected_Exchange_Handler): Improve
comment and formatting.
(Server_Task): Fix task state.
* rtsfind.adb (RTE): Remove incorrect comment.
2026-05-26 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): When the operand is a
qualified expression of an aggregate, force its evaluation by
capturing its value in a constant (to ensure full initialization
of the tagged object).
2026-05-26 Piotr Trojanek <trojanek@adacore.com>
* doc/gnat_ugn/platform_specific_information.rst
(Using gnatdll): Document switch -m.
* gnat_ugn.texi: Regenerate.
2026-05-26 Viljar Indus <indus@adacore.com>
* ghost.adb (Check_Valid_Ghost_Declaration): Relocate the procedure.
2026-05-26 Viljar Indus <indus@adacore.com>
* ghost.adb (Check_Ghost_Equality_Op): New function for the
implementation of the rule.
* ghost.ads (Check_Ghost_Equality_Op): Likewise.
* sem_ch6.adb (Valid_Operator_Definition): Add check for rule 23.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch4.adb (Analyze_Qualified_Expression): For a class-wide type,
check for an exact match modulo the Non_Limited_View attribute.
2026-05-26 Steve Baird <baird@adacore.com>
* aspects.adb (Has_Aspect): In the call to Find_Aspect, pass in
True for the Or_Rep_Item parameter instead of letting it default
to False.
2026-05-26 Piotr Trojanek <trojanek@adacore.com>
* tempdir.ads, tempdir.adb: Remove.
* gcc-interface/Makefile.in (GNATMAKE_OBJS): Remove dependency on Tempdir.
2026-05-26 Piotr Trojanek <trojanek@adacore.com>
* gnatname.adb: Use System.OS_Lib routine.
2026-05-26 Piotr Trojanek <trojanek@adacore.com>
* make.adb: Use System.OS_Lib routine.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
PR ada/89609
* sem_res.adb (Resolve_Call): Do not override the Etype of the Name
entity when it denotes a function that returns the limited view of a
type coming from a limited_with clause.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Get_Function_Entity): New function.
(Make_Build_In_Place_Call_In_Allocator): Call it, turn some local
variables into constants and rename Function_Id as Func_Id.
(Make_Build_In_Place_Call_In_Anonymous_Context): Likewise.
(Make_Build_In_Place_Call_In_Assignment): Likewise.
(Make_Build_In_Place_Call_In_Object_Declaration): Likewise.
2026-05-26 Gary Dismukes <dismukes@adacore.com>
* contracts.adb (Expand_Subprogram_Contract): Don't call
Build_Subprogram_Contract_Wrapper for a No_Return subprogram,
but include any prologue declarations (such as for preconditions).
2026-05-26 Viljar Indus <indus@adacore.com>
* errid-diagnostic_repository.ads: Add new diagnostics to the
repository. Map diagnostics to restrictions.
* errid-restriction_repository.ads: New pacakges for mapping
restricitions to diagnostics.
* errid.adb (heck_Diagnostic_To_Restriction_Consistency): New
method for repository consistency.
(Check_Diagnostic_To_Restriction_Consistency): New method for
repository consistency.
(Add_All_Restriction_Rules): New method for adding all of the
restrictions.
* errid.ads: Add new Diagnostic_Id-s.
* errout.adb (Add_Unique_Diagnostics_And_Switches): Add
restrictions to the SARIF_Printer.
* erroutc.ads: Add restrictions to the Error_Msg_Object.
* erroutc-sarif_emitter.adb (Print_Rule): Add method for printing
rules for restrictions.
* erroutc-sarif_emitter.ads: add restrictions as part of the
printer.
* errutil.adb (Error_Msg): Update diagnostic element creation.
* restrict.adb (Restriction_Msg): Add diagnostic id based on the
restriction id.
* gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
new files.
* gcc-interface/Makefile.in (GNATMAKE_OBJS): Likewise.
2026-05-26 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): Propagate actuals in
recursion calls, unless this is a known side-effect free
attribute whose expressions are also side-effect free.
2026-05-26 Viljar Indus <indus@adacore.com>
* sem_util.adb (Depends_On_Level): Fix condition for Runtime
level.
2026-05-26 Viljar Indus <indus@adacore.com>
* sem_util.adb (Policy_In_Effect): Normalize the policy names.
2026-05-26 Bob Duff <duff@adacore.com>
* gen_il-fields.ads (Is_Boolean_Aspect): Remove.
* gen_il-gen-gen_nodes.adb: Likewise.
* sinfo.ads: Likewise.
* sem_ch13.adb: Likewise. Minor comment fix.
* aspects.ads: Clean up comments, including removing
some redundancy.
* freeze.adb: Fix comment typo.
* sem_eval.ads: Fix comment typo.
* tbuild.ads: Fix comment; there's no reason to mention the
number, especially when it's wrong.
2026-05-26 Viljar Indus <indus@adacore.com>
* ghost.adb (Check_Ghost_Policy): Add check for assertion levels
inside aspect specifications.
2026-05-26 Bob Duff <duff@adacore.com>
* aspects.ads (Aspect_Unimplemented): Remove.
* sem_ch13.adb (Aspect_Unimplemented): Remove.
2026-05-26 Bob Duff <duff@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): Remove the exception
declaration, raises, and handler. Inline the code in
Check_Expr_Is_OK_Static_Expression, which was called only once.
2026-05-26 Marc Poulhiès <poulhies@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Push/Pop scope around Analyze
call.
2026-05-26 Marc Poulhiès <poulhies@adacore.com>
* exp_unst.adb (Maybe_Subp_Index): New non throwing version of
Subp_Index.
(Nullify_Renamings, Move_Pending_Renamings): New.
(Register_Subprogram): Record subp renamings. Call
Nullify_Renamings when a subp is dropped.
(with Elist): Moved to...
* exp_unst.ads (with Elist): ... here.
(Subp_Entry): Add Renamings component.
(Pending_Renamings): New list.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-interr__vxworks.adb (Unprotected_Exchange_Handler): Fix
exception message.
2026-05-26 Sebastian Poeplau <poeplau@adacore.com>
* s-oscons-tmplt.c (PTY_Library): Define empty for Linux targets.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-interr.adb (Interrupt_Manager, Server_Task): Fix
comments.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-interr.adb (User_Handler): Improve comment.
(Unprotected_Exchange_Handler): Fix message string.
2026-05-26 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Check_Anonymous_Access_Return_With_Tasks): Declare
Scop as a constant and call the Might_Have_Tasks predicate instead
of using a custom implementation of it.
2026-05-26 Steve Baird <baird@adacore.com>
* doc/gnat_rm/gnat_language_extensions.rst: Correct example
to avoid using a not-yet-implemented form of deep delta aggregate.
* exp_aggr.adb (Make_Delta_Choice_LHS): Call Core_Extensions_Allowed
instead of All_Extensions_Allowed.
* par-ch4.adb (P_Simple_Expression): Likewise.
* sem_aggr.adb (Resolve_Delta_Array_Aggregate): Likewise.
* gnat_rm.texi: Regenerate.
2026-05-26 Gary Dismukes <dismukes@adacore.com>
* par.adb (P_Expression_If_OK): Add declare expression to spec comment.
* par-ch4.adb (P_Expression_If_OK): Add declare expression to comments.
* par-ch12.adb (P_Formal_Subprogram_Declaration): Call
P_Expression_If_OK rather than P_Expression.
2026-05-26 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): For Unsigned_Base_Range aspect,
skip generating its corresponding pragma when the aspect is set
to False.
* sem_ch3.adb (Analyze_Full_Type_Declaration): Fix initialization
of local variable Is_Unsigned_Base_Range_Type_Decl to handle
Unsigned_Base_Range aspect set to False.
2026-05-26 Ronan Desplanques <desplanques@adacore.com>
* libgnarl/s-interr.adb (Unprotected_Exchange_Handler): Fix
exception message.
2026-05-26 Javier Miranda <miranda@adacore.com>
* aspects.adb (Get_Aspect_Id): Enable aspect Unsigned_Base_Range
* debug.adb (Debug_Flag_Dot_U): Leave free this switch
* par-ch4.adb (Scan_Apostrophe): Enable attribute Unsigned_Base_Range
* sem_prag.adb (Analyze_Pragma): Enable pragma Unsigned_Base_Range
* doc/gnat_rm/gnat_language_extensions.rst: Document unsigned base range.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.adb (Prefix_Is_Formal_Parameter): Rename into...
(Prefix_Is_Formal_Parameter_Of_EQ): ...this. Return True only if
the formal parameter is that of an equality function built for an
unchecked union type.
(Has_Inferable_Discriminants): Adjust to above renaming.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* exp_put_image.ads (Image_Should_Call_Put_Image): Rename into...
(Image_Must_Call_Put_Image): ...this.
* exp_put_image.adb (Image_Should_Call_Put_Image): Rename into...
(Image_Must_Call_Put_Image): ...this.
* exp_imgv.adb (Expand_Image_Attribute): Adjust to above renaming.
(Expand_Wide_Image_Attribute): Likewise.
(Expand_Wide_Wide_Image_Attribute): Likewise.
* sem_attr.adb (Eval_Attribute): Likewise.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_attr.adb: Add with and use clauses for Exp_Put_Image.
(Eval_Attribute.Fold_Compile_Time_Known_Enumeration_Image): New
procedure factored out from....
(Eval_Attribute): ...here. Attempt to fold 'Img and 'Image for all
compile-time known values of enumeration, but not character, types,
provided that Put_Image need not be called, by invoking the nested
Fold_Compile_Time_Known_Enumeration_Image procedure on the value.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* sem_util.adb: Fix RM references.
* sem_util.ads: Likewise.
* sem_warn.adb: Likewise.
2026-05-25 Martin Clochard <clochard@adacore.com>
* sem_util.adb (As_Boolean): utility to fill decoration in expressions
(Determining_Condition): set Etype for generated Boolean connectors
(Conditional_Evaluation_Condition): set Etype for generated connectors
2026-05-25 Gary Dismukes <dismukes@adacore.com>
* par-ch12.adb (P_Formal_Subprogram_Declaration): Pass True for
the Is_Core_Extension parameter on call to Error_Msg_GNAT_Extension.
2026-05-25 Piotr Trojanek <trojanek@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Record aspect CPU and
Priority applied to subprogram as a representation item.
2026-05-25 Claire Dross <dross@adacore.com>
* sem_prag.adb (Analyze_Exit_Contract): The Exception_Raised exit kind
is not compatible with No_Raise.
(Analyze_Pragma): The Exceptional_Cases pragma is not compatible with
No_Raise.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* gen_il-gen-gen_entities.adb (E_Subprogram_Type): Add the missing
Scope_Depth_Value field.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
PR ada/93702
* exp_ch3.adb (Make_Controlling_Function_Wrappers): Revert latest
change.
* sem_ch12.adb (Analyze_One_Association): Remove redundant line.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze the profile
again for bodies that are not generated from expression functions.
2026-05-25 Javier Miranda <miranda@adacore.com>
* sem_disp.adb (Check_Controlling_Formals): Formals of a type
specifying aspect First_Controlling_Parameter are not candidate
controlling parameters when they are not the first formal of
the dispatching primitive.
2026-05-25 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Handle internally
generated initialization invoking a C++ constructor.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
PR ada/93702
* contracts.adb (Analyze_Entry_Or_Subprogram_Contract): Call
Freeze_Expr_Types_Before instead of Freeze_Expr_Types.
(Process_Preconditions_For): Likewise.
* exp_ch3.adb (Make_Controlling_Function_Wrappers): Do not set
Was_Expression_Function flag on the generated bodies.
* exp_ch6.adb (Expand_Call_Helper): Call Original_Node on the
result of the call to Expression_Of_Expression_Function.
* freeze.ads (Freeze_Expr_Types): Delete.
(Freeze_Expr_Types_Before): New procedure declaration.
* freeze.adb (Check_Expression_Function): Delete.
(Freeze_And_Append): Add Do_Freeze_Profile formal parameter and
pass it to Freeze_Entity. Remove call to Check_Expression_Function.
(Freeze_Entity): Set Test_E consistently and freeze the expression
of expression functions that are primitives of a tagged type.
(Freeze_Profile): Adjust calls to Should_Freeze_Type.
(In_Expanded_Body): Also return true for DIC procedures.
(Freeze_Expression): Remove call to Check_Expression_Function.
Freeze the expression of expression functions.
(Freeze_Expr_Types): Add Result and Before formal parameters.
Make a copy and preanalyze/resolve it only if Typ is present.
(Freeze_Expr_Types.Explain_Error): New procedure.
(Freeze_Expr_Types.Find_Incomplete_Constant): Likewise.
(Freeze_Expr_Types.Check_And_Freeze_Type): Return immediately if
the type is already frozen. Report errors on N instead of Node.
If Before is False, append the freeze nodes to Result.
(Freeze_Expr_Types.Freeze_Type_Refs): Call Find_Incomplete_Constant.
(Freeze_Expr_Types_Before): New procedure.
(Should_Freeze_Type): Remove formal parameter E and
specific kludge for stand-alone expression functions.
* ghost.ads (Mark_And_Set_Ghost_Body_Of_Expression_Function): New
procedure declaration.
* ghost.adb (Mark_And_Set_Ghost_Body_Of_Expression_Function): New
procedure body.
* rtsfind.adb (RTE): Preserve and reset the In_Inlined_Body flag.
(RTE_Record_Component): Likewise.
* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Just call
Freeze_Expression to freeze the expression of prefixes that are
expression functions and remove obsolete implementation.
* sem_ch3.adb (Analyze_Declarations): Adjust commentary.
(Check_Completion): Also skip stand-alone expressions functions.
* sem_ch4.adb (Analyze_Case_Expression): Always analyze the choices.
* sem_ch6.adb: Add with and use clauses for Sem_Ch7.
(Analyze_Expression_Function): Call Freeze_Expr_Types_Before instead
of Freeze_Expr_Types for expression functions that are completions.
For stand-alone expression functions, set In_Private_Part on the
entity if it is in the private part, propagate the results of the
resolution of the specification of the the declaration to that of
the body and insert the body at the next freezing point.
(Analyze_Subprogram_Body_Helper): Remove the machinery for masking
and unmasking unfrozen types. For a stand-alone expression function,
call Mark_And_Set_Ghost_Body_Of_Expression_Function, remove obsolete
code dealing with the freezing of the spec, set In_Inlined_Body to
True, make the full view of the private types of its scope visible
if this is not the current scope and it is in the private part, and
avoid making the spec immediately visible.
(Analyze_Subprogram_Specification): Fix typo.
(New_Overloaded_Entity): Set Has_Completion on a [generic] package
that conflicts with the entity to prevent a cascaded error.
* sem_ch7.ads (Is_Private_Base_Type): New function declaration moved
here from...
* sem_ch7.adb (Is_Private_Base_Type): ...here. Remove.
* sem_ch8.adb (Analyze_Subprogram_Renaming): Call Freeze_Expression
to freeze the expression of expression functions, but only if the
renaming comes from source.
* sem_ch12.adb (Analyze_One_Association): Likewise, and remove the
manual freezing for calls to them.
* sem_res.adb (Resolve): Remove obsolete commentary.
(Resolve_Call): Always freeze the expression of names that are
expression functions.
* sem_util.adb (Check_Fully_Declared): Add commentary and do not
check types with private component declared outside of the current
scope when it is a generic unit.
(Expression_Of_Expression_Function): Return Expression directly.
(Is_Inlinable_Expression_Function): Call Original_Node on the
result of the call to Expression_Of_Expression_Function.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Retrieve again the
expression of the expression function manually.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_res.adb (Resolve_Entity_Name): Add the name of the constant
to the error message for premature freezing of deferred constants.
2026-05-25 Gary Dismukes <dismukes@adacore.com>
* sem_ch12.adb (Build_Subprogram_Wrapper): Remove the subprogram
renaming created for the formal-to-actual association from the
list of renamings (only when such a subprogram renaming is present).
Also, change the name from plural to singular, since the procedure
only creates one wrapper, update the spec comment to reflect that,
and clarify the state and use of the Renamings parameter.
2026-05-25 Viljar Indus <indus@adacore.com>
* sem_prag.adb (Analyze_Abstract_State): Improve handling of
True/False for Abstract_State with Ghost.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* exp_ch3.adb (Build_Implicit_Parameterless_Constructor): Add Initialize
aspect with default others to trigger Initialize aspect analysis.
* exp_ch6.adb (Prepend_Constructor_Procedure_Prologue): Fix
initialization order.
(Init_From_Initialize_Expression): Retrieve initialization expression or
the default one base on the Initialize aspect.
(Init_From_Default_Or_Constructor):. Retrieve initialization expression
based on the default one in the record initialization list or the init
procedure.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add check for
missing components that require initialization, and add an
expression_with_action node to place ABE during resolution of
aggregates with function calls.
(Check_Constructor_Choices): Helper to check that the aggregate choices
do not refer to ancestors.
(Diagnose_Misplaced_Aspects): Improve diagnostics when it is a clear
misspelling of Initialize aspect.
* sem_ch6.adb (Analyze_Direct_Attribute_Definition): If missing, add a
compiler generated Initialize aspect with default others to trigger
Initialize analysis.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* contracts.adb (Has_Public_Visibility_Of_Subprogram): Use Subp_Id
throughout and Is_Expression_Function to spot expression functions.
* ghost.adb (Is_OK_Declaration): Likewise.
* sem_ch12.adb (Analyze_One_Association): Likewise.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Likewise.
(Analyze_Subprogram_Specification): Fix typo.
(Find_Corresponding_Spec): Call Is_Expression_Function.
* sem_ch8.adb (Analyze_Subprogram_Renaming): Retrieve the expression
by means of Expression_Of_Expression_Function.
* sem_res.adb (Resolve_Allocator): Call Is_Expression_Function.
(Rewrite_Renamed_Operator): Likewise.
* sem_util.adb (Expression_Of_Expression_Function): Streamline the
the implementation.
(Is_Expression_Function): Likewise.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_Ctrl_Function_Call): Bail out for the name
of an object renaming declaration at library level, if the call
does not return on the secondary stack.
* exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Rewrite the
renaming as a regular object declaration if it is declared at
library level and the name is a controlled function call whose
result is not returned on the secondary stack.
* exp_util.adb (Rewrite_Object_Declaration_As_Renaming): Minor fix.
2026-05-25 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): Record subtypes
inherit the CPP_Class attribute; required for instantiations.
2026-05-25 Gary Dismukes <dismukes@adacore.com>
* contracts.adb (Analyze_Contracts): Add cases for formal subprogram
Nkinds so that Analyze_Entry_Or_Subprogram_Contract will be called
for them.
* sem_attr.adb (Analyze_Attribute_Old_Result): Account for the cases
of formal subprogram Nkinds, allowing Old attributes for those.
* sem_ch12.adb (Build_Subprogram_Wrappers): Add a formal for passing
the unanalyzed generic formal, and use it for copying any aspect
specifications of the generic formal rather than copying the analyzed
generic formal's aspects.
(Analyze_One_Association): Pass Assoc.Un_Formal as an additional
actual in the call to Build_Subprogram_Wrappers.
2026-05-25 Steve Baird <baird@adacore.com>
* accessibility.adb (Needs_Accessibility_Level_Temp_Or_Check): Conform
to spec changes. Return True for the RHS of an assignment statement.
* accessibility.ads: Change name of Is_Anonymous_Access_Actual
to Needs_Accessibility_Level_Temp_Or_Check; the function now returns
True in cases other than those described by the old name.
Also change name of the formal parameter from N to Conditional_Expr.
* exp_ch4.adb (Expand_N_If_Expression): Update call to a function
whose name changed.
2026-05-25 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Is_Fully_Initialized_Variant): Moved inside
subprogram Is_Fully_Initialized_Type.
(Is_Fully_Initialized_Constrained_Array): New subprogram that
factorizes code of Is_[Fully|Partially]_Initialized_Type.
(Is_Fully_Initialized_Record_Type): New subprogram; add missing
support for incomplete types.
(Is_Partially_Initialized_Record_Type): New subprogram; add missing
support for incomplete types.
(Is_Partially_Initialized_Type): Add new formal for predicate checks.
* sem_util.ads (Is_Partially_Initialized_Type): Add new formal for
predicate checks.
* sem_warn.adb (Type_OK_For_No_Value_Assigned): Use named parameters
in call to Is_Partially_Initialized_Type.
* sem_ch3.adb (Analyze_Object_Declaration): Add new actual for
predicate checks.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Introduce new local
boolean constant From_Expression_Function, use it throughout, and
replace an equivalent test by it. Do not deal with name conflicts
here when it is true. Do not verify the consistency of overriding
indicators for stand-alone expression functions.
* sem_util.ads (Is_Expression_Function_Or_Completion): Fix improper
wording in description.
* sem_util.adb (Is_Expression_Function_Or_Completion): Streamline
the implementation.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.adb (Remove_Init_Call.Find_Init_Call_In_List): Check that
the first actual denotes the expected variable modulo qualification
and conversion.
2026-05-25 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Report an error if the
return statement of a function with foreign convention has a call
to a C++ constructor.
* exp_ch3.adb (Expand_N_Object_Declaration): Handle initialization
expression calling a C++ constructor in an extended return statement
of a subprogram with Ada convention.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Pull out the generic
case from the if-statement and put it first.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* exp_disp.adb (Expand_Dispatching_Call): Remove suppression of checks
during analysis of expanded dispatching calls.
2026-05-25 Ronan Desplanques <desplanques@adacore.com>
* doc/gnat_rm/gnat_language_extensions.rst: Add that finally is a
non-reserved keyword.
* par-ch5.adb (P_Sequence_Of_Statements): handle "finally" syntax
extension.
* snames.ads-tmpl: Remove the concept of GNAT extension reserved
word.
* snames.adb-tmpl (Is_Keyword_Name): Likewise.
* scans.adb (Initialize_Ada_Keywords): Likewise.
* par-util.adb (Check_Future_Keyword): Likewise.
* gnat_rm.texi: Regenerate.
2026-05-25 Bob Duff <duff@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Body):
Remove "raise Program_Error" and consolidate other
cases.
2026-05-25 Sebastian Poeplau <poeplau@adacore.com>
* libgnarl/libgnarl.gpr: Add dependency on libgnat.gpr.
Set Library_Name and Library_Version depending on Library_Kind.
* libgnat/libgnat.gpr: Likewise.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* aspects.ads (Aspects): Make Super aspect optional to allow for
explicit call to parent parameterless constructor.
* exp_ch3.adb (Build_Implicit_Parameterless_Constructor): Build implicit
parameterless constructor when no other constructors are defined but the
type has an ancestor with constructors.
* exp_ch6.adb
(Init_Expression_If_Any): Pe4rmit implicit calls to parameterless
constructors in initialization expressions if available.
(Make_Parent_Constructor_Call): Super without parameters calls the
parent parameterless constructor.
* sem_ch13.adb (Analyze_Aspect_Specification): Allow Super aspect
without expression.
* sem_ch3.adb (Analyze_Object_Declaration): Delay check for missing
parameterless constructor until the the implicit constructor is built.
2026-05-25 Steve Baird <baird@adacore.com>
* aspects.ads: Add three new Taint_Xxx aspects to the Aspect_Id
enumeration type and define a corresponding subtype,
Ignored_Aspects.
* exp_prag.adb (Expand_N_Pragma): Don't rewrite a taint-related
pragma as a null statement. We want to leave the (unanalyzed)
pragma in the tree.
* sem_ch13.adb (Analyze_One_Aspect): Leave taint-related aspect
specifications
(and their arguments, if any) unanalyzed.
(Check_Aspect_At_Freeze_Point): Update a case statement to treat
the new aspects as an error case.
* sem_util.adb (Should_Ignore_Pragma_Sem): Return True for an
ignored pragma.
* snames.ads-tmpl: Define names for the three new aspects.
2026-05-25 Bob Duff <duff@adacore.com>
* scans.adb (Save_Scan_State): Use an aggregate.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* exp_ch6.adb (Build_Helper_Call): Refactor code to handle both static and
dynamic precondition calls in the same way.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* exp_ch3.adb (Build_Record_Init_Proc): Move Build_Assignment to
Build_Component_Assignment in Exp_Util for a more general use.
* exp_ch6.adb (Prepend_Constructor_Procedure_Prologue): refactor using
Build_Component_Assignment.
* exp_util.adb (Build_Component_Assignment): Logic to build component
assignments for initialization procedures and constructor prologues.
* exp_util.ads (Build_Component_Assignment): Likewise.
* sem_ch5.adb (Analyze_Assignment): Revert back changes from previous
attempt to fix assignments of limited types in constructor prologues,
the use of Build_Component_Assignment makes those changes unnecessary.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Minor comment fixes.
2026-05-25 Eric Botcazou <ebotcazou@adacore.com>
* sinput.ads: Small tweak to head comment.
2026-05-25 Denis Mazzucato <mazzucato@adacore.com>
* sem_ch3.adb (Build_Derived_Type): Propagate by-constructor indication
only for derived tagged types, not for composition.
2026-05-19 Jakub Jelinek <jakub@redhat.com>
PR other/125348
* libgnat/s-regpat.ads: Fix comment spelling, paramter -> parameter.
2026-05-10 Eric Botcazou <ebotcazou@adacore.com>
PR ada/125240
* gen_il-gen-gen_entities.adb (Enumeration_Kind): Make
Lit_Indexes and Lit_Strings be defined for root types only.
* einfo.ads (Lit_Hash): Adjust description.
(Lit_Indexes): Likewise.
(Lit_Strings): Likewise.
(E_Enumeration_Type): Likewise.
* exp_imgv.adb (Expand_Image_Attribute): Do not fetch the root type
for enumeration types, except for character types, and adjust.
2026-05-03 Eric Botcazou <ebotcazou@adacore.com>
PR ada/125168
* libgnat/s-dorepr__freebsd.adb (Two_Prod): Adjust to renaming.
(Two_Sqr): Likewise.
2026-05-01 Eric Botcazou <ebotcazou@adacore.com>
PR ada/87936
* gnatlink.adb (Gnatlink): Rename local variable and add Output_PIE
local variable; when it is set, compile the binder file with -fPIE.
(Process_Args): Set Output_PIE upon seeing -pie.
(Process_Binder_File): Append "_pic" to the name of the static Ada
runtime if Output_PIE is set.
2026-04-30 Eric Botcazou <ebotcazou@adacore.com>
PR ada/110336
* gcc-interface/Makefile.in (COVERAGE_FLAGS): New variable
(GCC_LINK_FLAGS): Add $(COVERAGE_FLAGS).
(ALL_CFLAGS): Likewise.
(enable_host_pie): Fold into single use.
2026-04-30 Eric Botcazou <ebotcazou@adacore.com>
PR ada/125044
* sem_disp.adb (Check_Controlling_Formals): Apply the same massaging
to the result subtype as to the parameter subtypes.
2026-04-22 Eric Botcazou <ebotcazou@adacore.com>
PR ada/85766
* libgnat/a-direct.adb (Containing_Directory): Streamline and strip
a trailing directory separator from the name.
2026-04-22 Jakub Jelinek <jakub@redhat.com>
* gnatvsn.ads: Bump Library_Version to 17. Bump Current_Year to 2026.
2026-04-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124918
* gcc-interface/Makefile.in (TOOLS1_LIBS): Restore.
(../../gnatmake$(exeext)): Link with $(TOOLS1_LIBS).
(../../gnatlink$(exeext)): Likewise.
2026-04-19 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124918
* gcc-interface/Makefile.in (TGT_LIB): Move up.
(LIBBACKTRACE): Likewise.
(LIBIBERTY): Likewise.
(LIBGNAT): Likewise.
(LIBS): Likewise.
(TOOLS_LIBS): Use $(LIBS).
(TOOLS1_LIBS): Delete.
(../../gnatmake$(exeext)): Do not link with $(TOOLS1_LIBS).
(../../gnatlink$(exeext)): Likewise.
2026-04-17 Eric Botcazou <ebotcazou@adacore.com>
PR ada/107392
* sem_res.adb: Add clauses for Ttypes.
(Resolve.Patch_Up_Value): Do not try to convert real literals that
do not fit in Universal_Integer.
2026-04-17 Eric Botcazou <ebotcazou@adacore.com>
PR ada/107391
* urealp.adb (Decimal_Exponent_Hi): Check that the denominator is
in range before invoking UI_To_Int on it, and cope with failure.
(Decimal_Exponent_Lo): Likewise.
2026-04-15 Eric Botcazou <ebotcazou@adacore.com>
PR ada/105212
* exp_aggr.adb (Build_Array_Aggr_Code): If the aggregate comes from
source, call Set_Referenced_Modified on the target.
2026-04-15 Eric Botcazou <ebotcazou@adacore.com>
PR ada/87170
* sem_res.adb (Resolve_String_Literal): Copy Comes_From_Source from
the string literal to the character literals.
2026-04-13 Eric Botcazou <ebotcazou@adacore.com>
PR ada/95452
* libgnat/g-heasor.adb (Sort.Sift): Add guard against overflow.
* libgnat/g-hesorg.adb (Sort.Sift): Likewise.
* libgnat/g-hesora.adb (Sort.Sift): Likewise. Restore consistency.
2026-04-13 Eric Botcazou <ebotcazou@adacore.com>
PR ada/77535
* libgnat/s-pehage.adb (New_Word): Rebase the input.
2026-04-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124836
* adaint.c [__MINGW32__]: Do not include mingw32.h twice, and also
include sys/param.h.
2026-04-07 Sandra Loosemore <sloosemore@baylibre.com>
PR other/124784
* gcc-interface/lang.opt.urls: Regenerated.
2026-04-05 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): Use a constant return
object when the simple return is rewritten as an extended one.
* libgnat/s-secsta.adb (SS_Allocate): Raise Storage_Error if the
requested size is negative.
* libgnat/s-secsta__cheri.adb (SS_Allocate): Likewise.
2026-04-03 Tonu Naks <naks@adacore.com>
* doc/gnat_rm/gnat_language_extensions.rst: Adjust rules for
structural generic instantiations.
* gnat_rm.texi: Regenerate.
2026-03-31 Eric Botcazou <ebotcazou@adacore.com>
* sem_attr.adb (Analyze_Attribute) <Attribute_Reduce>: Rewrite the
analysis of a non-overloaded reducer. Moreover, when both actuals
are overloaded, compute the set of possible interpretations.
(Resolve_Attribute) <Attribute_Reduce>: Streamline the processing.
2026-03-27 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch12.adb (Analyze_Structural_Associations): Create a local
instance instead of a structural instance when a local entity of
a library-level package is used in a subprogram instantiation.
2026-03-27 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124596
* sem_ch12.ads (Check_Private_View): Move around.
* sem_ch12.adb (Check_Private_View): Retrieve the partial view
by means of a call to Incomplete_Or_Partial_View.
(Save_Global_References.Set_Global_Type): Do not force the full
view of a type when only the partial declaration is visible.
* sem_res.adb (Resolve_Actuals.Insert_Default): Remove obsolete
code coping with the above kludge.
2026-03-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124607
* sem_elab.adb (Has_Body.Find_Body): Fix thinko.
2026-03-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124606
* sem_ch12.adb (Find_Actual_Type): Rename formal parameter.
(Map_Formal_Package_Entities): Do not register base types.
2026-03-20 Eric Botcazou <ebotcazou@adacore.com>
PR ada/120669
* sem_ch4.adb (Analyze_Explicit_Dereference): Remove interpretations
of the prefix only if they are of access types.
(Analyze_One_Call.Indicate_Name_And_Type): Check for an implicit
dereference only after indicating the name and type of the call.
* sem_ch5.adb (Analyze_Assignment): Do not remove interpretations
for the LHS if they are for a type with implicit dereference.
* sem_res.adb (Resolve): Streamline the processing of overloaded
nodes once an interpretation is picked for them. Add a specific
handling for additional interpretations for generalized references.
(Resolve_Explicit_Dereference): Remove interpretations of the prefix
only if they are of access types.
(Is_Ambiguous_Operand): Skip the direct interpretation for a limited
type that has implicit dereference.
* sem_type.adb (Add_One_Interp): Set the name of the first entry of
the table of interpretations in more cases.
2026-03-14 Matthias Klose <doko@gcc.gnu.org>
PR ada/107475
* Makefile.rtl (s390% linux%): Define MISCLIB.
(arm% linux-gnueabi%): Likewise.
(%x32 linux%): Likewise.
2026-03-12 Steve Baird <baird@adacore.com>
PR ada/124016
* libgnat/a-cbinho.adb (Create_Subpool): Handle the case where
the type Holder_Subpool has nontrivial finalization. Declare the
local variable Subpool with its Import aspect specified (to avoid
unwanted finalization), and make corresponding changes in order to
initialize that variable.
* libgnat/s-stposu.ads (_Adjust_Clone): New procedure.
* libgnat/s-stposu.adb (_Adjust_Clone): New body.
2026-03-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124369
* accessibility.adb (Accessibility_Message): Give an error instead
of a warning in an instance when No_Dynamic_Accessibility_Checks is
in effect.
(Innermost_Master_Scope_Depth): Restore the original computation of
the nearest enclosing dynamic scope.
* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Call the
Accessibility_Message routine in all cases to give accessibility
errors and do not return. Call the Static_Accessibility_Level
function in all cases to compute static accessibility levels.
Add guard before calling Prefix_With_Safe_Accessibility_Level.
2026-03-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124376
* sem_res.adb (Resolve_Actuals.Check_Aliased_Parameter): Deal with
assignment statements.
2026-03-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124376
* accessibility.adb (Accessibility_Level): Minor formatting tweaks.
(Accessibility_Level.Function_Call_Or_Allocator_Level): Implement
AI12-0402. Reimplement the loop climbing up the parent chain to
find an object being initialized. Restrict the specific handling
of N_Assignment_Statement nodes to the anonymous access type case.
* doc/gnat_rm/implementation_of_ada_2022_features.rst: Adjust the
entries of AI12-0277, AI12-0345 & AI12-0372, add one for AI12-0402.
* gnat_rm.texi: Regenerate.
2026-03-07 Eric Botcazou <ebotcazou@gcc.gnu.org>
PR target/124336
* init.c (__gnat_adjust_context_for_raise) [x86/Linux]: Fix typo.
2026-03-07 Eric Botcazou <ebotcazou@gcc.gnu.org>
PR target/124336
* init.c (__gnat_adjust_context_for_raise) [x86/Linux]: Adjust
pattern matching to new stack probes.
2026-02-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124285
* gcc-interface/decl.cc (components_to_record): Force a packed
layout for the innermost variant of an unchecked union type with
fixed part and full representation clause.
2026-02-27 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124201
PR ada/124282
* exp_aggr.adb (Expand_Iterated_Component): Replace the iteration
variable in the expression as well.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Preanalyze
the expression directly as well.
2026-02-27 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123306
* freeze.adb (Freeze_Entity): For a class-wide equivalent type of
a non-interface root type, freeze the root type before it.
* sem_ch3.adb (Derived_Type_Declaration): Minor tweak.
* sem_ch12.adb (Analyze_One_Association): Revert latest change.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: When
the prefix is a class-wide type, insert the declaration of the CW-
equivalent type immediately after that of the root type, and the
size check for the root type into its own freezing actions.
2026-02-26 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124201
* exp_aggr.adb (Expand_Iterated_Component): Replace the iteration
variable in the key expression and iterator filter, if any.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Preanalyze
the specification and key expression directly.
2026-02-25 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124226
* sem_res.adb (Resolve_Implicit_Dereference): Move declaration to...
* sem_res.ads (Resolve_Implicit_Dereference): ...here.
* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Also call
Resolve_Implicit_Dereference when resolving a protected operation.
2026-02-24 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/124224
* sem_aggr.adb (Resolve_Container_Aggregate): Minor tweaks.
(Resolve_Iterated_Association): Compute Typ on all paths.
2026-02-22 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124192
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst
(Max_Tasks): Adjust description.
* gnat_rm.texi: Regenerate.
2026-02-22 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124179
* sem_ch9.adb (Analyze_Triggering_Alternative): Use more robust
test for delay and entry call statements and fix thinko in test
for procedure call statements.
2026-02-20 Eric Botcazou <ebotcazou@adacore.com>
* libgnat/s-stposu.adb (Finalize_Pool): Pass a local copy of the
handle in the call to Finalize_And_Deallocate.
2026-02-16 Eric Botcazou <ebotcazou@adacore.com>
PR ada/124106
* exp_ch4.adb (Expand_N_Allocator): Minor fix in commentary.
(Expand_Allocator_Expression): Propagate the Subpool_Handle_Name
of the original allocator onto the newly built allocators.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
Use Preserve_Comes_From_Source to propagate Comes_From_Source.
(Make_CPP_Constructor_Call_In_Allocator): Likewise.
2026-02-11 Steve Baird <baird@adacore.com>
PR ada/124016
* doc/gnat_rm/implementation_defined_attributes.rst: Document
that Finalization_Size attribute is defined for class-wide types.
* exp_attr.adb (Expand_N_Attribute_Reference) <Finalization_Size>:
Add support for class-wide types.
<Size>: Raise Constraint_Error for class-wide types.
* exp_imgv.adb (Expand_Image_Attribute): Adjust call to renaming.
(Expand_Wide_Image_Attribute): Likewise.
(Expand_Wide_Wide_Image_Attribute): Likewise.
* sem_attr.ads (Finalization_Size): Update comment.
* sem_attr.adb (Analyze_Image): Adjust call to renaming.
(Analyze_Attribute): Remove check disallowing Finalization_Size
attribute for class-wide types.
* sem_util.ads (Is_Object_Image): Rename into...
(Is_Object_Prefix): ...this.
* sem_util.adb (Is_Object_Image): Rename into...
(Is_Object_Prefix): ...this.
* libgnat/a-cbinho.ads (Extra_Storage): Use Descriptor_Size and
Finalization_Size attributes.
(Max_Allocation_Overhead_In_Storage_Elements): Delete.
2026-02-11 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/124054
* exp_util.adb (Build_Allocate_Deallocate_Proc): Tidy up and pass
Proc_Id as the new scope in the call to the New_Copy_Tree function.
2026-02-08 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/124025
* exp_ch9.adb (Expand_Entry_Barrier.Is_Global_Entity): Use
Scope_Within_Or_Same to test whether the object is local.
2026-02-08 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/121576
* freeze.adb (Freeze_Array_Type): When the component size is
specified, check that it is valid when the component type is
either a fixed-point type or a bit-packed array type.
2026-02-03 Eric Botcazou <ebotcazou@adacore.com>
* checks.adb (Apply_Discriminant_Check): Bail out for a source type
that is a class-wide type whose root type has no discriminants.
* exp_ch4.adb (Expand_N_Type_Conversion): If the target type is an
access type, emit null access checks before accessibility checks.
* sem_util.adb (In_Return_Value): Deal again with assignments to
return objects.
2026-02-02 Eric Botcazou <ebotcazou@adacore.com>
PR ada/89159
* sem_ch6.adb (Conforming_Types.Is_Matching_Limited_View): Return
true when the type is an incomplete view of the non-limited view.
2026-02-01 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/123902
* sem_ch4.adb (Analyze_Selected_Component): Also test
Core_Extensions_Allowed for discriminated private types.
Rework and augment commentary throughout the procedure.
2026-02-01 Eric Botcazou <ebotcazou@adacore.com>
Liam Powell <liam@liampwll.com>
PR ada/121316
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Minor tweak.
(Expand_Iterator_Loop_Over_Container): Likewise.
(Expand_N_Loop_Statement): Use Statements (N) throughout.
2026-01-30 Gary Dismukes <dismukes@adacore.com>
* sem_ch8.adb (End_Use_Type): Remove test of Prev_Use_Clause as
as a condition for resetting In_Use and Current_Use_Clause, and
change setting of that flag and field based on Prev_Use_Clause
rather than setting them to Empty. Revise preceding comment.
2026-01-30 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123867
* sem_ch10.adb (Analyze_Compilation_Unit): Output info message
when -gnatdi is specified.
(Install_Parents): Likewise. Set the Is_Visible_Lib_Unit flag
on the unit.
(Install_Private_With_Clauses): Do not output info message here.
(Remove_Parents): Output info message when -gnatdi is specified
and clear the Is_Visible_Lib_Unit flag on the unit.
2026-01-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123861
* sem_type.adb (Covers): Fix couple of typos in comment.
(Specific_Type): Adjust to Covers' handling of types declared
with the Aggregate aspect in Ada 2022.
2026-01-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123857
* checks.adb (Apply_Parameter_Validity_Checks.Add_Validity_Check):
Set Is_Checked on the generated {Pre,Post}_Condition pragma and
bail out if the parameter is of an Unchecked_Union type.
2026-01-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123832
* exp_imgv.adb: Add with and use clauses for Exp_Ch7.
(Expand_Image_Attribute): Establish a transient scope before
rewriting the attribute as a call to Put_Image.
(Expand_Wide_Image_Attribute): Likewise.
(Expand_Wide_Wide_Image_Attribute): Likewise.
* exp_put_image.ads (Build_Image_Call): Add note about the
need for a transient scope when the function is invoked.
* exp_put_image.adb (Build_Image_Call): Call Insert_Actions
to immediately insert the actions instead of wrapping them
in an Expression_With_Actions node.
2026-01-25 Sandra Loosemore <sloosemore@baylibre.com>
* gcc-interface/lang.opt.urls: Regenerated.
2026-01-21 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123580
* sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Replace call to
Scope_Within_Or_Same (Current_Scope, S) with In_Open_Scopes (S) to
test whether S is open in the current scope.
* sem_util.adb (From_Nested_Package): Likewise.
2026-01-17 Eric Botcazou <ebotcazou@adacore.com>
Lisa Felidae <lisa@felidae.bam.moe>
PR ada/68179
PR ada/123589
* exp_ch3.adb (Expand_Freeze_Array_Type): Build an initialization
procedure for a bit-packed array type if Has_Default_Aspect is set
on the base type, but make sure not to build it twice. Also test
Has_Default_Aspect for a type derived from String.
2026-01-10 Iain Sandoe <iain@sandoe.co.uk>
* libgnarl/s-osinte__darwin.adb: Delete unneeded use clause.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.cc (gnat_to_gnu): Add comment explaining why
it is necessary to remove the padding for an object of a type with
self-referential size when it is not converted to the result type.
* gcc-interface/utils2.cc (build_binary_op) <MODIFY_EXPR>: For an
assignment between small padded objects of the same type with self-
referential size, and which have the same (constant) size, use the
padded view of the objects.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.cc (gnat_to_gnu): For the LHS of an assignment
or an actual parameter of a call, do not remove the padding even for
a type of self-referential size when the padded size is small enough
to be copied efficiently.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch12.ads (Save_Global_References_In_Aspects): Move to...
* sem_ch12.adb (Save_Global_References_In_Aspects): Move to...
* contracts.adb (Save_Global_References_In_Contract): ...here.
2026-01-09 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Remove previous patch
and place the call to the constructor into a compound statement
attached to the object; the compound statement will be moved to
the freezing actions of the object if the object has an address
clause.
2026-01-09 Denis Mazzucato <mazzucato@adacore.com>
* sem_ch13.adb (Check_Constructor_Initialization_Expression): The first
parameter of an implicit constructor comes from Specification, not
Corresponding_Spec.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Type_Conversion): Restore Comes_From_Source
test on N itself instead of its parent node.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb (Function_Call_Or_Allocator_Level): Return the
level of the subprogram in Ada 95 only in the case where the result
type is a return-by-reference type.
2026-01-09 Steve Baird <baird@adacore.com>
* libgnat/a-cbinho.ads: add Warnings pragmas.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.adb (Function_Call_Or_Allocator_Level): Adjust the
latest change to cope with _Wrapped_Statements functions.
* einfo.ads (Wrapped_Statements): Fix description.
* sem_util.adb (In_Return_Value): Fix typo in comment.
2026-01-09 Javier Miranda <miranda@adacore.com>
* checks.ads (Convert_From_Bignum): Add a new formal and update
documentation.
(Convert_To_Bignum): Update documentation.
* checks.adb (Is_Signed_Integer_Arithmetic_Op): Renamed as
Is_Overflow_Arithmetic_Op, and replace calls to function
Is_Signed_Integer_Type by calls to Has_Overflow_Operations.
(Apply_Arithmetic_Overflow_Minimized_Eliminated): Add support
for types with the Unsigned_Base_Range aspect.
(Apply_Divide_Checks): Replace calls to Is_Signed_Integer_Type
by calls to Has_Overflow_Operations.
(Compute_Range_For_Arithmetic_Op): Adjust comment.
(Convert_To_Bignum): Add support for types with the Unsigned_
Base_Range aspect.
(Convert_From_Bignum): Add support for result type with the
Unsigned_Base_Range aspect.
(Minimize_Eliminate_Overflows): Add support for types with the
Unsigned_Base_Range aspect.
* exp_ch4.adb (Minimized_Eliminated_Overflow_Check): Replace
call to Is_Signed_Integer_Type by call to Has_Overflow_Operations.
(Expand_Compare_Minimize_Eliminate_Overflow): Add support for types
with the Unsigned_Base_Range aspect.
(Expand_Membership_Minimize_Eliminate_Overflow): Ditto.
(Expand_N_Op_Expon): Ditto.
(Expand_Exponentiation): New subprogram.
* rtsfind.ads (RE_Id): Add RE_LLU_To_Bignum, RE_LLU_From_Bignum.
* libgnat/s-bignum.ads (LLU_To_Bignum): New subprogram.
(LLU_From_Bignum): New subprogram.
* libgnat/s-bignum.adb (LLU_To_Bignum): New subprogram.
(LLU_From_Bignum): New subprogram.
* libgnat/s-genbig.ads (From_Bignum): New overloaded functions
for Long_Long_Long_Unsigned and Long_Long_Unsigned types.
(To_Bignum): Ditto.
* libgnat/s-genbig.adb (From_Bignum): New overloaded functions
for Long_Long_Long_Unsigned and Long_Long_Unsigned types.
(To_Bignum): Ditto.
* libgnat/s-expuns.ads (Exp_Unsigned): Fix documentation.
* libgnat/s-expllu.ads (Exp_Long_Long_Unsigned): Ditto.
* libgnat/s-explllu.ads (Exp_Long_Long_Long_Unsigned): Add missing
documentation.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* accessibility.ads (Is_Special_Aliased_Formal_Access): Delete.
* accessibility.adb (Is_Special_Aliased_Formal_Access): Likewise.
(Accessibility_Level.Innermost_Master_Scope_Depth): Look for non-
package bodies and statements directly.
(Accessibility_Level.Function_Call_Or_Allocator_Level): For a
function call in a return context, return the extra level of the
master of the call only for dynamic checks.
(Accessibility_Level) <N_Defining_Identifier>: Always return the
library level for an explicitly aliased parameter in the context
of a return from the subprogram where it is declared.
* exp_ch4.adb (Expand_N_Allocator): Test manually whether the
context is a return statement instead of calling In_Return_Value.
(Expand_N_Type_Conversion): Do not apply accessibility checks to
actuals of a tagged type in a synthesized subprogram call.
* sem_attr.adb (Resolve_Attribute) <Access>: Remove specific test
for explicitly aliased parameters.
* sem_ch4.adb: Remove clauses for Accessibility package.
(Analyze_Call): Do not apply static accessibility checks here...
* sem_res.adb (Resolve_Actuals): ...but here instead. Implement
a generalized form of AI12-0402.
(Valid_Conversion): Apply static accessibility checks in extended
return statements too.
* sem_util.ads (In_Return_Value): Adjust description.
(Is_Master): Delete.
* sem_util.adb (Is_Explicitly_Aliased): Reindent.
(In_Return_Value): Reimplement.
(Is_Master): Delete.
2026-01-09 Viljar Indus <indus@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>
* errout.adb (Insert): New function to create an insertion fix.
(Deletion): New function to create a deletion fix.
* errout.ads: Likewise.
* sem_warn.adb (Create_Add_Constant_Fix): New function to create
a fix for adding a constant qualifier for a variable declaration.
(Change_In_Out_To_In_Fix): New function to create a fix for
convertinting an in out parameter direction to a an in direction.
2026-01-09 Tonu Naks <naks@adacore.com>
* doc/gnat_rm/implementation_of_ada_2022_features.rst: update
AI12-0350, add AI12-0254.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
2026-01-09 Ronan Desplanques <desplanques@adacore.com>
* adaint.c (__gnat_set_thread_description): New function.
* libgnarl/s-taprop__mingw.adb (Enter_Task): Set thread description.
* rtinit.c (__gnat_runtime_initialize): Set up function pointer.
* mingw32.h (HRESULT, pSetThreadDescription): New.
2026-01-09 Denis Mazzucato <mazzucato@adacore.com>
* exp_ch3.adb (Build_Init_Procedure): Remove call to constructors.
(Build_Default_Simple_Initialization): Implicit call to parameterless constructors in new
allocations.
(Expand_Freeze_Record_Type): Freeze constructors as we would freeze predefined operations.
(Constructor_Freeze): Freeze all constructors.
* sem_attr.adb (Analyze_Attribute): Handle missing parameterless constructors.
* sem_ch3.adb: The default constructor is now called parameterless.
* sem_util.adb (Find_Matching_Constructor): Return the constructor
matching the given condition. Before it was just checking its
existence.
(Has_Copy_Constructor): Move it upward to maintain alphabetic
order of utility subprograms.
(Has_Parameterless_Constructor): The default constructor is now called parameterless.
(Has_Explicit_Constructor): New utility to check for constructors
defined by the user. Used to understand if an implicit
parameterless constructor exists.
(Is_Copy_Constructor): Refactor easier control flow.
(Is_Parameterless_Constructor): New utility to check if a constructor has a profile
compatible with the parameterless constructor.
* sem_util.ads: Likewise.
2026-01-09 Viljar Indus <indus@adacore.com>
* errid-diagnostic_repository.ads: Update the diagnostic repository.
* errid-switch_repository.ads: Update the switch repository.
* errid.ads: Add new Diagnostic_Id-s.
* sem_warn.adb (Check_References): Add Diagnostic_Id-s for
error messages triggered by -gnatwk.
2026-01-09 Viljar Indus <indus@adacore.com>
* errid.adb (Check_Diagnostic_To_Switch_Consistency): New subprogram
for checking the consistency of diagnostics.
(Check_Switch_To_Diagnostic_Consistency) New subprogram for checking
the consistency of switches.
(Add_All_Diagnostic_Rules): Check diagnostic consitency.
(Add_All_Switch_Rules): Check switch consitency.
2026-01-09 Viljar Indus <indus@adacore.com>
* debug.adb: remove use case for -gnatd_E
* errout.adb (Output_Messages): remove printing of
the diagnostic repository when -gnatd_E is used.
* gnatcmd.adb: Add support for printing the diagnostic repository.
2026-01-09 Viljar Indus <indus@adacore.com>
* errid-diagnostic_repository.ads: New package for storing
information about diagnostics.
* errid-switch_repository.adb: New package for storing
information about switches.
* errid-switch_repository.ads: Likewise.
* errid.adb: Move common methods related to Diagnostic_Id-s and
Switch_Id-s to this pacakge.
* errid.ads: Likewise.
* errout.adb (Add_Unique_Diagnostics_And_Switches): New method
for gathering all of the unique Diagnostic_Id-s and Switch_Id-s
among all of the error messages.
(Output_Messages): Use the new SARIF printer interface for printing
the report.
* erroutc-sarif_emitter.adb (Print_Relationship): New method for
printing relationship nodes.
(Print_Rule): Support printing switches as rules. Add support
for printing relationship nodes under rules. Remove brackets around
the rule name.
(Print_Runs): Add a printer argument to pass all of the switches
and diagnostics as rules in the SARIF report.
(Print_Tool): Likewise.
(Free): New method.
(Get_Unique_Rules): Removed.
(Print_Result): Remove brackets around the rule name.
(Print_Rules): Print switches as rules.
* erroutc-sarif_emitter.ads (SARIF_Printer): New record type for
storing and passing all of the diagnostic and switch information
around in the SARIF printer.
(Report_Kind): New type for indicating the different reports the
SARIF emitter can produce.
(Free): New method for releasing all of the dynamically allocated
memory.
(Print_SARIF_Report): Add a SARIF_Printer argument.
* erroutc.adb (Get_Human_Id): Removed.
(Get_Switch): Removed.
(Get_Doc_Switch): Simplify code.
* erroutc.ads: (Get_Human_Id): Removed.
(Get_Switch): Removed.
* errsw.adb: Replaced by errid-switch_repository.adb.
* errsw.ads: Replaced by errid-switch_repository.ads.
* errutil.adb: Remove dependecy to errsw pacakge.
* par-endh.adb: Fix whitespace.
* gcc-interface/Make-lang.in: Update the dependencies.
* gcc-interface/Makefile.in: Likewise.
2026-01-09 Steve Baird <baird@adacore.com>
* doc/gnat_rm/implementation_defined_attributes.rst: Document the
From_Address attribute.
* exp_attr.adb (Expand_N_Attribute_Reference): Implement expansion
of a From_Address attribute reference.
* sem_attr.adb (Analyze_Attribute): Implement analysis of a
From_Address attribute reference.
(Eval_Attribute): A From_Address attribute reference cannot be
statically evaluated.
* snames.ads-tmpl: Declare Name_From_Address and Attribute_From_Address.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
2026-01-09 Steve Baird <baird@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Add new legality
checks for Super and Initialize aspect specifications, implemented
by calling a new local procedure,
Check_Constructor_Initialization_Expression.
2026-01-09 Steve Baird <baird@adacore.com>
* Makefile.rtl: add entry for new unit
* impunit.adb: add entry for new unit
* libgnat/a-cbinho.adb: new file with body for new unit
* libgnat/a-cbinho.ads: new file with spec for new unit
* libgnat/a-coboho.ads: add comment
* libgnat/a-undesu.ads: add Preelaborate aspect specification,
as per AI22-0050.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
PR ada/123003
* accessibility.adb: Remove unused clauses.
* aspects.adb: Likewise.
* checks.adb: Likewise.
* comperr.adb: Likewise.
* contracts.adb: Likewise.
* cstand.adb: Likewise.
* debug_a.adb: Likewise.
* errout.adb: Likewise.
* eval_fat.adb: Likewise.
* exp_aggr.adb: Likewise.
* exp_atag.adb: Likewise.
* exp_attr.adb: Likewise.
* exp_cg.adb: Likewise.
* exp_ch11.adb: Likewise.
* exp_ch12.adb: Likewise.
* exp_ch13.adb: Likewise.
* exp_ch2.adb: Likewise.
* exp_ch3.adb: Likewise.
* exp_ch4.adb: Likewise.
* exp_ch5.adb: Likewise.
* exp_ch6.adb: Likewise.
* exp_ch7.adb: Likewise.
* exp_ch8.adb: Likewise.
* exp_ch9.adb: Likewise.
* exp_code.adb: Likewise.
* exp_dbug.adb: Likewise.
* exp_disp.adb: Likewise.
* exp_dist.adb: Likewise.
* exp_fixd.adb: Likewise.
* exp_imgv.adb: Likewise.
* exp_intr.adb: Likewise.
* exp_pakd.adb: Likewise.
* exp_prag.adb: Likewise.
* exp_put_image.adb: Likewise.
* exp_sel.adb: Likewise.
* exp_smem.adb: Likewise.
* exp_spark.adb: Likewise.
* exp_strm.adb: Likewise.
* exp_tss.adb: Likewise.
* exp_unst.adb: Likewise.
* exp_util.adb: Likewise.
* exp_util.ads: Likewise.
* expander.adb: Likewise.
* freeze.adb: Likewise.
* frontend.adb: Likewise.
* ghost.adb: Likewise.
* gnat1drv.adb: Likewise.
* gnat_cuda.adb: Likewise.
* impunit.adb: Likewise.
* inline.adb: Likewise.
* itypes.adb: Likewise.
* itypes.ads: Likewise.
* layout.adb: Likewise.
* lib.adb: Likewise.
* libgnarl/s-tasuti.adb: Likewise.
* live.adb: Likewise.
* local_restrict.adb: Likewise.
* mutably_tagged.adb: Likewise.
* nlists.adb: Likewise.
* par.adb: Likewise.
* par_sco.adb: Likewise.
* pprint.adb: Likewise.
* repinfo.adb: Likewise.
* restrict.adb: Likewise.
* rtsfind.adb: Likewise.
* scil_ll.adb: Likewise.
* scn.adb: Likewise.
* sem.adb: Likewise.
* sem_aggr.adb: Likewise.
* sem_attr.adb: Likewise.
* sem_aux.adb: Likewise.
* sem_case.adb: Likewise.
* sem_cat.adb: Likewise.
* sem_ch10.adb: Likewise.
* sem_ch11.adb: Likewise.
* sem_ch12.adb: Likewise.
* sem_ch13.adb: Likewise.
* sem_ch2.adb: Likewise.
* sem_ch3.adb: Likewise.
* sem_ch4.adb: Likewise.
* sem_ch5.adb: Likewise.
* sem_ch6.adb: Likewise.
* sem_ch7.adb: Likewise.
* sem_ch9.adb: Likewise.
* sem_dim.adb: Likewise.
* sem_disp.adb: Likewise.
* sem_dist.adb: Likewise.
* sem_elab.adb: Likewise.
* sem_elim.adb: Likewise.
* sem_eval.adb: Likewise.
* sem_intr.adb: Likewise.
* sem_mech.adb: Likewise.
* sem_prag.adb: Likewise.
* sem_res.adb: Likewise.
* sem_scil.adb: Likewise.
* sem_smem.adb: Likewise.
* sem_type.adb: Likewise.
* sem_util.adb: Likewise.
* sem_util.ads: Likewise.
* sem_warn.adb: Likewise.
* sinput.adb: Likewise.
* sprint.adb: Likewise.
* strub.adb: Likewise.
* style.adb: Likewise.
* styleg.adb: Likewise.
* tbuild.adb: Likewise.
* tbuild.ads: Likewise.
* treepr.adb: Likewise.
* uname.adb: Likewise.
* sem_ch8.adb: Likewise.
(Mark_Use_Clauses.Mark_Use_Package): Do not recurse on the prefix
for a package given by an expanded name.
2026-01-09 Bob Duff <duff@adacore.com>
* debug.adb: Remove doc for gnatd_X; no longer used.
* einfo.ads: Minor comment improvement.
* exp_ch3.adb: Minor reformatting.
* exp_ch6.adb (Check_BIP_Actuals): Export.
(Validate_Subprogram_Calls): Move to Vast.
* exp_ch6.ads (Check_BIP_Actuals): Export.
* exp_ch7.adb (Make_Init_Call): Remove obsolete Set_Assignment_OK.
* frontend.adb: Move Validate_Subprogram_Calls call to VAST,
as the comment suggested.
* par.adb: Minor comment improvements.
* par-ch13.adb (Get_Aspect_Specifications):
Misc cleanup, including removal of redundant setting
of Aspects, and changing multiple 'if's to 'case'.
* par-ch4.adb (P_Simple_Name_Resync): Do not refer to Token_Node
when it is documented as not defined.
* par-ch6.adb: Minor comment improvement.
* par-util.adb (Bad_Spelling_Of): After setting Token from
identifier to keyword, destroy Token_Node, so it doesn't get
accidentally used.
* scans.adb (Save_Scan_State, Restore_Scan_State):
Put these in logical order. Make sure we're not saving
and restoring bogus information in Token_Node.
* scans.ads: Fix incorrect comment.
* scn.ads: Minor comment improvements. Do not duplicate (wrong)
information from Scans.
* scng.adb: Set Token_Node to Empty initially, so we don't
accidentally refer to bogus information from previous tokens.
* scng.ads: Minor comment improvement (remove information
about one actual from comment on the formal).
* sem_aux.ads (Initialization_Suppressed):
Minor comment improvement.
* sem_ch6.adb: Remove usage of Debug_Flag_Underscore_XX.
This code is pretty well tested by now, and anyway, it's
only called from within pragmas Assert.
* sem_util.adb (Enter_Name): Minor cleanup.
* sprint.adb (Dump_Generated_Only): Fix incorrect comment.
* vast.adb: Misc cleanup. Enable assertion about
Errout.Compilation_Errors (should be False if back end
is enabled).
(Validate_Subprogram_Calls): Move here from frontend.adb.
Move call to it here from frontend.adb.
2026-01-09 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb (Try_Container_Indexing): Conditionalize last actual of
call to Error_Msg_NE to avoid blowup on N_Parameter_Association actuals.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_attr.adb (Expand_Size_Attribute): If the attribute is applied
to a formal parameter allocated with an extra Constrained parameter,
use the value of the latter to choose between the "unconstrained" or
the "constrained" size of the formal parameter.
2026-01-09 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Under Ada83 and Ada95
modes, and compiling under -gnatw_q, search for an user-defined
equality and report a warning if found since it will not be called.
2026-01-09 Piotr Trojanek <trojanek@adacore.com>
* libgnat/system-mingw.ads (Underlying_Priorities): Restore previous
mapping with distinct values around Default_Priority.
2026-01-09 Denis Mazzucato <mazzucato@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): Do not expand copy
constructor calls when unnecessary.
* exp_ch3.adb
(Build_Implicit_Copy_Constructor): If necessary, build the implicit copy
constructor as part of the initialization procedures of its type.
(Expand_N_Object_Declaration): Add implicit 'Make attribute calls for
objects that may need construction.
* exp_ch6.adb (Make_Parent_Constructor_Call): Constructor's procedure
calls should be only generated from expansion of the 'Make attribute as
there is hidden logic to handle copy constructors.
* sem_attr.adb (Analyze_Attribute): Emit a specific error message if a
non-copy constructor is called but no constructor is defined.
* sem_ch13.adb (Analyze_Aspect_Specifications): The Ekind of the
implicitly generated copy constructor is not a subprogram body.
* sem_ch4.adb (Extended_Primitive_Ops): Extend the operation list that
can be called via prefix notation to include constructors.
* sem_ch6.adb (Check_For_Primitive_Subprogram): Skip constructors for
primitive analysis.
* sem_util.adb (Has_Matching_Constructor): Generic function to
check for the existence of a constructor matching a given
condition.
(Has_Copy_Constructor): Check whether a type has an implicit or explicit
copy constructor.
(Has_Default_Constructor): Use Has_Matching_Constructor.
(Is_Copy_Constructor): Check whether a subprogram is a copy constructor.
(Is_Copy_Constructor_Call): Check whether an attribute call is call to a
copy constructor.
* sem_util.ads: Add specs for copy constructor utility functions.
* snames.ads-tmpl (Snames): Add names Self and From.
2026-01-09 Martin Clochard <clochard@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference): For Old attribute,
detect the anonymous access type case explicitly instead of
implicitly within in Eligible_For_Conditional_Evaluation.
* sem_util.ads: (Eligible_For_Conditional_Evaluation): Do not
return True on anonymous access types. This was also breaking usage
outside expansion (legality checks for Old).
* sem_util.adb: (Conditional_Evaluation_Condition): Special case
of no determiners for anonymous access types is no longer possible.
2026-01-09 Ronan Desplanques <desplanques@adacore.com>
* snames.ads-tmpl: Make "Destructor" an attribute name.
* snames.adb-tmpl: Allow direct attribute definition for Destructor.
* gen_il-fields.ads (Destructor): New field.
(Is_Destructor): Remove.
* gen_il-gen-gen_entities.adb: (Destructor): New field.
(Is_Destructor): Remove.
* einfo.ads (Destructor): Document new field.
(Is_Destructor): Remove documentation.
* aspects.ads (Aspect_Destructor): Remove.
* exp_attr.adb (Expand_N_Attribute_Reference): Adapt after aspect
removal.
* exp_ch7.adb (Build_Finalize_Statements): Adapt to new destructor
representation.
* freeze.adb (Freeze_Entity): Remove obsolete check.
* sem_attr.adb (Analyze_Attribute, Eval_Attribute): Adapt to new
attribute.
* sem_ch13.adb (Analyze_Aspect_Specifications,
Check_Aspect_At_End_Of_Declarations): Adapt after aspect removal.
* sem_ch6.adb (Analyze_Direct_Attribute_Definition): Add handling
of Destructor attribute.
(Can_Be_Destructor_Of): New function.
* doc/gnat_rm/gnat_language_extensions.rst: Adapt documentation to
new syntax.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
2026-01-09 Tom Tromey <tromey@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst
(GNATLLVM): Update debugging documentation.
* gnat_ugn.texi: Regenerate.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.ads (Find_Hook_Context): Rename to...
(Find_Master_Context): ...this and alphabetize.
* exp_util.adb (Find_Master_Context): Rename to...
(Find_Master_Context): ...this and alphabetize.
* exp_ch4.adb (Insert_Conditional_Object_Declaration): Adjust to
above renaming.
(Process_Transients_In_Expression): Likewise.
2026-01-09 Ronan Desplanques <desplanques@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check direct
attribute definitions for specs.
2026-01-09 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Pragma): Adjust references in comments for
pragma Side_Effects and Volatile_Function.
2026-01-09 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Build_Untagged_Record_Equality): Add missing
support for incomplete and private types.
2026-01-09 Viljar Indus <indus@adacore.com>
* einfo-utils.adb (Can_Have_Formals): New function for checking
if the entity can support formals.
* einfo-utils.ads (Can_Have_Formals): Likewise.
* ghost.adb (Check_Procedure_Call_Argument_Levels): Avoid checking
the type of the formal if the called entity cannot hold formals.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not call
Move_Activation_Chain if it is not available in the runtime library.
2026-01-09 Claire Dross <dross@adacore.com>
* sem_util.ads (Overlaid_Entity): Return the root of the address
clause of an object if it is precisely supported in SPARK.
* sem_util.adb (Ultimate_Overlaid_Entity): Use Overlaid_Entity to
match the SPARK RM semantics.
* sem_prag.adb (Analyze_Global_Item): Only check for overlays on
variables.
(Analyze_Initialization_Item): Likewise.
(Analyze_Input_Item): Likewise.
2026-01-09 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Find_Overlaid_Entity): Detect overlying with slice.
2026-01-09 Ronan Desplanques <desplanques@adacore.com>
* freeze.adb (Size_Known): Modify rejection condition.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): If a predicate check
made on the RHS forced the capture of a function call to remove its
side effects, demote No_Ctrl_Actions into No_Finalize_Actions on the
N_Assignment_Statement node.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.ads (Build_Task_Allocate_Block): Change to function and
remove first formal parameter.
* exp_ch9.adb (Build_Task_Allocate_Block): Likewise. Return an
anonymous list of nodes.
* exp_aggr.adb (Convert_Aggr_In_Allocator): Adjust to above change.
* exp_ch4.adb (Expand_N_Allocator): Likewise.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
2026-01-09 Piotr Trojanek <trojanek@adacore.com>
* inline.adb (Build_Body_To_Inline): Do not inline ghost functions.
2026-01-09 Ronan Desplanques <desplanques@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update
example.
* gnat-style.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
2026-01-09 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Give a specific error
message for an invalid prefix that is the dereference of a name.
* sem_ch8.adb (Find_Selected_Component): Give a consistent error
message for the name of an invalid prefix.
2026-01-08 Olivier Hainque <hainque@adacore.com>
Alexandre Oliva <oliva@adacore.com>
* gcc-interface/Make-lang.in (m32_target): Set.
(not_m32_target, native_target, native_gnattools1): Set.
(ADA_TOOLS_FLAGS_TO_PASS, gnattools): Handle x86_64 natives
defaulting to -m32 as cross for gnattools.
* gcc-interface/Makefile.in (target_cpu): Set to i686 for
x86_64 configurations defaulting to -m32.
2026-01-03 Eric Botcazou <ebotcazou@gcc.gnu.org>
PR ada/123371
* sem_aggr.adb (Resolve_Iterated_Association): Call Preanalyze
instead of Analyze consistently, as well as Copy_Separate_Tree
instead of New_Copy_Tree.
2026-01-01 Jakub Jelinek <jakub@redhat.com>
* gnat_ugn.texi: Bump @copying's copyright year.
* gnat_rm.texi: Likewise.
Copyright (C) 2026 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.