This patch fixes the regressions introduced in CodePeer (caused by
missing support for thunks) and enforces checks on BIP formals in the
frontend to avoid mismatch when their values are passed as actuals of
BIP calls.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Javier Miranda
This patch removes part of the patch added to process the run-time
package system.ads; it is not needed because we now rely on
Targparm.Restrictions_On_Target.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Javier Miranda
gcc/ada/
* sem_prag.adb (Process_Restrictions_Or
Implement Ada 202x's Integer_Literal, Real_Literal, and String_Literal
aspects. This is just a preliminary implementation; interactions with
controlled types, build-in-place functions, abstract types, interface
types, aspects specifying an operator (e.g, "+"), mandatory aspect
overriding, and many
Fix wrong casing in phrases like "something, The"; also, fix other small
typos in comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Piotr Trojanek
gcc/ada/
* checks.adb, doc/gnat_ugn/the_gnat_compilation_model.rst,
einfo.ads, exp_ch5.adb, exp_ch7.adb, lib
This changes the front-end to expand the 'Pos and 'Val attributes for
enumeration types with standard representation. It turns out that this
was the only remaining case where it does not expand them, as it does
so for enumeration types with non-standard representation as well as
for integer types.
As explained in the head comment of Compatible_Types_In_Predicate,
anomalies involving private and full views can occur when a call
to a predicate or invariant function is generated by the compiler.
The function uses the child function Common_Type to reconcile the
various views of a private type,
This patch implements AI12-0236-1, declare expressions. They are
implemented in terms of N_Expression_With_Actions, which has the same
semantics. A superset of the semantics, actually.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Bob Duff
gcc/ada/
* par-ch4.adb (P_Cas
The language used in the bugbox for a customer to report an error
message is missing an upper-case for the start of a sentence and also
could be worded a bit clearer.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Richard Kenner
gcc/ada/
* comperr.adb (Compiler_Abort):
Reuse a high-level Is_Object, which is meant to be more readable than a
low-level membership test with Ekind. Semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Piotr Trojanek
gcc/ada/
* einfo.adb, exp_spark.adb, exp_util.adb, sem_eval.adb: Replace
We don't always have Convention_Protected, so test for presence of
Protected_Body_Subprogram.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-16 Richard Kenner
gcc/ada/
* exp_unst.adb (Subp_Index): Change way we detect internal
protected subprograms.--- gcc/ada/exp_
The function Build_Conversion in Exp_Fixd does a bit of folding but
fails to preserve the Conversion_OK flag in doing so, unlike other
flags.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Eric Botcazou
gcc/ada/
* exp_fixd.adb (Build_Conversion): Also preserve the
The purpose of this change is to enhance Optimize_Length_Comparison
so that it optimizes the two length computations generated for the
length check required for an assignment of array slices. It also
ensures that the computations generated as part of the optimization
are done without overflow chec
The previous change made to fold 'First and 'Last for constrained array
types can go awry in the presence of layers of package instantiations
because the referenced entities need to have a stable name if they are
public and providing such a guarantee is not trivial in some cases.
Therefore this ch
AI12-0075 adds a new aspect Static that can be applied to expression
functions to specify that the functions are static. When a static
expression function is called with actual parameters that are static
expressions, the function call is itself treated as a static expression
and can be used in cont
The comment for Get_Iterable_Type_Primitive didn't mention that it can
be used for primitives Last and Previous. This happens when this routine
is called from Build_Formal_Container_Iteration when analyzing a reverse
iteration.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Piotr T
In GNATprove mode expansion is disabled; in terms of code, we have an
invariant that GNATprove_Mode implies Expander_Active to be False.
This renders conditions like "GNATprove_Mode or not Expander_Active"
redundant, as they are equivalent to just "not Expander_Active". This
patch removes this red
The preferred casing is "GNATprove", i.e. "GNAT" in upper-case and
"prove" in lower-case.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Piotr Trojanek
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst, lib-writ.ads,
par-prag.adb, sem_ch12.adb, sem_ch8.a
The previous change has introduced a type consistency issue when the
length comparison boils down to a comparison of the upper bounds.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Eric Botcazou
gcc/ada/
* exp_ch4.adb (Optimize_Length_Comparison): Make sure the base
In the general case, the procedure Optimize_Length_Comparison goes to
great lengths to make sure that it does not deal with superflat arrays
because, in this case, the canonical formula of the length is not valid.
The only such case that it accepts is a comparison against literal zero.
This change
Expansion of "for X of Y loop" where Y is an array was differed in GNAT
(where it was correct) and GNATprove (where it was wrong).
Typically expansion is controlled by the Expander_Active variable. In
GNATprove mode this variable is always False, so we need to explicitly
enable expansion where req
This patch implements AI12-0110-1, which requires tampering checks in
the containers library to be performed first, before any other checks.
In some cases, this patch causes cases where a check for no-op happens
to be moved later, after checks. This is correcting bugs (the checks
should happen eve
Routine Preserve_Comes_From_Source directly manipulated node tables
without checking whether their arguments are valid and whether the node
table is locked. Now it applies those checks. Also, this routine is now
reused where possible. Semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committ
The first tweak is to change Get_Integer_Type, which is the routine
used by Expand_N_Attribute_Reference to pick a small integer type
for various attributes applied on enumeration types, to use the
"standard" standard integer types instead of the standard integer
types with a specific size. That's
Aspect Relaxed_Initialization can now be attached to private types and
deferred constants, but only to their private views. This is similar to
the spirit of SPARK RM 6.9(9) for ghost aspect, which says:
"[This rule is to ensure that the ghostliness of a visible entity can be
determined without
This patch completes the implementation of AI12-0220, which adds
contracts to Access_To_Subprogram types. Attributes 'Old and 'Result are
properly supported, and the needed subprogram wrapper is built before
the contract aspects on the access type are analyzed, to simplify
semantic checks.
Tested
The new condition added for scalar types in the previous change for
the sake of consistency with array types is apparently problematic
for LLVM so this change removes it.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Eric Botcazou
gcc/ada/
* exp_attr.adb (Expand_N_Attr
GNAT was ignoring the 'private' keyword for parent packages implicitly
withed from a subprogram unit, via a child unit.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Arnaud Charlet
gcc/ada/
* sem_ch10.adb (Expand_With_Clause): Add missing handling of
N_Generic_
The procedure Apply_Universal_Integer_Attribute_Checks is called from
the expander when an attribute nominally returning Universal_Integer
is seen so that, if resolution has determined another type for the
result, then Universal_Integer is nevertheless forced on the attribute
and a conversion is ad
This mainly fixes a couple of inconsistencies in the way entities of
the Standard package are built: first, some of them are built with a
bare call to New_Standard_Entity and the name is only set afterwards,
whereas others are built with a call to New_Standard_Entity with the
name passed as argumen
In -gnatg mode, gnat complains "bad indentation" if a statement or
declaration does not start in a column divisible by 3. This patch fixes
a bug in which it complained similarly about a declare_expression, which
is not a statement or declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
This prevents the compiler from generating a length check that can
never fail for the initialization of an array whose nominal subtype
is unconstrained and which is subject to an address clause.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Eric Botcazou
gcc/ada/
* che
AI12-0160 clarifies the rules for nonoverridable aspects for indexing:
when a derived type inherits a single indexing aspect (constant or
variable) from a parent type, it cannot specify the other
(non-inherited) indexing aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Ed Sch
For GNAT-LLVM, subprograms nested within protected subprograms become
part of the new unprotected body created by
Build_Unprotected_Subprogram_Body, but the entity of the unprotected
subprogram was not getting marked as Has_Nested_Subprogram, and the
declarations now nested within the new body didn
This patch implements AI12-0279-1, which adds a Yield aspect applicable
to a noninstance subprogram (including a generic formal subprogram), a
generic subprogram, or an entry, to ensure that the associated
subprogram encounters at least one task dispatching point during each
invocation.
Tested on
The Expand_N_Op_Expon procedure of the expander starts by relocating its
operands, but later reuses the original right operand in the code
generated in the modular case and, in particular, passes it to
Duplicate_Subexpr, which is fooled into thinking that operands are not
syntactical and thus does
This patch fixes regressions introduced in CodePeer on dispatching
calls, fixes a latent problem in the decoration of the Extra_Formals
attribute, and enforces checks on extra formals.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-17 Javier Miranda
gcc/ada/
* exp_ch6.adb
This just changes Optimize_Length_Comparison to accept 32-bit values in
the full unsigned range, so that the length of all arrays with a 32-bit
or smaller index can be optimized.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Eric Botcazou
gcc/ada/
* exp_ch4.adb (Optimi
The Get_Integer_Type function is used by the expander when generating
code for the Enum_Rep and Pos attributes applied to an enumeration type.
The expansion generates a direct conversion from the enumeration type
to the result type, which is nominally Universal_Integer; therefore,
in order to prese
An assignment with a slice indexed by a subtype_indication, e.g.:
Y : T := X (Positive range Low .. High);
is expanded into:
[subtype S is Positive range Low .. High;]
Y : S := X (Positive range Low .. High);
The bounds of the target subtype S were queried with Scalar_Range, which
migh
The definition of constants can be nested inside declare expressions in
which case they cannot be considered as valid contexts for calls to
volatile functions and access to volatile variable.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Claire Dross
gcc/ada/
* sem_uti
This patch implements storage streams, as specified by three Ada Issues:
AI12-0293-1, AI12-0329-1, and AI12-0361-1.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Bob Duff
gcc/ada/
* libgnat/a-strsto.ads, libgnat/a-ststbo.adb,
libgnat/a-ststbo.ads, libgnat/a-sts
Aspect Relaxed_Initialization and attribute Initialized are now listed
as implementation-defined with a reference to the SPARK RM, where their
full description will appear shortly.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Piotr Trojanek
gcc/ada/
* doc/gnat_rm/impl
Not treating 'pragma Compile_Time_Warning' warnings as errors even with
the -gnatwe switch makes sense because if users desire errors, they
can use the Compile_Time_Error pragma.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Ghjuvan Lacambre
gcc/ada/
* erroutc.ads: Dec
The frontend does not report an error on the illegal use of a non
class-wide subprogram with class-wide aspects Input and Output;
similarly it also skips reporting the error when a class-wide subprogram
is used with the non class-wide aspects. As a consequence of not
reporting these errors at comp
This adds a second warning related to the new C_Variadic_n convention,
for the cases where the aspect/pragma is applied to a subprogram with
exactly n parameters since, in this case, the aspect/pragma is useless.
The warning is given as such:
btest.ads:16:05: warning: subprogram should have at le
The main goal of this change is to improve the evaluation at compile
time of the ranges of values that an expression can have at run time
and to apply it in as many cases as possible during the compilation.
It turns out that the front-end contains two separate engines that
can evaluate value range
This ACATS test shows that:
- GNAT does not allow a named access type in the universal access
"=" operator.
- GNAT does not enforce the static matching requirement for designated
elementary and array types.
- GNAT does not allow designated types where one covers the other.
- GNAT does not enfo
The check applied to the expression of the To_Address attribute in
the case where it is static is done with the address size of the
host instead of the target, resulting in missing error messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Eric Botcazou
gcc/ada/
* s
This makes a couple of changes in the code dealing with a call to a
derived subprogram: first, it removes useless calls to Relocate_Node
before calls to OK_Convert_To and Unchecked_Convert_To (these functions
already call Relocate_Node on their second operand) and merge calls to
Analyze and Resolve
GNAT does not count warnings originating from a Compile_Time_Warning
pragma as an error anymore, even if the -gnatwe flag is provided. This
requires updating the output of its error summary.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Ghjuvan Lacambre
gcc/ada/
* erro
Currently we provide a separate implementation of Stream_Attributes via
s-stratt__xdr.adb which needs to be recompiled manually.
This change introduces instead a new binder switch to choose at bind
time which stream implementation to use and replaces s-stratt__xdr.adb
by a new unit System.Stream_A
The goal of this enhancement is to make it possible for the expander
to rewrite both arithmetic and comparison operations that have been
resolved to a large type, namely Universal_Integer, into equivalent
operations in a smaller type, namely Integer (or Long_Long_Integer).
In certain contexts invo
Default initialization is not performed when an imported object is
declared, so there should also be no Default_Initial_Condition check
generated for such an object declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Steve Baird
gcc/ada/
* exp_ch3.adb (Expand_N_
This consolidates the constraint checking code for allocators in only
two places, Expand_Allocator_Expression for the qualified expression
case and Expand_N_Allocator for the subtype indication case, getting
rid of some duplication and plugging some loopholes in the process.
Tested on x86_64-pc-li
This fixes a few minor glitches in the part of the expander dealing
with attributes: missing check for Component_Size, alphabetization
issues and wrong classification of few other attributes.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Eric Botcazou
gc
AI12-0032 modifies/clarifies many of the rules pertaining to uses of the
Old attribute. Most of these 7 changes were already implemented by GNAT
but a couple having to do with accessibility were not. Implement those
unimplemented rules.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18
The procedure Expand_Array_Equality has an optimization whereby the
equality operation for an array of 2 elements is expanded into a
simple conjunction of two component comparisons instead of into
the generic loop.
But this special circuitry reuses the same expression list for the
indexed componen
This test shows that GNAT was missing formal subprogram conformance
checking in some cases, now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-18 Arnaud Charlet
gcc/ada/
* sem_ch6.ads, sem_ch6.adb (Check_Formal_Conformance): New
subprogram.
(Check_Co
The procedure Get_Size_For_Range does not need to return the smallest
size for a signed integer type covering the range, the important thing
is instead to return a size lower than that of the original type; this
saves a bunch of lookups in the power-of-two table of the Uint unit.
The change also b
Validity checks for 'Old prefixes (enabled by the -gnatVo switch) are
now executed when the 'Old prefix is evaluated, i.e. at the very
beginning of a subprogram and not when evaluating the postcondition.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Piotr Trojanek
gcc/ada/
Routine Apply_Parameter_Validity_Checks is only called when flag
Check_Validity_Of_Parameters is true, so repeated testing of this flag
within that routine itself was unnecessary.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Piotr Trojanek
gcc/ada/
* checks.adb (Apply
When calling routine Build_Array_VS_Func that expands attribute
Valid_Scalars on array objects we tested Scalar_Part_Present on the
array's component type. This was unnecessary, because
Build_Array_VS_Func is only called after checking Scalar_Part_Present on
the array's type, which internally Scala
Attribute 'Valid_Scalars on private tagged types doesn't work as it
should on private tagged types. Fix most likely needs to modify three
routines. This patch document the problem with a ??? comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Piotr Trojanek
gcc/ada/
It turns out that there are legitimate cases now flagged by the warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Eric Botcazou
gcc/ada/
* sem_prag.adb (Process_Convention): Revert previous change.--- gcc/ada/sem_prag.adb
+++ gcc/ada/sem_prag.adb
@@ -8304,7 +8304,
For any object Foo, Foo'Access can never be passed as a parameter of a
call to the equality op for Universal_Access, so add this check and do
some code cleanup on recent changes at the same time.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Arnaud Charlet
gcc/ada/
* s
When applying 'Valid_Scalars attribute to a class-wide object (either
explicitly or as a result of a command line switch like -gnateV), we
must strip away type privacy.
Note: this is just a minimal fix to avoid a crash. Attribute
'Valid_Scalars is not really working as expected on tagged types,
es
For a record delta aggregate like "(X with delta C => 1)" the component
choice identifier "C" had empty Entity and Etype fields.
For GNAT this was fine, because it expands delta aggregates into
assignments using component names alone; for GNATprove this was
troublesome, because it keeps delta aggr
This patch fixes the compiler whereby style checks for extranious
whitespace (under the flag -gnatyb) may crash the compiler when a
manually specified UTF character is present directly before such an
extranious whitespace.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Justin Squir
This AI changes the API to move the validity checks to a subtype
Valid_Big_Integer/Real with a dynamic predicate.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Arnaud Charlet
gcc/ada/
* libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads,
libgnat/a-nbnbin__gmp.adb, libg
The removal of the obsolete code path originally implemented for ASIS
has exposed a latent issue for components of discriminated tagged types
in instance bodies: Is_Visible_Component can wrongly return false for
them even though the ancestor type is perfectly visible in the instance.
No functional
This patch fixes the compiler whereby a conversion to Interfaces.C.Bool
within a return statement may cause a spurious "condition always X"
warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Justin Squirek
gcc/ada/
* sem_warn.adb (Warn_On_Known_Condition): Add gene
The procedure Apply_Range_Check is the only caller of the procedure
Apply_Selected_Range_Checks and always passes Do_Static as False,
which means that the True path is unreachable in the latter, so this
change merges the latter in the former.
Moveover, it adds a new parameter Insert_Node to Apply_
Attribute Update only makes sense with named component associations. The
positional component associations were silently ignored by both
analysis, resolution and expansion; now they are rejected as illegal.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Piotr Trojanek
gcc/ada/
The predicate function In_Place_Assign_OK is responsible for finding
out whether the in-place assignment of an aggregate is possible; for
array aggregates, it checks among other things whether sliding will
occur during the assignment.
But, in an allocator context, it does so by comparing the bound
It is permitted to put very large size clauses on enumeration types
so we need to deal with them in Get_Integer_Type.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Eric Botcazou
gcc/ada/
* exp_attr.adb (Get_Integer_Type): Return the largest supported
unsigned i
The qualified expressions present in allocators use a specific circuitry
during type resolution and, therefore, escape the new static predicate
check required by AI12-0100 and present in Resolve_Qualified_Expression.
This removes the specific circuitry, as well as makes small adjustments
to Resolv
Resolve_Qualified_Expression propagates the type of the operand into
the node itself if the original type of the node is unconstrained,
but this is not needed for an allocator and might be problematic,
e.g. for the CCG compiler which expects unconstrained array types.
No functional changes.
Teste
This fixes a Program_Error raised by Analyze_Selected_Component because
it didn't manage to find the proper selector for a selected component
applied to a parameter of class-wide type in an instance body.
The problem is that the tagged type is derived in the private part of
the generic spec from a
The procedure Hide_Public_Entities is responsible for (conservatively)
attempting to hide entities that have been previously made public by
the semantic analyzer in package bodies. But it effectively does not
run on nested instance bodies because instantiations are still pending
by the time the en
The compiler rejects an expression function declared in a generic
package with Ghost aspect, when the expression of the function includes
a reference to a private type declared outside of the package, whose
full view has not yet been analyzed, and the Ghost mode is Ignore.
Tested on x86_64-pc-linu
...and replace it with an explicit check, so it is enabled whether or
not assertions are enabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Bob Duff
gcc/ada/
* libgnat/a-ststbo.adb (Write): Replace pragma Assert with "if
... raise Constraint_Error".--- gcc/
There is a second case where Expand_N_Assignment_Statement was applying
range checks for allocators and it is also obsolete.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Eric Botcazou
gcc/ada/
* exp_ch5.adb (Expand_N_Assignment_Statement): Do n
This patch fixes the compiler whereby a project with manually specified
Naming for subunits such that several of the subunits exist in the same
file as the unit they are defined in.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-19 Justin Squirek
gcc/ada/
* lib.adb (Check_
After discussions at the ARG, the rule in RM 13.1(10) limiting
representation aspects on derived types is removed by AI12-0376.
It has also been confirmed that Default_Component_Value is a
representation aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* aspects.ads (I
AI12-0099 corrects the RM wording for two issues. One is that the "not"
operator is allowed in predicate-static expressions, which is already
supported properly by GNAT. The other is that predicates get inherited
in the case of concurrent types that extend from an interface with
a predicate. For t
Historically both low and high range bounds were resolved with the range
type, but we decided to resolve high bound with the range's base type.
This appears to be necessary for having proper range checks in GNATprove
mode, especially for null ranges, but it is no longer needed.
This patch reverts
The procedure does not deal with run-time checks at all, except in a
very peculiar case, 'Pos applied to an integer type, causing multiple
checks to be generated for this case.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Eval_Attribu
The local objects declared in a Declare_Expression must be available
when the expression is resolved. THis patch makes these objects
visible during resolution, by reinstalling the scope created during
prior analysis of the Declare_Expression. This scope exists only for
visibility processing and pl
Fixes an illegal call to Compile_Time_Known_Value with Empty parameter,
which is now reported as a crash with switch -gnatdk. This is clearly a
corner case; in preparation for a cleanup of some dubious code for
Enum_Rep attribute.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This mostly replaces verbose lines with calls to the Entry_Index_Type
accessor functions and also changes Collect_Entry_Families to using
the same method as Build_Entry_Count_Expression to determine whether
an entry family is large.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed
AI12-0068 defines a reference to a current instance occurring in an
aspect_specification of a type or subtype to be a value, not an object.
This means that a Constrained attribute in such a context is always
True. It also means that attributes that take a prefix that must be an
object are illegal
When we pass an unconstrained value in an activation record, we pass it
an access type instead of an address so that we can get the bounds in
the nested subprogram. However, the current code does this only when
the uplevel reference is a parameter and uses 'Access. There are cases,
as introduced
This prevents the compiler from aborting or crashing on the instantiation
of Unchecked_Conversion on a limited type which is passed the result of a
function call. The semantics of this operation are not very clear and the
programmer is essentially on his/her own here, but the compiler should try
to
Range check flag on scalar expression in attribute Update was originally
set when this attribute is expanded into a sequence of assignment.
However, in GNATprove mode we have a custom expansion, which does
nothing with attribute Update; in particular, it didn't set the required
range check. As a wo
This patch fixes a compiler abort on an object declaration whose
expression is an aggregate for an unchecked union type. A declaration
for an object of such a type is otherwise treated as a renaming of the
expression (typically an object of the type), but this does work for an
aggregate, which must
This patch fixes a compiler abort on a declaration of subtype of a
derived type DT whose declaration renames a discriminant of its parent
type T, when there is a record representation clause for DT.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb (Find_Component)
This extends the optimization applied to large aggregates used to reset
array objects to the case of allocators initialized by such aggregates.
The aggregates must essentially satisfy the same conditions as in the
former case, although aggregates explicitly giving the bounds of the
allocation are
This patch fixes the compiler whereby malformed code featuring a generic
package declaration with a formal package may result in an infinite loop
when the name of the formal package is hidden by the formal parameter
itself.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem
In few routines we expect exceptions and handle them by falling back to
an appropriate safe value (e.g. in Compile_Time_Known_Value we fall back
to False and merely skip some optimizations). This is especially
important while processing code with previous errors.
However, this behaviour prevents u
Refactor share code for secure hash computations to use
Stream_Element_Array instead of String as the internal buffer type. This
resolves an issue where we would overlay a String on a user provided
Stream_Element_Array when that user array is larger than the largest
possible String.
Tested on x86_
1001 - 1100 of 3386 matches
Mail list logo