When resetting the parent link after having restored the selected
component node, the assertion used was incorrectly triggered when the
traversal hits the members of the parameters association list, as in:
This.Some_Func (Param1, Param2).Dispatching_Call
When restoring the selected component f
From: Piotr Trojanek
Aspects Pre/Post attached to an access-to-subprogram type were relocated
to a spec of a wrapper subprogram and analyzed there; the body of the
wrapper was only created with expansion enabled. However, there were
several problems with this approach.
When switch -gnat2022 was
From: Yannick Moy
GNATprove has ad-hoc support for the standard numerical functions, which
consists in emitting an unprovable preconditions on cases which could
lead to an overflow. These functions are thus valid to call from SPARK
code.
gcc/ada/
* libgnat/a-ngelfu.ads: Restore SPARK_Mo
From: Piotr Trojanek
Calls to Install_Formals are typically enclosed by Push_Scope/End_Scope.
There were just two such calls that instead used Pop_Scope, but most
likely that was by mistake.
Cleanup related to handling of class-wide contracts. Behavior appears to
be unaffected.
gcc/ada/
From: Javier Miranda
The frontend reports spurious errors on operators found in
interpolated string literals.
gcc/ada/
* scans.ads (Inside_Interpolated_String_Expression): New variable.
* par-ch2.adb (P_Interpolated_String_Literal): Set/clear new
variable when parsing in
From: Johannes Kliemann
The QNX runtimes used the default implementation of
System.Parameters that defines a default stack size
of 2 MB. The QNX specific version uses the QNX default
stack size of 256 KB instead.
gcc/ada/
* Makefile.rtl (QNX): Use s-parame__qnx.adb for s-parame.adb.
From: Arnaud Charlet
By marking relevant functions inline when -gnatn is used.
gcc/ada/
* sem_ch7.adb: Refine handling of inlining for CCG
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_ch7.adb | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff
From: Piotr Trojanek
When retrieving entities of subprogram spec we only handled functions
and procedures, but not entries. This had no consequences, because we
then only applied checks to functions, but still is worth a cleanup, so
the code is easier to adapt for access-to-subprogram entities as
From: Piotr Trojanek
Fix grammar in error message; make it consistent with a similar message
for pre/postcondition on formal subprogram.
gcc/ada/
* sem_prag.adb (Analyze_Pre_Post_Condition): Tune error message.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_prag.
From: Eric Botcazou
The problem is that the renaming slightly changes the form of a global
reference that was saved during the analysis of a generic package, and
that is sufficient to fool the code adjusting global references during
the instantiation.
gcc/ada/
* sem_ch12.adb (Copy_Gener
From: Javier Miranda
The frontend may crash processing an aggregate initializing
a derived tagged record type that has discriminants.
gcc/ada/
* sem_aggr.adb
(Resolve_Record_Aggregate): For aggregates of derived tagged
record types with discriminants, when collecting com
From: Piotr Trojanek
Make the message consistent with the one for postcondition.
gcc/ada/
* sem_util.adb (Check_Result_And_Post_State): Tune message.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Initializing a vector using
Vec : V.Vector := [Some_Type'(Some_Abstract_Type with F => 0)];
may crash the compiler. The expander marks the N_Extension_Aggregate for
delayed expansion which never happens and incorrectly ends up in gigi.
The delayed expansion is needed for nested aggregates, whic
From: Piotr Trojanek
Cleanup related to handling of access-to-subprogram types with Pre and
Post aspects. Behavior is unaffected.
gcc/ada/
* sem_util.adb (Check_Result_And_Post_State): Replace low-level
navigation with a high-level Unique_Entity.
Tested on x86_64-pc-linux-gnu,
From: Eric Botcazou
It was partially broken to fix a regression in error reporting, because the
fix was applied to the first pass of resolution instead of the second pass,
as needs to be done for user-defined literals.
gcc/ada/
* sem_ch4.ads (Unresolved_Operator): New procedure.
From: Piotr Trojanek
Rules about parameters of modes OUT and IN OUT in aspect
Exceptional_Cases only apply to the parameters of the current
subprogram.
gcc/ada/
* sem_res.adb (Resolve_Entity_Name): Refine rules for Exceptional_Cases.
Tested on x86_64-pc-linux-gnu, committed on master.
From: Piotr Trojanek
When preanalysing class-wide conditions, we restore "Function (Object)"
to its original "Object.Function" notation. This requires the Parent
links to be fixed. We did it for nodes; now we do it for lists as well.
This patch is enough to fix assertion failure in CCG and to ma
From: Eric Botcazou
This happens when the call is a dependent expression of the conditional
expression, and the conditional expression is either the expression of a
simple return statement or the return expression of an expression function.
The reason is that the special processing of "tail call
From: Piotr Trojanek
Calls to First on No_List intentionally return Empty, so explicit guards
against No_List are unnecessary. Code cleanup; semantics is unaffected.
gcc/ada/
* sem_util.adb (Check_Function_Writable_Actuals): Remove guard against
a membership test with no alterna
From: Eric Botcazou
The result must be False as per the RM 4.5.2 (30.2/4) clause.
gcc/ada/
* exp_ch4.adb (Expand_N_In): Deal specifically with a null operand.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_ch4.adb | 8 +---
1 file changed, 5 insertions(+), 3
From: Steve Baird
If the Default_Component_Value aspect is specified for an array type, then
specifying Initialize_Scalars or Normalize_Scalars should have no effect
on the default initialization of an object of the array type.
gcc/ada/
* exp_ch3.adb
(Expand_N_Object_Declaration
From: Eric Botcazou
It comes from a superfluous adjustment for subarray components.
gcc/ada/
* exp_aggr.adb (Initialize_Array_Component): Fix condition detecting
the nested case that requires an adjustment.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_a
From: Eric Botcazou
The same guard must be added to Expand_Simple_Function_Return as the one
that was added to Analyze_Function_Return.
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Return): Deal with a rewriting
of the simple return during the adjustment of its expression.
Te
From: Piotr Trojanek
Calls to access-to-subprogram from its own pre/post aspects are rejected
as illegal, e.g.:
type F is access function (X : Natural) return Boolean with
Pre => F.all (X);
but they caused an assertion failure in detection of recursive calls.
Now they are properly reco
From: Piotr Trojanek
Attributes that do not read data from the object can be safely used in
consequences of Exceptional_Cases regardless of the parameter passing
mode.
gcc/ada/
* sem_res.adb (Resolve_Entity_Name): Relax rules for Exceptional_Cases.
Tested on x86_64-pc-linux-gnu, commit
From: Eric Botcazou
This happens when the pragmas are deferred to the back-end from an external
unit to the main unit that is generic, because the back-end does not compile
a main unit that is generic.
gcc/ada/
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Do not defer
From: Eric Botcazou
The problem is that a transient temporary created for the constant indexing
of the container is finalized almost immediately after its creation.
gcc/ada/
* exp_util.adb (Is_Finalizable_Transient.Is_Indexed_Container):
New predicate to detect a temporary creat
From: Piotr Trojanek
Aspects Pre/Post that annotate access-to-subprogram type were attached
to the source entity (whose kind is either E_Access_Subprogram_Type or
E_Access_Protected_Subprogram_Type). However, it is more convenient to
attach them to the internal entity (whose kind is E_Subprogram_
From: Eric Botcazou
The test is inspired from the example of user-defined literals given in the
Ada 2022 RM. Mixed Arabic numbers/Roman numbers computations are rejected
because the second resolution pass would try to resolve Arabic numbers only
as user-defined literals.
gcc/ada/
* sem
From: Eric Botcazou
It may lead to an infinite recursion if no interpretation exists.
gcc/ada/
* sem_res.adb (Try_User_Defined_Literal): Restrict previous change
to non-leaf nodes.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_res.adb | 10 ++
1
From: Eric Botcazou
We fail to establish a transient scope around the return statement because
the function returns a controlled type, but this is no longer problematic
because controlled types are no longer returned on the secondary stack.
gcc/ada/
* exp_ch7.adb (Establish_Transient_Sc
From: Eric Botcazou
This happens when the case expression contains a single alternative.
gcc/ada/
* exp_ch5.adb (Expand_N_Case_Statement): Do not remove the statement
if it is the node to be wrapped by a transient scope.
Tested on x86_64-pc-linux-gnu, committed on master.
---
From: Eric Botcazou
This implements the recursive resolution of conditional expressions whose
dependent expressions are (all) user-defined literals the same way it is
implemented for operators.
gcc/ada/
* sem_res.adb (Has_Applicable_User_Defined_Literal): Make it clear
that the
From: Piotr Trojanek
Avoid repeated calls to Get_TSS_Name. Code cleanup related to handling
of dispatching operations in GNATprove; semantics is unaffected.
gcc/ada/
* exp_aggr.adb (Convert_Aggr_In_Allocator): Replace Get_TSS_Name
with a high-level Is_TSS.
* sem_ch6.adb
From: Eric Botcazou
It occurs during the instantiation because the compiler forgets the context
of the generic declaration.
gcc/ada/
* freeze.adb (Wrap_Imported_Subprogram): Use Copy_Subprogram_Spec in
both cases to copy the spec of the subprogram.
Tested on x86_64-pc-linux-gnu
From: Eric Botcazou
In the primary stack case, Insert_Actions is invoked when the expression is
being rewritten, whereas Insert_List_Before_And_Analyze is invoked in the
secondary stack case. The former is idiomatic, the latter is not.
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Ret
From: Piotr Trojanek
Whitespace cleanup.
gcc/ada/
* doc/gnat_ugn/gnat_and_program_execution.rst
(Some Useful Memory Pools): Remove extra whitespace from examples.
* sem_aggr.adb (Make_String_Into_Aggregate): Remove extra whitespace.
* gnat_ugn.texi: Regenerate.
T
From: Cedric Landet
In s-oscons-tmplt.c, sigset is defined inside the HAVE_SOCKETS bloc.
A platform could require sigset without supporting sockets.
gcc/ada/
* s-oscons-tmplt.c: move the definition of sigset out of the
HAVE_SOCKETS bloc.
Tested on x86_64-pc-linux-gnu, committed
From: Cedric Landet
g-spogwa.adb is the body of the procedure GNAT.Sockets.Poll.G_Wait.
This is a socket specific procedure. It should only be built for
systems that support sockets.
gcc/ada/
* Makefile.rtl: Move g-spogwa$(objext) from GNATRTL_NONTASKING_OBJS
to GNATRTL_SOCKETS_
From: Patrick Bernardi
The runtime used label addresses to determine the code address of
subprograms because the subprogram's canonical address on some targets
is a descriptor or a stub. Simplify the code by using the Code_Address
attribute instead, which is designed to return the code address of
Jan-Benedict Glaw writes:
> (A full build log is at
> http://toolchain.lug-owl.de/laminar/jobs/gcc-aarch64-linux/74)
>
> Is this an issue with the patch? Or does it need a newer Ada compiler
> to for building it?
Hello Jan,
IIUC, your base compiler is "g++ (Debian 20230315-1) 13.0.1 20230315"
From: Cedric Landet
The coding style rules require to avoid using FIXME comments. ??? is
preferred.
gcc/ada/
* init.c: Replace FIXME by ???
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/g
From: Eric Botcazou
The compiler fails to capture global references during the analysis of the
aspect on the generic type because it analyzes a copy of the expression.
gcc/ada/
* exp_util.adb (Build_DIC_Procedure_Body.Add_Own_DIC): When inside
a generic unit, preanalyze the expr
From: Eric Botcazou
gcc/ada/
* libgnat/a-cidlli.adb (Put_Image): Simplify.
* libgnat/a-coinve.adb (Put_Image): Likewise.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/libgnat/a-cidlli.adb | 13 +
gcc/ada/libgnat/a-coinve.adb | 13 +
2
From: Piotr Trojanek
For access-to-subprogram types with Pre/Post aspects we create a wrapper
routine that evaluates these aspects. Spec of this wrapper was created
always, while its body was only created when expansion was enabled.
Now we only create these wrappers when expansion is enabled. In
From: Johannes Kliemann
The Default_Stack_Size function does not check that the binder specified
default stack size is greater than the minimum stack size for the runtime.
This can result in tasks using default stack sizes less than the minimum
stack size because the Adjust_Storage_Size only adju
From: Eric Botcazou
This happens when the expression of the return statement is a call that does
not return on the same stack as the enclosing function.
gcc/ada/
* sem_res.adb (Resolve_Call): Restrict previous change to calls that
return on the same stack as the enclosing functi
From: Eric Botcazou
gcc/ada/
* gcc-interface/decl.cc (range_cannot_be_superflat): Return true
immediately if Cannot_Be_Superflat is set.
* gcc-interface/misc.cc (gnat_post_options): Do not override the
-Wstringop-overflow setting.
Tested on x86_64-pc-linux-gnu, c
From: Eric Botcazou
The original fix makes it possible to create transient scopes around return
statements in more cases, but it overlooks that transient scopes are reused
and, in particular, that they can be promoted to secondary stack management.
gcc/ada/
* exp_ch7.adb (Find_Enclosing
From: Ronan Desplanques
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix minor
issues.
* doc/gnat_ugn/the_gnat_compilation_model.rst: Fix minor issues.
* gnat_ugn.texi: Regenerate.
Tested on x86_64-pc-linux-gnu, committed on master.
---
...build
Don't require storage access for explicit dereferences used as
lvalue (e.g. Some_Access.all'Address) or for renamings.
gcc/ada/
* gcc-interface/trans.cc (get_storage_model_access): Don't require
storage model access for dereference used as lvalue or renamings.
Tested on x86_64-pc
From: Eric Botcazou
The previous fix to get_storage_model_access was incomplete and needs to be
extended to the node itself.
gcc/ada/
* gcc-interface/trans.cc (get_storage_model_access): Also strip any
type conversion in the node when unwinding the components.
Tested on x86_64-
From: Eric Botcazou
This happens when the peculiar check emitted by Check_Large_Modular_Array
is applied to an object whose actual subtype is an itype with dynamic size,
because the first reference to the itype in the expanded code may turn out
to be within the raise statement, which is problemat
From: Joel Brobecker
This commit changes the runtime on aarch64-linux to use the Linux
version of s-tsmona.adb, so as to add support for this functionality
on aarch64-linux.
gcc/ada/
* Makefile.rtl: Use libgnat/s-tsmona__linux.adb on
aarch64-linux. Link libgnat with -ldl, as th
From: Eric Botcazou
No functional changes.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) : Replace
integer_zero_node with null_pointer_node for pointer types.
* gcc-interface/trans.cc (gnat_gimplify_expr) : Likewise.
* gcc-interface/utils.cc (maybe_pad_ty
From: Eric Botcazou
This extends an earlier fix done for the others choice of an array aggregate
to all the choices of the aggregate, since the same sharing issue may happen
when the choices are not contiguous.
gcc/ada/
* exp_aggr.adb (Build_Array_Aggr_Code.Get_Assoc_Expr): Duplicate th
From: Eric Botcazou
This streamlines the handling of qualified expressions in the expansion of
aggregates and plugs a couple of loopholes that may cause memory leaks.
gcc/ada/
* exp_aggr.adb (Build_Array_Aggr_Code): Move the declaration of Typ
to the beginning.
(Initiali
From: Eric Botcazou
It comes from a small oversight in get_storage_model_access.
gcc/ada/
* gcc-interface/trans.cc (node_is_component): Remove parentheses.
(node_is_type_conversion): New predicate.
(get_atomic_access): Use it.
(get_storage_model_access): Likewise
From: Eric Botcazou
As the additional temporaries required by the semantics of nonnative storage
models are now created by the front-end, in particular for actual parameters
and assignment statements, the corresponding code in gigi can be removed.
gcc/ada/
* gcc-interface/trans.cc (Call
From: Eric Botcazou
This also removes some obsolete stuff.
gcc/ada/
* gcc-interface/Make-lang.in (ADA_CFLAGS): Move up.
(ALL_ADAFLAGS): Add $(NO_PIE_CFLAGS).
(ada/mdll.o): Remove.
(ada/mdll-fil.o): Likewise.
(ada/mdll-utl.o): Likewise.
Tested on x86_64-p
From: Eric Botcazou
The code generator must now be prepared to translate assignment statements
to objects allocated with a storage model and that are not initialized yet.
gcc/ada/
* gcc-interface/trans.cc (Attribute_to_gnu) : Tweak.
(gnat_to_gnu) : Declare a local variable.
From: Eric Botcazou
gcc/ada/
* gcc-interface/misc.cc (internal_error_function): Be prepared for
an input_location set to UNKNOWN_LOCATION.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gcc-interface/misc.cc | 22 --
1 file changed, 16 inse
From: Eric Botcazou
gcc/ada/
* gcc-interface/trans.cc (gnat_to_gnu) : Test the
precision of the operation rather than that of the result type.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/gcc-interface/trans.cc | 8
1 file changed, 4 insertions(+),
When using 'Address on an object with a size clause, gigi would end up
creating a copy and using its address instead of the one of the original
object, leading to incorrect behavior. Remove the conversion (that
triggers the copy) when 'Address is applied to a declaration.
gcc/ada/
* gcc-i
From: Eric Botcazou
This works around the limitations present for the support of arrays in the
middle-end by clearing the TREE_OVERFLOW flag for arrays with zero length.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) : Use a
local variable for the GNAT index type.
From: Eric Botcazou
gcc/ada/
* gcc-interface/trans.cc (Attribute_to_gnu) : Check that
the storage model has Copy_From before instantiating loads for it.
: Likewise.
: Likewise.
(gnat_to_gnu) : Likewise.
: Likewise.
Tested on x86_64-pc-linux-gnu, c
From: Piotr Trojanek
We create wrapper functions associated with inherited functions with
controlling results which are not overridden during freezing. We partly
decorated them explicitly, even though they would be fully decorated
later anyway.
This early decoration didn't work as expected, beca
From: Piotr Trojanek
Code cleanup; semantics is unaffected.
gcc/ada/
* exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Use a single call
to New_List.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_disp.adb | 6 +++---
1 file changed, 3 insertions(+), 3
From: Eric Botcazou
The expansion is incorrect in the case where the initialization expression
of a component is a conditional expression that has a function call as one
of its dependent expressions, leading to a wrong order of initialization,
adjustment and finalization.
gcc/ada/
* exp
From: Eric Botcazou
They are performed in a few different places during expansion.
gcc/ada/
* exp_util.ads (Make_Tag_Assignment_From_Type): Declare.
* exp_util.adb (Make_Tag_Assignment_From_Type): New function.
* exp_aggr.adb (Build_Record_Aggr_Code): Call the above func
From: Piotr Trojanek
Cleanup; semantics is unaffected.
gcc/ada/
* sem_util.adb (Check_Function_Writable_Actuals): Tune style; use
subtype name to detect membership test nodes.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 10 ++
1 file
From: Eric Botcazou
The final processing at the component level of array aggregates and record
aggregates is very similar, so this factors out the common processing into
three new library-level subprograms.
There should be no functional changes, but the expanded code may be changed
in the case o
From: Daniel King
Allows System.Storage_Elements to be used in units that
have the No_Elaboration_Code_All restriction.
gcc/ada/
* libgnat/s-stoele.ads: Add No_Elaboration_Code_All pragma.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/libgnat/s-stoele.ads | 3 +++
1
From: Piotr Trojanek
Code cleanup related to handling exceptions in GNATprove; semantics is
unaffected.
gcc/ada/
* exp_ch11.ads (Find_Local_Handler): Fix typo in comment.
* exp_ch11.adb (Find_Local_Handler): Remove redundant check for the
Exception_Handler list being pre
From: Eric Botcazou
This avoids repeatedly calling Unqualify on the same node, removes a dead
call to Generate_Finalization_Actions, a redundant setting of Assignment_OK
and reuses a local variable more consistently. No functional changes.
gcc/ada/
* exp_aggr.adb (Build_Record_Aggr_Cod
From: Eric Botcazou
This happens when the ancestor part is itself an aggregate: in this case,
the tag of the extension aggregate is wrongly set to that of the ancestor.
gcc/ada/
* exp_aggr.adb (Build_Record_Aggr_Code): In the case of an extension
aggregate of a limited type whos
From: Piotr Trojanek
Code cleanup related to handling exceptions in GNATprove; semantics is
unaffected.
gcc/ada/
* exp_ch11.adb (Find_Local_Handler): Replace guard against other
constructs appearing in the list of exception handlers with iteration
using First_Non_Pragma/
From: Eric Botcazou
This code was dealing with build-in-place calls for nonlimited types, but
they no longer exist since Is_Build_In_Place_Result_Type => Is_Limited_View.
gcc/ada/
* sem_ch5.adb (Analyze_Assignment): Turn Rhs into a constant and
remove calls to the following subp
From: Eric Botcazou
The problem, which is also present for an expression function, is that the
function is invoked in the initializing expression of a variable declared
in the same declarative part as the function, which causes the freezing of
its artificial body before the post-condition is anal
From: Piotr Trojanek
Code cleanup related to handling exceptions in GNATprove.
gcc/ada/
* exp_ch11.adb (Expand_N_Raise_Statement): Expansion of raise statements
never happens in GNATprove mode.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_ch11.adb | 8 +
From: Piotr Trojanek
Remove routine that is no referenced after deconstructing of restriction
SPARK_05.
gcc/ada/
* sem_util.ads (Is_Inherited_Operation_For_Type): Remove spec.
* sem_util.adb (Is_Inherited_Operation_For_Type): Remove body.
Tested on x86_64-pc-linux-gnu, committe
From: Eric Botcazou
This lets the compiler give a proper error message instead.
gcc/ada/
* contracts.adb (Contract_Error): New exception.
(Add_Contract_Item): Raise Contract_Error instead of Program_Error.
(Add_Generic_Contract_Pragma): Deal with Contract_Error.
Tested
From: Bob Duff
If a quantified expression says "for all ... of F(...)"
where F(...) is a function call that returns on the secondary
stack, we need to clean up the secondary stack. This patch
adds the required ss_mark/ss_release in that case.
gcc/ada/
* exp_ch4.adb
(Expand_N_Qua
From: Yannick Moy
In preparation for attribute Initialized to become ghost, use aspect
Ghost_Predicate instead of Predicate in unit Ada.Strings.Superbounded
of the standard library.
gcc/ada/
* libgnat/a-strsup.ads: Change predicate aspect.
* sem_ch13.adb (Add_Predicate): Fix for
From: Eric Botcazou
This changes the strategy used to expand controlled actions for array and
record aggregates so as to make it simpler and more robust.
The current strategy is to set the No_Ctrl_Actions flag on the assignments
generated during the expansion of aggregate, as done during the exp
From: Piotr Trojanek
Elaboration checks skip abstract subprogram declarations, which have no
body that could be examined. Now these checks also skip abstract
subprograms of a derived type, which have no body either.
gcc/ada/
* sem_elab.adb (Check_Overriding_Primitive): Prevent Correspon
From: Yannick Moy
Implement the SPARK RM change that defines attribute Initialized
as being ghost, i.e. only allowed where a ghost entity would be allowed.
gcc/ada/
* ghost.adb (Check_Ghost_Context): Allow absence of Ghost_Id
for attribute. Update error message to mention Ghost_
From: Piotr Trojanek
This patch allows subprograms to be annotated with aspect
Always_Terminates that requires a boolean expression. When this
expression evaluates to True, the subprogram is required to terminate or
raise an exception, but not loop infinitely.
This aspect is only meant to be use
From: Eric Botcazou
The spurious error is given on a call to a parameterless function returning
a private type, present in the body of a generic construct both declared and
instantiated in the presence of the full view of the type, because this full
view is not properly restored for the instantia
From: Piotr Trojanek
Instead of explicitly disabling inlining in quantified expressions,
(which happen to be only preanalysed) and then disabling inlining in
potentially unevaluated contexts that are fully analysed (which happen
to include quantified expressions), we now simply disable inlining i
The call to Resolve_Aggr_Expr may leave references to temporary entities
used to check for the construct legality and meant to be removed.
Using Preanalyze_And_Resolve correctly guarantees that there is no
visible occurrence of such entities.
gcc/ada/
* sem_aggr.adb (Resolve_Iterated_Com
From: Piotr Trojanek
Routine Is_Potentially_Unevaluated was written for Ada 2012, but now we
use it for Ada 2022 as well, so it must recognize iterated component
associations (which were added by Ada 2022) as an array component
association.
gcc/ada/
* sem_util.adb (Is_Potentially_Uneval
From: Piotr Trojanek
As iterated_component_association is an array_component_association
(because of a grammar rule Ada 2022 RM 4.3.3(5/5)), its expression is
repeatedly evaluated (because of Ada 2022 RM 6.1.1(22.14/5)).
With this patch we will now get errors for both conjuncts in this code,
whi
From: Eric Botcazou
It occurs for the case of a function call first parsed as an identifier.
gcc/ada/
* sem_ch12.adb (Save_References_In_Identifier): In the case where
the identifier has been turned into a function call by analysis,
call Set_Global_Type on the entity if
From: Piotr Trojanek
This patch is an alternative solution for a recent fix in analysis of
iterated component association.
To recap, if the iterated expression is an aggregate, we want to
propagate the component type downward with a call to Resolve_Aggr_Expr;
otherwise we want this expression to
From: Piotr Trojanek
Cleanups related to analysis of iterated component association for
GNATprove.
gcc/ada/
* sem_aggr.adb
(Resolve_Array_Aggregate): Simplify comment.
(Resolve_Iterated_Component_Association): Tune comment; change variable
to constant.
Tested on
From: Eric Botcazou
gcc/ada/
* exp_util.ads (Build_Transient_Object_Statements): Remove obsolete
references to array and record aggregates in documentation.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_util.ads | 6 +++---
1 file changed, 3 insertions(+)
From: Javier Miranda
The compiler crashes compiling a function that has pragma
CPP_constructor when its return type is a private type.
gcc/ada/
* sem_util.adb
(Is_CPP_Constructor_Call): Add missing support for calls to
functions returning a private type.
Tested on x86_6
From: Eric Botcazou
The comment is correct but the code implements the opposite outcome.
gcc/ada/
* sem_type.adb (Disambiguate): Fix pasto in the implementation of
the RM 8.4(10) clause for operators.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_type.ad
From: Eric Botcazou
The compiler is waiting for the freeze node of the body, but it is never
generated since the freezing of the body is not delayed. The change also
removes an obsolete piece of code.
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specifications): Add missing items
in
1 - 100 of 823 matches
Mail list logo