<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git/gcc/ada/sem_res.adb, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>ada: Fix memory leak for unconstrained limited arrays in anonymous contexts</title>
<updated>2025-11-21T08:29:37+00:00</updated>
<author>
<name>Eric Botcazou</name>
<email>ebotcazou@adacore.com</email>
</author>
<published>2025-11-11T09:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=0c8271742f32fcf08f0b5818aaad2daafff89b62'/>
<id>0c8271742f32fcf08f0b5818aaad2daafff89b62</id>
<content type='text'>
A change made a long time ago has introduced a leak of the secondary stack
at run time for unconstrained limited non-controlled arrays in anonymous
contexts, because of the lack of a transient scope in these contexts.

The large comment preceding the call to Establish_Transient_Scope in the
Resolve_Call procedure explains the strategy for build-in-place functions,
so the best course of action is probably to revert the commit and to fix
the original problem along the lines of the comment.

gcc/ada/ChangeLog:

	* exp_ch3.adb (Expand_N_Object_Declaration): Delete ancient comment.
	* exp_ch6.adb (Expand_Call_Helper): Do not establish a transient
	scope for build-in-place functions in anonymous contexts here...
	(Make_Build_In_Place_Call_In_Anonymous_Context): ...but here instead.
	* sem_attr.adb (Resolve_Attribute) &lt;Attribute_Range&gt;: Remove obsolete
	code dealing with transient scopes.
	* sem_res.adb (Resolve_Actuals): Likewise.
	(Resolve_Call): Adjust comment on the strategy for transient scopes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A change made a long time ago has introduced a leak of the secondary stack
at run time for unconstrained limited non-controlled arrays in anonymous
contexts, because of the lack of a transient scope in these contexts.

The large comment preceding the call to Establish_Transient_Scope in the
Resolve_Call procedure explains the strategy for build-in-place functions,
so the best course of action is probably to revert the commit and to fix
the original problem along the lines of the comment.

gcc/ada/ChangeLog:

	* exp_ch3.adb (Expand_N_Object_Declaration): Delete ancient comment.
	* exp_ch6.adb (Expand_Call_Helper): Do not establish a transient
	scope for build-in-place functions in anonymous contexts here...
	(Make_Build_In_Place_Call_In_Anonymous_Context): ...but here instead.
	* sem_attr.adb (Resolve_Attribute) &lt;Attribute_Range&gt;: Remove obsolete
	code dealing with transient scopes.
	* sem_res.adb (Resolve_Actuals): Likewise.
	(Resolve_Call): Adjust comment on the strategy for transient scopes.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Enforce checks on access to interface type conversions</title>
<updated>2025-11-18T15:05:10+00:00</updated>
<author>
<name>Javier Miranda</name>
<email>miranda@adacore.com</email>
</author>
<published>2025-10-02T06:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=fb97610cfdd26f08915fe083d3ab566c151ba320'/>
<id>fb97610cfdd26f08915fe083d3ab566c151ba320</id>
<content type='text'>
The patch enforces checks on access to interface type conversions
internally generated by the frontend to displace the pointer to
a tagged type object (pointer named "this" in the C++ terminology)
from a dispatch table to a another dispatch table.

gcc/ada/ChangeLog:

	* exp_util.ads (Flag_Interface_Pointer_Displacement): New subprogram.
	* exp_util.adb (Flag_Interface_Pointer_Displacement): Ditto.
	* exp_attr.adb (Add_Implicit_Interface_Type_Conversion): Flag type
	conversions internally added to displace the pointer to the object.
	(Expand_N_Attribute_Reference): Ditto.
	* exp_ch4.adb (Displace_Allocator_Pointer): Ditto.
	* exp_ch6.adb (Expand_Simple_Function_Return): Ditto.
	(Make_Build_In_Place_Call_In_Allocator): Ditto.
	(Make_CPP_Constructor_Call_In_Allocator): Ditto.
	* exp_disp.adb (Expand_Interface_Actuals): Ditto.
	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Ditto.
	* sem_ch6.adb (Analyze_Function_Return): Ditto.
	* sem_disp.adb (Propagate_Tag): Ditto.
	* sem_res.adb (Resolve_Actuals): Ditto.
	(Valid_Conversion): Rely on the new flag to handle the type conversion
	as a conversion added to displace the pointer to the object. Factorize
	code handling general and anonymous access types.
	* sem_type.adb (Interface_Present_In_Ancestor): For concurrent types
	add missing handling of class-wide types. Noticed working on this
	issue.
	* sinfo.ads (Is_Interface_Pointer_Displacement): Document this new flag.
	* gen_il-fields.ads (Is_Interface_Pointer_Displacement): New flag.
	* gen_il-gen-gen_nodes.adb (Is_Interface_Pointer_Displacement): New
	flag on N_Type_Conversion nodes.
	* gen_il-internals.adb (Image): Add Is_Interface_Pointer_Displacement
	flag image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The patch enforces checks on access to interface type conversions
internally generated by the frontend to displace the pointer to
a tagged type object (pointer named "this" in the C++ terminology)
from a dispatch table to a another dispatch table.

gcc/ada/ChangeLog:

	* exp_util.ads (Flag_Interface_Pointer_Displacement): New subprogram.
	* exp_util.adb (Flag_Interface_Pointer_Displacement): Ditto.
	* exp_attr.adb (Add_Implicit_Interface_Type_Conversion): Flag type
	conversions internally added to displace the pointer to the object.
	(Expand_N_Attribute_Reference): Ditto.
	* exp_ch4.adb (Displace_Allocator_Pointer): Ditto.
	* exp_ch6.adb (Expand_Simple_Function_Return): Ditto.
	(Make_Build_In_Place_Call_In_Allocator): Ditto.
	(Make_CPP_Constructor_Call_In_Allocator): Ditto.
	* exp_disp.adb (Expand_Interface_Actuals): Ditto.
	* exp_intr.adb (Expand_Dispatching_Constructor_Call): Ditto.
	* sem_ch6.adb (Analyze_Function_Return): Ditto.
	* sem_disp.adb (Propagate_Tag): Ditto.
	* sem_res.adb (Resolve_Actuals): Ditto.
	(Valid_Conversion): Rely on the new flag to handle the type conversion
	as a conversion added to displace the pointer to the object. Factorize
	code handling general and anonymous access types.
	* sem_type.adb (Interface_Present_In_Ancestor): For concurrent types
	add missing handling of class-wide types. Noticed working on this
	issue.
	* sinfo.ads (Is_Interface_Pointer_Displacement): Document this new flag.
	* gen_il-fields.ads (Is_Interface_Pointer_Displacement): New flag.
	* gen_il-gen-gen_nodes.adb (Is_Interface_Pointer_Displacement): New
	flag on N_Type_Conversion nodes.
	* gen_il-internals.adb (Image): Add Is_Interface_Pointer_Displacement
	flag image.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Type-resolution error on target name in assignment to indexed container</title>
<updated>2025-11-13T15:35:50+00:00</updated>
<author>
<name>Gary Dismukes</name>
<email>dismukes@adacore.com</email>
</author>
<published>2025-10-11T00:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=0c3be0634a8b08024dd8624e78347c092c105b12'/>
<id>0c3be0634a8b08024dd8624e78347c092c105b12</id>
<content type='text'>
The compiler fails to resolve expressions involving a target name (@ symbol)
in assignment statements where the target object is an indexed container
object, complaining that the target name is of the reference type associated
with the container type. The target object is initially viewed as having
the reference type, which is what the compiler was also setting as the
type of the N_Target_Name node in the assignment's expression tree (leading
to type errors), and it's only later expansion that changes the target object
to a dereference whose type is the reference type's designated type, which
is too late.

This is addressed by implementing AI22-0082 and AI22-0112. The first AI is
about changing the reference types declared in the predefined containers
generics to be limited types. The second AI revises the resolution rules for
assignment statements to exclude interpretations that are of limited types.
Combining the two AIs, the case described above will resolve to the dereference
of an indexed container component rather than the interpretation of the indexing
as returning an object of a reference type. The AI22-0112 changes also avoid
ambiguities for assignments involving indexed names (such as "C1(I) := C2(J);"),
at least for cases involving the predefined containers (user-defined containers
that declare nonlimited reference types can still run into such ambiguities).

But apart from those AIs, GNAT was already doing things wrong in
the case of overloaded variable names in assignment statements with
container indexing, in determining the type of target names (@ symbols)
as being of the reference type, which could result in wrong-type errors.
GNAT wasn't following the requirement that the variable name in an
assignment statement must be resolved as a "complete context". This is
now corrected by separate resolution code that's done in the case where
the expression of the assignment contains target names.

Also, the existing code in Analyze_Assignment that's used in the
non-target-name case is revised by removing incorrect code for ignoring
the reference interpretations of generalized indexing and replacing it
with code to remove interpretations of limited types (which, per AI22-0112,
needs to be done whether or not there are target names involved).

It should be noted that the changes to make reference types limited in the
predefined container packages can affect existing code that happens to depend
on the reference types being nonlimited, and code changes may be required to
remove or work around such dependence.

gcc/ada/ChangeLog:

	* libgnat/a-cbdlli.ads: Add "limited" to partial view of reference types.
	* libgnat/a-cbhama.ads: Likewise.
	* libgnat/a-cbhase.ads: Likewise.
	* libgnat/a-cbmutr.ads: Likewise.
	* libgnat/a-cborma.ads: Likewise.
	* libgnat/a-cborse.ads: Likewise.
	* libgnat/a-cdlili.ads: Likewise.
	* libgnat/a-cidlli.ads: Likewise.
	* libgnat/a-cihama.ads: Likewise.
	* libgnat/a-cihase.ads: Likewise.
	* libgnat/a-cimutr.ads: Likewise.
	* libgnat/a-ciorma.ads: Likewise.
	* libgnat/a-ciormu.ads: Likewise.
	* libgnat/a-ciorse.ads: Likewise.
	* libgnat/a-cobove.ads: Likewise.
	* libgnat/a-cohama.ads: Likewise.
	* libgnat/a-cohase.ads: Likewise.
	* libgnat/a-coinho.ads: Likewise.
	* libgnat/a-coinho__shared.ads: Likewise.
	* libgnat/a-coinve.ads: Likewise.
	* libgnat/a-comutr.ads: Likewise.
	* libgnat/a-convec.ads: Likewise.
	* libgnat/a-coorma.ads: Likewise.
	* libgnat/a-coormu.ads: Likewise.
	* libgnat/a-coorse.ads: Likewise.
	* sem_ch5.adb (Analyze_Assignment): Added code to resolve the target
	object (LHS) as a complete context when there are target names ("@")
	present in the expression of the assignment. Loop over interpretations,
	removing any that have a limited type, and set the type (T1) to be the
	type of the first nonlimited interpretation. Test for ambiguity by
	calling Is_Ambiguous_Operand. Delay analysis of Rhs in the target-name
	case. Replace existing test for generalized indexing with implicit
	dereference in existing analysis code with test of Is_Limited_Type
	along with calling Remove_Interp in the limited case.
	* sem_res.adb (Is_Ambiguous_Operand): Condition the calls to
	Report_Interpretation on Report_Errors being True.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The compiler fails to resolve expressions involving a target name (@ symbol)
in assignment statements where the target object is an indexed container
object, complaining that the target name is of the reference type associated
with the container type. The target object is initially viewed as having
the reference type, which is what the compiler was also setting as the
type of the N_Target_Name node in the assignment's expression tree (leading
to type errors), and it's only later expansion that changes the target object
to a dereference whose type is the reference type's designated type, which
is too late.

This is addressed by implementing AI22-0082 and AI22-0112. The first AI is
about changing the reference types declared in the predefined containers
generics to be limited types. The second AI revises the resolution rules for
assignment statements to exclude interpretations that are of limited types.
Combining the two AIs, the case described above will resolve to the dereference
of an indexed container component rather than the interpretation of the indexing
as returning an object of a reference type. The AI22-0112 changes also avoid
ambiguities for assignments involving indexed names (such as "C1(I) := C2(J);"),
at least for cases involving the predefined containers (user-defined containers
that declare nonlimited reference types can still run into such ambiguities).

But apart from those AIs, GNAT was already doing things wrong in
the case of overloaded variable names in assignment statements with
container indexing, in determining the type of target names (@ symbols)
as being of the reference type, which could result in wrong-type errors.
GNAT wasn't following the requirement that the variable name in an
assignment statement must be resolved as a "complete context". This is
now corrected by separate resolution code that's done in the case where
the expression of the assignment contains target names.

Also, the existing code in Analyze_Assignment that's used in the
non-target-name case is revised by removing incorrect code for ignoring
the reference interpretations of generalized indexing and replacing it
with code to remove interpretations of limited types (which, per AI22-0112,
needs to be done whether or not there are target names involved).

It should be noted that the changes to make reference types limited in the
predefined container packages can affect existing code that happens to depend
on the reference types being nonlimited, and code changes may be required to
remove or work around such dependence.

gcc/ada/ChangeLog:

	* libgnat/a-cbdlli.ads: Add "limited" to partial view of reference types.
	* libgnat/a-cbhama.ads: Likewise.
	* libgnat/a-cbhase.ads: Likewise.
	* libgnat/a-cbmutr.ads: Likewise.
	* libgnat/a-cborma.ads: Likewise.
	* libgnat/a-cborse.ads: Likewise.
	* libgnat/a-cdlili.ads: Likewise.
	* libgnat/a-cidlli.ads: Likewise.
	* libgnat/a-cihama.ads: Likewise.
	* libgnat/a-cihase.ads: Likewise.
	* libgnat/a-cimutr.ads: Likewise.
	* libgnat/a-ciorma.ads: Likewise.
	* libgnat/a-ciormu.ads: Likewise.
	* libgnat/a-ciorse.ads: Likewise.
	* libgnat/a-cobove.ads: Likewise.
	* libgnat/a-cohama.ads: Likewise.
	* libgnat/a-cohase.ads: Likewise.
	* libgnat/a-coinho.ads: Likewise.
	* libgnat/a-coinho__shared.ads: Likewise.
	* libgnat/a-coinve.ads: Likewise.
	* libgnat/a-comutr.ads: Likewise.
	* libgnat/a-convec.ads: Likewise.
	* libgnat/a-coorma.ads: Likewise.
	* libgnat/a-coormu.ads: Likewise.
	* libgnat/a-coorse.ads: Likewise.
	* sem_ch5.adb (Analyze_Assignment): Added code to resolve the target
	object (LHS) as a complete context when there are target names ("@")
	present in the expression of the assignment. Loop over interpretations,
	removing any that have a limited type, and set the type (T1) to be the
	type of the first nonlimited interpretation. Test for ambiguity by
	calling Is_Ambiguous_Operand. Delay analysis of Rhs in the target-name
	case. Replace existing test for generalized indexing with implicit
	dereference in existing analysis code with test of Is_Limited_Type
	along with calling Remove_Interp in the limited case.
	* sem_res.adb (Is_Ambiguous_Operand): Condition the calls to
	Report_Interpretation on Report_Errors being True.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Detect illegal value of static expression of decimal fixed point type</title>
<updated>2025-11-13T15:26:58+00:00</updated>
<author>
<name>Eric Botcazou</name>
<email>ebotcazou@adacore.com</email>
</author>
<published>2025-10-27T08:18:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=169699428d3c54ccdd56654e1f7b20ea49109d17'/>
<id>169699428d3c54ccdd56654e1f7b20ea49109d17</id>
<content type='text'>
The RM 4.9(36/2) subclause says that, if a static expression is of type
universal_real and its expected type is a decimal fixed point type, then
its value shall be a multiple of the small of the decimal type.  This was
enforced for real literals, but not for real named numbers.

Fixing the problem involves tweaking Fold_Ureal and the same tweak is also
applied to Fold_Uint for the sake of consistency in the implementation.

gcc/ada/ChangeLog:

	PR ada/29463
	* sem_eval.adb (Fold_Uint): Use Universal_Integer as actual type
	for a named number.
	(Fold_Ureal): Likewise with Universal_Real.
	* sem_res.adb (Resolve_Real_Literal): Test whether the literal is
	a static expression instead of coming from source to give the error
	prescribed by the RM 4.9(36/2) subclause.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RM 4.9(36/2) subclause says that, if a static expression is of type
universal_real and its expected type is a decimal fixed point type, then
its value shall be a multiple of the small of the decimal type.  This was
enforced for real literals, but not for real named numbers.

Fixing the problem involves tweaking Fold_Ureal and the same tweak is also
applied to Fold_Uint for the sake of consistency in the implementation.

gcc/ada/ChangeLog:

	PR ada/29463
	* sem_eval.adb (Fold_Uint): Use Universal_Integer as actual type
	for a named number.
	(Fold_Ureal): Likewise with Universal_Real.
	* sem_res.adb (Resolve_Real_Literal): Test whether the literal is
	a static expression instead of coming from source to give the error
	prescribed by the RM 4.9(36/2) subclause.
</pre>
</div>
</content>
</entry>
<entry>
<title>Ada: Fix qualified name of discriminant incorrectly accepted in constraint</title>
<updated>2025-11-05T20:20:46+00:00</updated>
<author>
<name>Eric Botcazou</name>
<email>ebotcazou@adacore.com</email>
</author>
<published>2025-11-05T20:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=35e029530f256bb6302a3cae650d7eaef5514a36'/>
<id>35e029530f256bb6302a3cae650d7eaef5514a36</id>
<content type='text'>
The RM 3.8(12/3) subclause says that a discriminant mentioned in a
constraint must appear alone as a direct name.  The last part is not
consistently checked and, while the first part is, it generates a
slightly different error message depending on the form of the input.

This fixes the last part and changes the first to use a single message.

gcc/ada/
	PR ada/35793
	* sem_res.adb (Check_Discriminant_Use): In a constraint context,
	check that the discriminant appears alone as a direct name in all
	cases and give a consistent error message when it does not.

gcc/testsuite/
	* gnat.dg/specs/discr8.ads: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RM 3.8(12/3) subclause says that a discriminant mentioned in a
constraint must appear alone as a direct name.  The last part is not
consistently checked and, while the first part is, it generates a
slightly different error message depending on the form of the input.

This fixes the last part and changes the first to use a single message.

gcc/ada/
	PR ada/35793
	* sem_res.adb (Check_Discriminant_Use): In a constraint context,
	check that the discriminant appears alone as a direct name in all
	cases and give a consistent error message when it does not.

gcc/testsuite/
	* gnat.dg/specs/discr8.ads: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Fix incorrect static string concatenation with null left string</title>
<updated>2025-11-03T14:15:15+00:00</updated>
<author>
<name>Eric Botcazou</name>
<email>ebotcazou@adacore.com</email>
</author>
<published>2025-10-07T20:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=2c7a70ef2ddc754b9972111ccb200521895681a5'/>
<id>2c7a70ef2ddc754b9972111ccb200521895681a5</id>
<content type='text'>
It comes from the implementation of an optimization for static concatenation
in Resolve_String_Literal, which causes the original subtype of the literal
to be lost.  Now this subtype must be preserved in the case where the left
operand of the concatenation may be null, per the 4.5.3(5) subclause.

gcc/ada/ChangeLog:

	PR ada/122160
	* sem_res.adb (Resolve_Op_Concat_Rest): Do not build the subtype of
	the second operand again if it has already been built.
	(Resolve_String_Literal): Do not defer the creation of the subtype
	for the right operand of a concatenation whose left operand may be
	the null string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It comes from the implementation of an optimization for static concatenation
in Resolve_String_Literal, which causes the original subtype of the literal
to be lost.  Now this subtype must be preserved in the case where the left
operand of the concatenation may be null, per the 4.5.3(5) subclause.

gcc/ada/ChangeLog:

	PR ada/122160
	* sem_res.adb (Resolve_Op_Concat_Rest): Do not build the subtype of
	the second operand again if it has already been built.
	(Resolve_String_Literal): Do not defer the creation of the subtype
	for the right operand of a concatenation whose left operand may be
	the null string.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Get rid of Sy/Sm mixing (Chars)</title>
<updated>2025-11-03T14:15:14+00:00</updated>
<author>
<name>Bob Duff</name>
<email>duff@adacore.com</email>
</author>
<published>2025-10-06T18:20:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=6ee8ebe0f1786a2c0be5d83d104ae9ccf6b9133f'/>
<id>6ee8ebe0f1786a2c0be5d83d104ae9ccf6b9133f</id>
<content type='text'>
We should not mix "syntactic" and "semantic" for the same field
in different node kinds.

The Chars field is both syntactic and semantic. This patch
makes it always syntactic, and does some other Chars-related
cleanups.

An attempt was made to instead rename the semantic field
to be Op_Chars, but that complicates things, because there
is a fair amount of code that fetches the Chars field
without knowing the node kind. Notably, Errout does this.

No change in overall compiler behavior.

gcc/ada/ChangeLog:

	* gen_il-gen-gen_nodes.adb (N_Op):
	Make Chars syntactic, and move it down into subclasses
	N_Binary_Op and N_Unary_Op.
	* gen_il-gen.adb (Create_Type):
	Do not exempt Chars from the ordering rule.
	(Exception_To_Inheritance_Rule): Exempt Chars from the
	inheritance rule.
	(Check_For_Syntactic_Field_Mismatch):
	Do not exempt Chars from the syntactic mismatch rule.
	This is the main point of this change.
	(Put_Make_Bodies): The Nmake functions for types in N_Op
	will now take a Chars parameter, which should always
	default to No_Name. This will be overwritten by the
	special-case Set_Chars call. Assert that it is in
	fact defaulted.
	* exp_ch4.adb (Expand_Array_Comparison):
	Use the Nkind instead of the Chars, which seems cleaner.
	Use a case instead of an elsif chain.
	* sem_attr.adb (Proper_Op): Minor cleanup.
	* sem_ch8.adb: Minor reformatting.
	* sem_res.adb (Operator_Kind): Tighten up the result subtype.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should not mix "syntactic" and "semantic" for the same field
in different node kinds.

The Chars field is both syntactic and semantic. This patch
makes it always syntactic, and does some other Chars-related
cleanups.

An attempt was made to instead rename the semantic field
to be Op_Chars, but that complicates things, because there
is a fair amount of code that fetches the Chars field
without knowing the node kind. Notably, Errout does this.

No change in overall compiler behavior.

gcc/ada/ChangeLog:

	* gen_il-gen-gen_nodes.adb (N_Op):
	Make Chars syntactic, and move it down into subclasses
	N_Binary_Op and N_Unary_Op.
	* gen_il-gen.adb (Create_Type):
	Do not exempt Chars from the ordering rule.
	(Exception_To_Inheritance_Rule): Exempt Chars from the
	inheritance rule.
	(Check_For_Syntactic_Field_Mismatch):
	Do not exempt Chars from the syntactic mismatch rule.
	This is the main point of this change.
	(Put_Make_Bodies): The Nmake functions for types in N_Op
	will now take a Chars parameter, which should always
	default to No_Name. This will be overwritten by the
	special-case Set_Chars call. Assert that it is in
	fact defaulted.
	* exp_ch4.adb (Expand_Array_Comparison):
	Use the Nkind instead of the Chars, which seems cleaner.
	Use a case instead of an elsif chain.
	* sem_attr.adb (Proper_Op): Minor cleanup.
	* sem_ch8.adb: Minor reformatting.
	* sem_res.adb (Operator_Kind): Tighten up the result subtype.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Update ghost code SPARK RM rules</title>
<updated>2025-09-15T12:59:30+00:00</updated>
<author>
<name>Viljar Indus</name>
<email>indus@adacore.com</email>
</author>
<published>2025-09-02T07:16:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=9c79e191c09d9906e795bd532da6c66e11cecc9d'/>
<id>9c79e191c09d9906e795bd532da6c66e11cecc9d</id>
<content type='text'>
gcc/ada/ChangeLog:

	* contracts.adb: Update SPARK RM reference numbers.
	* freeze.adb: Likewise.
	* ghost.adb: Likewise.
	* ghost.ads: Likewise.
	* sem_ch12.adb: Likewise.
	* sem_ch3.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_prag.adb: Likwise.
	* sem_res.adb: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/ada/ChangeLog:

	* contracts.adb: Update SPARK RM reference numbers.
	* freeze.adb: Likewise.
	* ghost.adb: Likewise.
	* ghost.ads: Likewise.
	* sem_ch12.adb: Likewise.
	* sem_ch3.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_prag.adb: Likwise.
	* sem_res.adb: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Update the uses of Is_Ignored*_In_Codegen</title>
<updated>2025-09-09T12:39:59+00:00</updated>
<author>
<name>Viljar Indus</name>
<email>indus@adacore.com</email>
</author>
<published>2025-08-06T11:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b7019e9895f0e9637e0d9fba72a7ce5b142a2096'/>
<id>b7019e9895f0e9637e0d9fba72a7ce5b142a2096</id>
<content type='text'>
Replace calls to Is_Ignored_Ghost_Entity and
Predicates_Ignored with their In_Codegen versions in places where
we would analyze those nodes differently from checked nodes.

Describe the motive and use cases for those In_Codegen functions.

gcc/ada/ChangeLog:

	* contracts.adb: Use the In_Codegen function instead.
	* exp_ch3.adb: Likewise.
	* exp_ch5.adb: Likewise.
	* exp_ch6.adb: Likewise.
	* exp_ch7.adb: Likewise.
	* exp_ch9.adb: Likewise.
	* exp_disp.adb: Likewise.
	* exp_util.adb: Likewise.
	* freeze.adb: Likewise.
	* ghost.adb: Likewise.
	* inline.adb: Likewise.
	* repinfo.adb: Likewise.
	* sem_ch10.adb: Likewise.
	* sem_ch13.adb: Likewise.
	* sem_ch3.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_elab.adb: Likewise.
	* sem_res.adb: Likewise.
	* sem_util.adb (Predicates_Ignored_In_Codegen): Add new function for
	the Predicates_Ignored property.
	(Predicates_Enabled): Use Predicates_Ignored_In_Codegen instead.
	* sem_util.ads (Predicates_Ignored_In_Codegen): New function.
	(Is_Ignored_In_Codegen): Add documentation on how _In_Codegen
	functions should be used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace calls to Is_Ignored_Ghost_Entity and
Predicates_Ignored with their In_Codegen versions in places where
we would analyze those nodes differently from checked nodes.

Describe the motive and use cases for those In_Codegen functions.

gcc/ada/ChangeLog:

	* contracts.adb: Use the In_Codegen function instead.
	* exp_ch3.adb: Likewise.
	* exp_ch5.adb: Likewise.
	* exp_ch6.adb: Likewise.
	* exp_ch7.adb: Likewise.
	* exp_ch9.adb: Likewise.
	* exp_disp.adb: Likewise.
	* exp_util.adb: Likewise.
	* freeze.adb: Likewise.
	* ghost.adb: Likewise.
	* inline.adb: Likewise.
	* repinfo.adb: Likewise.
	* sem_ch10.adb: Likewise.
	* sem_ch13.adb: Likewise.
	* sem_ch3.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_elab.adb: Likewise.
	* sem_res.adb: Likewise.
	* sem_util.adb (Predicates_Ignored_In_Codegen): Add new function for
	the Predicates_Ignored property.
	(Predicates_Enabled): Use Predicates_Ignored_In_Codegen instead.
	* sem_util.ads (Predicates_Ignored_In_Codegen): New function.
	(Is_Ignored_In_Codegen): Add documentation on how _In_Codegen
	functions should be used.
</pre>
</div>
</content>
</entry>
<entry>
<title>ada: Tune check for restriction No_Relative_Delay and call to Set_Handler</title>
<updated>2025-07-22T08:35:14+00:00</updated>
<author>
<name>Piotr Trojanek</name>
<email>trojanek@adacore.com</email>
</author>
<published>2025-07-03T08:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=7e533dbd8ce2b786c5c5d174b992197947fbd70d'/>
<id>7e533dbd8ce2b786c5c5d174b992197947fbd70d</id>
<content type='text'>
When checking restriction No_Relative_Delay and detecting calls to
Ada.Real_Time.Timing_Events.Set_Handler with a Time_Span parameter,
we looked at the exact type of the actual parameter, while we should
look at its base type.

This patch looks at the type of actual parameter like it is done in
Expand_N_Delay_Until_Statement.

gcc/ada/ChangeLog:

	* sem_res.adb (Resolve_Call): Look at the base type of actual parameter
	when checking call to Set_Handler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When checking restriction No_Relative_Delay and detecting calls to
Ada.Real_Time.Timing_Events.Set_Handler with a Time_Span parameter,
we looked at the exact type of the actual parameter, while we should
look at its base type.

This patch looks at the type of actual parameter like it is done in
Expand_N_Delay_Until_Statement.

gcc/ada/ChangeLog:

	* sem_res.adb (Resolve_Call): Look at the base type of actual parameter
	when checking call to Set_Handler.
</pre>
</div>
</content>
</entry>
</feed>
