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_
This patch adds support to Image for the GNU standard format "%:::z",
which prints the time zone in the format "+hh", "-hh", "+hh:mm", or
"-hh:mm", as appropriate. We do not support any of the other standard
GNU time-zone formats (%z, %:z, %::z, %Z).
Tested on x86_64-pc-linux-gnu, committed on tru
The syntax parsed by GNAT.Calendar.Time_IO.Value allowed a fraction of a
second, or a time zone, but not both. This is a violation of the
relevant ISO standard ISO-8601. This patch allows both to be specified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-catii
This patch adds a new function Image in GNAT.Time_IO that takes a
Time_Zone parameter rather than using local time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-catiio.ads, libgnat/g-catiio.adb (Image): New
function. It might seem like the local-time Ima
This patch fixes a bug in which if GNAT.Calendar.Time_IO.Value is called
with an ISO date string, the time zone offset is computed incorrectly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-catiio.adb (Parse_ISO_8601): New name for
Parse_ISO_8861_UTC. 86
This patch implements AI12-0198-1, which enforces detecting components
which belong to a non-static or null range of index values of an array
aggregate.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Interval_Lists.Aggregate_Intervals): New
subprogram.
The comment for routine Is_RTE explains that it is a more efficient
equivalent of an equality testing with routine RTE.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Scalar_Range_Check): Use Is_RTE.diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
---
With analysis of the original array aggregate expressions (and not of
the copies, as it used to be) and without removing references to index
parameters of iterated_component_associations (which only need to be
removed when expander is active) we no longer need any SPARK-specific
code for array aggr
For a Subtype_Indication in ordinary array aggregates we explicitly call
Resolve_Discrete_Subtype_Indication; for a Subtype_Indication in delta
array aggregates we implicitly call Sem_Ch3.Analyze_Subtype_Indication,
which is only meant to be used in declarations, not in expressions.
This subtle di
Routine Present for Unit_Name_Type was introduced precisely to avoid
equality tests with No_Unit_Name. Code cleanup only; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-load.adb, lib-writ.adb, lib.adb, par-load.adb,
rtsfind.adb, sem_ch10
GNAT used to reject such code with a spurious error about the aspect not
being attached to the initial declaration. Now fixed. The workaround is
to declare a library-level spec for the subprogram, to which the aspects
are attached.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
The previous implementation only supported up to 128bits integers, now
provide a full implementation for unbounded integers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-nbnbin.adb (From_String): Implement fully.diff --git a/gcc/ada/libgnat/a-nbnbin.adb b/gcc/ad
Changes made for "Bad access checks on if/case expression as actual"
introduced a regression when dealing with transient objects: the
processing of function calls in Add_Cond_Expression_Extra_Actual would
remove the setting of the "hook" variable needed for proper
finalization.
Tested on x86_64-pc
Is_Finalizable_Transient does not properly handle the case of a return
containing an N_Expression_With_Actions (e.g. a case expression),
causing a premature finalization of the return object.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Is_Finalizable_Transi
The universal_access = and /= operators were not properly taken into
account in all cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_type.adb (Add_One_Interp.Is_Universal_Operation): Account
for universal_access = operator.
(Disambiguate): Take into
Result type compatibility checking for the specified String_Literal
function of a type was too strict, causing valid aspect specifications
to be incorrectly rejected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Validate_Literal_Aspect): Call to Base_Type
This prevents the compiler from placing the freeze node of a package
instance, used as actual parameter in a second instantiation, after this
second instance, thus triggering an internal error later. The freezing
code in Analyze_Associations already knows how to deal with this case,
but the mechan
SPARK defines the current instance of a protected object as non-volatile
for internal calls, which allows to use it in the Global contract of a
local non-volatile function. This was not handled correctly, now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.ad
The special inlining in GNATprove mode should recognize specially calls
inside default expressions, which cannot be inlined. This was not done
for calls in default expressions for discriminants, because the right
analysis context was not set in that case. Now fixed.
Tested on x86_64-pc-linux-gnu,
Fix implementation of SPARK RM 5.5.3.1(5) by accepting objects declared
within the prefix of attribute Loop_Variant itself. This previous code
didn't implement the "... but not within the prefix itself" part of the
rule.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_at
This commit implements the No_Unrecognized_Aspects and
No_Unrecognized_Pragmas restrictions described in AI12-0389.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-rident.ads (System.Rident): Register new restriction
IDs.
* par-ch13.adb (Get_Aspect_
Integer named numbers may now be used with types that have an
Integer_Literal aspect. Real named numbers may be used with types that
have a Real_Literal aspect with an overloading that takes two strings.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Validate
This removes an implementation subtype declared in the Ada.Text_IO
hierarchy that no longer seems to serve any useful purpose.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-wtdeio.adb (TFT): Delete and adjust throughout.
* libgnat/
Ada RM 3.3 says that "aggregate" is an object, but GNAT represents
"aggregate" either as N_Aggregate, N_Delta_Aggregate or
N_Extension_Aggregate.
With this patch both extension and delta aggregates are accepted where
object is required, e.g. as a prefix of attribute Size.
Tested on x86_64-pc-linu
This patch fixes an error in the compiler whereby an assertion pragma
within a ghost context whose expression causes the freezing of a
non-ghost type causes the compiler to crash during compilation when
ghost mode is disabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
All calls to SPARK_Msg_NE except one were taking an entity as its second
parameter; this patch does the same for one call that took an
identifier.
Code cleanup only; behaviour is unaffected, because both entity and
identifier works in the same when given to SPARK_Msg_NE routine.
Tested on x86_64-
Handle attribute ids in SPARK-specific expansion with a case statement,
just like they are handled in ordinary expansion. Code cleanup only, in
preparation for fix related to attribute Constrained; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_
This is fixed by recognizing -S in Scan_Compiler_Args and taking it into
account in Set_Output_Object_File_Name.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* opt.ads (Generate_Asm): New flag.
* osint-c.adb (Set_Output_Object_File_Name): Accept any
extensio
When compiling or analyzing with GNATprove a piece of SPARK code with a
circular definition involving an incomplete declaration and an access to
it, the compilation/analysis may raise Program_Error in some cases. Now
fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem
Before this commit, GNAT would crash when encountering uses of the
`Profile` pragma that did not have an identifier as argument (e.g.
`pragma Profile("a")`).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Emit error on wrong argument
n
The support for 128-bit integer types was added to System.Random_Numbers
but not to the twin package GNAT.Random_Numbers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-rannum.ads (Random): New functions returning 128-bit.
* libgnat/g-rannum.adb (Random):
exp_ch7.adb was missing calls to Set_Debug_Info_Needed on various
entities to allow debugging via -gnatD, now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch7.adb (Build_Finalization_Master, Build_Finalizer,
Build_Object_Declarations, Make_Deep_Array_Bo
This patch remove recursion on Set_Digit and Set_Image_Unsigned
procedure.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-imagei.adb
(Set_Digits): Rewrite the procedure to remove recursion.
(Image_Integer, Set_Image_Integer): Update assertions and
The previous change to __gnat_copy_attribs led to relying on utimes for
timestamp propagation on VxWorks 6 as well, which results in undefined
symbol references at runtime in most configurations for such targets.
Restore the previous code for such environments, based on utime instead.
Tested on x
While the default function returning 128-bit integer works correctly,
Random_Discrete does not if it is instantiated on a 128-bit integer,
since the magnitude of the returned numbers is still 64 bits.
Note that no counterpart is needed in GNAT.Random_Numbers because the
homonymous function in ther
This patch fixes an error in the compiler whereby right shift operators
on signed integers cause a compile-time crash when said shift operators
are provided via pragma Provide_Shift_Operators.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/intrinsic_subprograms.
Access type parameters in instances of generic units were first checked
with Subtypes_Match routine, and then their designated types were
checked for matching constrained-ness; diagnostic code guarded by both
conditions was duplicated.
It turns out that the constrained-ness condition was never act
Mistake detected as a code duplicate. It only suppresses a more precise
error on a code that is rejected as illegal anyway.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_One_Aspect): Replace duplicate of
Effective_Reads.diff --git a/gcc/ada/se
By convention subprogram declarations in Einfo unit use alias "E"
instead of Entity_Id, but subprogram bodies use full Entity_Id types.
This patch fixes inconsistencies where alias "E" was used in subprogram
bodies. Cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on
SPARK code is much more restricted in terms of possible side-effects
inside expressions. As such, there is no need for aggressive removal of
side-effects across all expressions in GNATprove mode. The benefit is
that expressions are more self-contained, without the need to get
information from hoist
In a case like:
X : Integer := 1;
Y : Integer renames Integer'(X);
the value of Y is changed by any subsequent assignments to X. Thus,
replacing the use of X with a literal 1 would be a mistake.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch2.adb (Expand_Enti
Now all calls to Make_Aitem_Pragma, which converts aspects to pragmas,
use hardcoded names as the Pragma_Name parameters, because the required
value is known statically (this actually prevents code reuse, but at
least now all aspects are handled consistenttly). Other calls use Nam
constant instead
Replace sequences of (in)equality tests with membership tests and sort
alternatives alphabetically.
Cleanup related to removal of duplicated code; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_One_Aspect): Detect aspect ident
In Expand_N_Exception_Renaming_Declaration we had a local constant "Nam"
which was then shadowed by a parameter "Nam" in a nested function
Evaluation_Required. Cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch8.adb (Expand_N_Except
This patch removes an error on an instantiation when the actual is a
scalar type with a dynamic predicate, and its bounds are compatible
with those of the corresponding formal parameter. Section 4.9.1 of
the RM specifies that subtypes S1 and S2 can be statically compatible
even if S1 is not static,
Attribute Has_Tagged_Values was implemented years ago, but never
documented. Found while detecting duplicated code, as this attribute is
processed very much like attribute Has_Access_Type and this duplication
is also removed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
The first one is that the propagation does not work if the raise
statement uses a qualified name for the exception, because of an
inconsistency in Expand_N_Raise_Statement.
The second one is that a pragma Assert (False) does not propagate
locally because the rewriting of the degenerate if statemen
An object declaration for an unconstrained array includes an expression
(most often an aggregate) that provides the bounds for the object. If
the aggregate uses box initialization to provide those bounds, it is not
necessary to construct the aggregate to complete the object declaration:
the generat
This patch fixes an error in the compiler whereby static accessibility
checks were incorrectly performed on non-discriminant components in
return aggregates featuring named associations - causing spurious errors
and crashes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* se
Compiler rejects an instantiation involving a formal package that
contains adjacent subprogram declarations with the same name, because in
the matching between entities in the formal package and the
corresponding actual package, it maps two successive entities in the
formal with the same entity (wi
Ada puts some restrictions on the use of attributes Old, that SPARK
mimics for attribute Loop_Entry, inside a "potentially unevaluated
context". These restrictions can be lifted by using pragma
Unevaluated_Use_Of_Old with argument Allow. Issue a message to indicate
that to the user.
Tested on x86_
If a library unit pragma is ignored then Check_Valid_Library_Unit_Pragma
was rewriting it into a null statement; this null statement then was
then detected by at the callsites to terminate analysis of the pragma.
Now if a pragma is ignored, then Check_Valid_Library_Unit_Pragma raises
an exception
This patch fixes an error in the compiler whereby returning an anonymous
access discriminant of an anonymous access formal within a function that
returns an anonymous access type may cause a malformed accessibility
check to be generated.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Warn on unparenthesized (in)equality as operand of and/or/xor, as this
is a known source of confusion.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Equality_Op): Warn when -gnatwq is used
(the default) and the problematic case is encountered.d
Simplify calls to Is_Access_Type followed by Is_Access_Subprogram_Type
with Is_Access_Object_Type, which does exactly the same.
Cleanup related to support for access-to-subprogram in flow analysis of
GNATprove; semantics unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Set_Has_Own_Invariants is a [base type only] field, so should be passed
the base type.
Set_Has_Own_Invariants and Set_Has_Inherited_Invariants should assert
that its parameter is a base type, but we don't do that as part of this
change. That will happen as part of the variable-sized nodes change.
This clears some confusion between them by citing the definition of the
eponymous attributes in the RM and writing down their relationship.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads (Aft_Value): Adjust documentation.
(Scale_Value): Likewise.diff --git
When using the gnatbind switch -u0 and a runtime built with checks on,
we could get a range check error in System.Tasking.Stages.Task_Wrapper,
now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-tassta.adb (Task_Wrapper): Fix computation of
Pattern_
This patch fixes a memory leak in concatenation when pragma
Initialize_Scalars or Normalize_Scalars is used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Concatenate): Call Set_No_Initialization
on the N_Allocator node that is supposed to alloc
GNAT emits a warning on slices of the form "A (subtype)" if A is a
constant; a similar warning is now emitted if A is any object, e.g.
formal parameter, loop parameter (when iterating over an
array-of-arrays) or component.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_
The Wide_Wide_Hash version of Ada.Strings.Hash was instantiated as a
library unit. Now all versions are instantiated in wrapper functions.
Minor inconsistency, spotted while cleaning up code for categorization
pragmas on instance units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
1101 - 1200 of 3267 matches
Mail list logo