If we're doing 'First or 'Last on a renamed variable, the backend may
look at either the Etype of the variable or that of what it was
renaming, so check both to see if we need to place it into the
activation record.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Richard Kenner
g
Predicate checks are required by AI12-0100 when evaluating qualified
expressions where the qualifying subtype has such checks. Errors rather
than warnings must be issued on static qualified expressions and type
conversions that violate a static predicate, so that's corrected here.
There were also c
Use pragma Warnings to silence a spurious warning that may occur in
instances of formal vectors.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Claire Dross
gcc/ada/
* libgnat/a-cofove.adb (Insert_Space): The computation of Index
generates a spurious compiler wa
The Name_SPARK constant is no longer used in GNAT to implement the
SPARK_05 restriction, but is still used in GNATprove to detect whether
the SPARK.Heap unit has been explicitly WITH-ed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Piotr Trojanek
gcc/ada/
* snames.ads
This patch corrects an issue whereby calls to controlled primitives for
types which extend generic formals may be flagged at compile-time as
being non-visible.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Justin Squirek
gcc/ada/
* sem_ch4.adb (Analyze_One_Call): Add e
The Jorvik profile is a newly defined profile, similar to the Ravenscar
profile but less restrictive in some cases. It differs from the
Ravenscar profile only in the removal of six restrictions and the
relaxation of one (Ravenscar's Simple_Barriers restriction is replaced
with a Pure_Barriers restr
This change adds a missing check on setting aspects Storage_Size and
Storage_Pool on remote access-to-class-wide types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Arnaud Charlet
gcc/ada/
* sem_cat.ads: Fix typo.
* sem_cat.adb (Validate_Remote_Access_To_Class
Most cases were actually handled fine thanks to some special handling in
exp_attr.adb, but cases of e.g. a renaming of renaming were not handled
properly. Taking this opportunity to simplify the code and remove
special cases by actually adding support for 'Enum_Rep directly in
Eval_Type_Conversion.
Change the existing implementation of the Simple_Barriers restriction to
conform to the rules given in AI12-0290. Note that the new rules are in
some cases more restrictive than the old rules (so that previously
accepted barriers might now be rejected). For example, references to
non-component subc
Expansion of Enum_Rep in GNATprove is meant to be a subset of the
expansion in GNAT, so it needs to be kept in sync with the frontend.
Semantics of the compiler is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Piotr Trojanek
gcc/ada/
* exp_spark.adb (Expa
AI12-0204 clarified that the prefix of a prefixed view that is renamed
or passed as a formal subprogram must be renamable as an object and
similarly (was already checked by GNAT), the prefix of a prefixed view
that has an implicit 'Access must be legal for 'Access and a
generalized_indexing is ille
The flag was made obsolete some time ago and no fallout has been
detected since then, so this change finally removes it.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Eric Botcazou
gcc/ada/
* atree.adb (New_Copy): Do not clear Has_Dynamic_Range_Check.
* checks.
In Ada2020 the Ravenscar profile (but not the Jorvik profile) includes
a "No_Dependence => Ada.Synchronous_Barriers" restriction. This is a
binding interpretation so it applies also to earlier Ada versions, but
the unit Ada.Synchronous_Barriers did not exist before Ada 2012.
Tested on x86_64-pc-li
An access type whose designated type is an incomplete or class-wide type
may end up designating a task type or a type with a task component. It
is then necessary to associate the access type with the Master of the
tasks that may be generated on an allocator for that access type. This
is done by cre
This removes an obsolete bypass present for long in the predicate
Is_Visible_Component, which is responsible for determining whether
a component present in a private tagged record type is visible in
its extensions. This bypass would essentially always return true
in bodies of instances, but there
This AI clarifies that predicate checks apply at object declaration for
types that contain components with a Default_Value or
Default_Component_Value.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* sem_util.ads, sem_util.adb (Is_Partially_Initi
We were accepting conversion from anon-access-T'Class to access-all-T
which is incorrect.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* sem_type.adb (Covers): Fix implementation of AI05-0149.
* sem_res.adb: Fix typo.--- gcc/ada/sem_res
This patch refines the checks and the corresponding error messsages on
the legality of instantiations where some formal objects and their
corresponding actuals may carry Atomic, Atonic_Components, Volatile,
Volatile_Components, Independent, or Independent_Components aspect
specifications. The lega
Synchronous barriers are currently not supported by GNATprove (i.e. it
doesn't recognize that they are initialized by synchronous). They are
specifically detected and rejected as not-in-SPARK, but it is more
elegant to annotate the Ada.Synchronous runtime library unit with
SPARK_Mode => Off.
Compi
This patch corrects an issue whereby the compiler would incorrectly
generate checks for overlapping formals (-gnateV) leading to spurious
runtime errors when a zero-sized array actual gets passed alongside
another formal declared in the same region.
Tested on x86_64-pc-linux-gnu, committed on trun
This patch corrects an issue whereby the compiler would crash if it
encountered an exit statement featuring a loop identifier where such
referenced loop iterates through a predicated type.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Justin Squirek
gcc/ada/
* exp_ch5.
Make each invocation graph point to the corresponding library graph. Use
this information in Write_Invocation_Graph_Vertex to print out the name
of the library item containing this vertex.
For procedures that take both the library graph and invocation graph as
parameters, remove the library graph
When raising Program_Error due to an incorrect Kind transition, print a
more informative debugging message.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Bob Duff
gcc/ada/
* bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the
old and new Kinds to the r
GNAT ignores the null exclusion property of the target access type in a
membership test (e.g. Ptr in Null_Excluding_Ptr_Type), this is fixed
here.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch4.adb (Expand_N_In): Fix handling of null ex
This patch corrects the assertions in Add_Edge_Kind_Check. In
particular, a spec-->body edge can come from an Invocation_Edge or a
Forced_Edge in case of cycles. Other edges are added in a certain
order.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Bob Duff
gcc/ada/
This patch disables a sometimes-failing assertion. The assertion is
failing because there is an invocation edge spec-->body, and then we
later add a Body_Before_Spec_Edge for the SCC computation. This is a
temporary fix; we need to investigate why the spec-->body invocation
edge exists.
Tested on
This is a useful optimization to avoid contention around the shared
empty string.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* libgnat/a-strunb__shared.ads, libgnat/a-strunb__shared.adb
(Reference, Unreference): No-op for Empty_Shared
Side_Effect_Free was always assuming an aggregate isn't side effects
free, but we can do better by taking advantage of the
Compile_Time_Known_Aggregate flag.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_util.adb (Side_Effect_Free): Improv
This implements the support for the new C_Variadic_n conventions,
n ranging from 0 to 16, in all versions of the language since the AI is
a binding interpretation.
These new conventions are meant to be used in conjunction with the
Import aspect/pragma to call variadic C functions with the special
Now that there is no artifical limit on Convert_To_Positional, we use
the same heuristics than in Aggr_Size_OK, to share the code and to
generate static aggregates in more cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_aggr.adb (Max_
This moves around the declarations of functions that are not in the
right category, adds pragma Inline for others and fixes alphabetization
issues.
This also clearly splits the functions subject to pragma Inline from the
procedures subject to the pragma, the former being read by XEINFO but
not the
We identify all the places where error messages are issued in the
expander and should be issued in semantic analysis instead, for future
clean ups.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch3.adb, exp_ch4.adb, exp_ch6.adb, exp_ch9.ad
When a dispatching operation overrides an inherited subprogram, it must
be subtype conformant with the inherited subprogram. Such check is not
performed by the frontend on overriding primitives of private types
which are declared before the full type declaration of the private type.
Tested on x86
This change is a step towards propagating more consistently the DIC,
Invariant and Predicate attributes between different views of the
same type, in particular to the newly built underlying full views.
It also cleans up the handling of the base types for the DIC and
Invariant attributes, which loo
Before this commit, GNAT would use the type of the expression rather
than that of the subtype mark in order to decide whether it should
generate range checks or not. This means that in some cases, GNAT would
decide that no range checks were needed, which was wrong. This issue
went mostly unnoticed
This patch further refines the checks and the corresponding error
messsages on the legality of instantiations where some formal types and
their corresponding actuals may carry Atomic, Volatile, etc. aspect
specifications. The legality rules stated in RN 6.1 (12/5) are in fact
backward-incompatibl
This is a code clean up as part of removing all calls to Error_Msg* in
the expander.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch5.adb (Expand_N_Assignment): Remove kludge for
AI05-0087.
* sem_ch12.adb (Validate_Derived
Routine Get_Low_Bound was added to frontend while moving utility
routines from the GNATprove backend, but it is no longer referenced.
(Surprisingly, there is no Get_High_Bound routine anywhere).
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
gcc/ada/
* se
The `if Token = ...` condition was added when aspect specifications were
introduced in GNAT: aspect specification parsing is done as part of
subprogram declaration parsing, and so once aspect specifications are
parsed, it is necessary to re-start the subprogram declaration-parsing
autotmata. But re
This commit fixes a bug introduced in a previous commit that attempted
to detect illegal body definitions on null procedures but did not
account for the fact that function definitions such as `function F
return Integer with Global => null is` could use the same path. This
would result in an asserti
This patch corrects an issue whereby the compiler would issue incorrect
accessibility errors and checks for objects initialized by functions
returning anonymous access types or type conversions where the operand
is a function returning an anonymous access type.
Tested on x86_64-pc-linux-gnu, commi
Membership test operators (i.e. "in" and "not in") have either the right
operand present (when there is just one choice) or the list of
alternatives present (when there are many choices), as documented in
sinfo.ads.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
g
When post-call actions need to be inserted in an expression context, an
N_Expression_With_Actions node is used. That's not done here for the
condition of an if-expression, so the change adds this case.
It also deals with the case of a call to a primitive of a tagged type
written in prefixed notat
Overriding dispatching primitives Initialize, Adjust or Finalize of a
controlled type by means of a subprogram body that has no specification
causes the frontend to initialize incorrectly the dispatch table slots
of these primitives.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 J
A workaround for a bug in expansion of Enum_Rep attribute in the
GNATprove mode was to expand First and Last attributes. Now with
handling of Enum_Rep fixed we don't need this workaround anymore.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
gcc/ada/
* e
This patch implements AI12-0220, which adds contracts to
Access_To_Subprogram types so that pre/postconditions are applied to all
indirect calls through such an access type.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Ed Schonberg
gcc/ada/
* einfo.ads (Access_Subprog
This changes the way some assignments of aggregates of dynamic
discriminated record types are expanded by the front-end: they used to
always give rise to the creation of a temporary, which is unnecessary if
the by-copy semantics can be guaranteed.
This also puts the treatment of qualified aggregat
The routine Determine_License is brittle and doesn't e.g. handle
properly wide characters. Furthermore this is just a heuristic, which
isn't really needed, so remove it to simplify maintenance and remove
latent issues with wide characters.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06
Folding of Enum_Rep attribute was partly done in evaluation (for
expressions like "Typ'Enum_Rep (Enum_Literal)") and partly in expansion
(for expressions like "Enum_Literal'Enum_Rep". Moreover, some of the
code in evaluation was dead and some of the code in expansion was
violating internal assertio
This patch fixes a bug where if pragma Assertion_Policy(Ignore) is in
effect, if the only reference to a given declaration is in an Invariant,
spurious warnings about unused entities are given. For example, if a
compilation unit says "with X;", and the only reference to X is in an
invariant, the co
This makes sure that a Sloc is put on the dereferences inserted by the
new procedure Copy_And_Maybe_Dereference.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Eric Botcazou
gcc/ada/
* sem_util.adb (Copy_And_Maybe_Dereference): Temporarily copy
This plugs the only loophole in the front-end through which implicit
dereferences can reach the code generator without having being turned
into explicit ones.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Eric Botcazou
gcc/ada/
* sem_util.adb (C
This removes a block of code in Resolve_Call that inserts an explicit
dereference for a call whose prefix is an access-to-subprogram type, but
this processing is already done earlier in Analyze_Call.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Eric Botcaz
This patch enhances the warnings on overlapping actuals of composite
types when only one of them is writable. If these parameters are passed
by reference it is the case that assignment to one could have the
undesirable effect of modifying the other inside the called subprogram.
Tested on x86_64-pc
This Ada 202x AI defines among other things new check names. Recognize
them as no-ops for now.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Arnaud Charlet
gcc/ada/
* snames.ads-tmpl (Name_Characters_Assertion_Check,
Name_Containers_Assertion_Check,
Na
This makes sure that the semantics specified by this AI is observed
by using an expression with actions in order to insert the PE raise
statement in a membership context with multiple choices.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Eric Botcazou
gcc/ada/
* exp_c
Working on this AI it appeared that GNAT wasn't implementing the Ada
2012 notion of "require late initialization", so plug this hole and
implement the new rule from AI12-0192 at the same time.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Arnaud Charlet
gcc/ada/
* exp_
Building equivalent record aggregates when the type of the aggregate has
predicate functions can result in Gigi crashes if the type hasn't been
frozen yet. Since Build_Equivalent_Record_Aggregate is an optimization,
it's ok to disable it when encountering aggregates with predicates.
Tested on x86_
This new Ada 202x AI introduces a new package Modular_Arithmetic.
Related discussion also suggested to rename the recently introduced
Arithmetic package -> Integer_Arithmetic, for consistency, so this is
done at the same time.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Arnaud C
The call to Set_Size_Known_At_Compile_Time in
Backend_Processing_Possible happened just after querying
Size_Known_At_Compile_Time several lines before. Both calls operated on
the same type entity, so the call to "Set" routine had no effect and now
is removed.
Tested on x86_64-pc-linux-gnu, committ
This Ada 202x AI clarifies that Root_Storage_Pool_With_Subpools and
Root_Subpool should have pragma Preelaborable_Initialization.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Arnaud Charlet
gcc/ada/
* libgnat/s-stposu.ads (Root_Storage_Pool_With_Subpools,
Root
This patch fixes a bug where if you have a Predicate_Failure aspect on a
nested type, but no Predicate, Static_Predicate, or Dynamic_Predicate,
the compiler crashes when compiled with assertions enabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Bob Duff
gcc/ada/
*
Tables with case-choices are sorted by Sort_Case_Table with an insertion
sort. Contrary to what comments for the Case_Table_Type says, this
routine doesn't use the table element at index 0 as a placeholder.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Piotr Trojanek
gcc/ada/
When an assignment of an allocator the type of which has predicate
checks is made inside of a record, GNAT generates a call to the
predicate function. However, before this commit, GNAT wouldn't check if
the subtype mark had a predicate, which would result in the predicate
check function not being c
This patch corrects an issue whereby the compiler would incorrectly
calculate accessibility levels of objects within type conversions -
leading to potentially missing static and dynamic errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Justin Squirek
gcc/ada/
* sem
Internally generated static dispatch tables are preferably put in ROM,
so they are declared as constant where possible. However, the Object
Specific Dispatch tables were declared as variables, even though they
are initialized with static aggregates (with only literal integers) and
are never modifie
When iterating over pairs of formal parameters we now finish as soon as
we find a single problematic pair; previously we continued iteration.
This is just a simplification and a compiler performance improvement.
Semantics is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-
Routines Sem_Aggr.Build_Constrained_Itype and Sem_Ch3.Build_Subtype that
create discriminated itypes were originally identical, but now they are
subtly different. This patch removes one of their two subtle
differences, namely a call to Set_Size_Known_At_Compile_Time that was
meant as a very narrow
When resolving a record aggregate with a box as the value of one of its
component that is itself of a discriminated record type, this box is
replaced with an inner record aggregate. However, while a constrained
itype is created for the outer record aggregate (as described in the
comment of Resolve_
A local variable that is used as a counter (which is clear from both its
comment and its used) will only be assigned with natural numbers. This
is now reflected in its type. Code cleanup only; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Piotr Trojanek
When resolving record aggregates, frontend was creating "others => <>"
association to represent nested components, for example:
type T1 (D1 : Boolean := False) is record
C1 : Boolean := True;
end record;
type T2 is record
C2 : T1;
end record;
X2 : T2 := (others => <>);
Routine Build_Constrained_Itype was created as an exact duplicate
Build_Subtype with a comment suggesting that their code should be
exported from Sem_Util and reused. Unfortunately, since then both
routines diverged and now are subtly different, so reusing is not
straightforward. However, it is sti
Routine Next is implemented both as a procedure and as a function. The
procedure variant seems meant to be used when iterating, e.g.:
Next (Decl);
because it is more readable than the corresponding functions:
Decl := Next (Decl);
(and it is inlined anyway, so there is no performance penal
This consolidates the handling of almost all the implicit dereferences
allowed in Ada 95 into the semantic analysis phase of the compiler, and
more precisely in the Resolve routine of the front-end.
This both means that the generic code handling them in the expander
is removed, and that various co
When looking for references to discriminants within constraint
expressions we now stop once the first such a reference is found. This
is just a tiny performance improvement; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Piotr Trojanek
gcc/ada/
This patch refines the handling of warnings on overlapping actuals of
composite types when only one of them is writable. Formals of a generic
type are excluded, given that the warning will be given on any instance.
Uniform treatment of formals and actuals.
Tested on x86_64-pc-linux-gnu, committed
Work around the fact that Put_Image doesn't work for private types whose
full type is real. Make Put_Image_Unknown print out the name of the
type. Put_Image is still disabled by default for all types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Bob Duff
gcc/ada/
*
Routine Get_Value is only called with its Compon parameter equal to
entity ids of components. This is now reflected in the type of this
parameter. Code cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Piotr Trojanek
gcc/ada/
* sem_a
Previously, the four aspects Async_Readers, Async_Writers,
Effective_Reads, and Effective_Writes could only be specified for
volatile variables and for state abstractions. Allow specifying these
aspects for volatile types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Steve Baird
SPARK RM 7.1.3(8) has been deleted, but there were actually plenty of
mistakes in references to rules 7.1.3(X). This patch fixes them in both
comments and error messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Piotr Trojanek
gcc/ada/
* sem_ch4.adb, sem_ch6.adb,
Large bit-packed arrays, i.e. whose size is greater than 64 bits,
are implemented under the hood by means of arrays of storage units,
the front-end generating the required mask-and-shifts operations to
go back and forth between the two representations.
These operations depend on the endianness of
The Safe_Unchecked_Type_Conversion predicate was invoking the
Has_Discriminant predicate without checking that the Etype really
Is_Type, which is not the case for Standard_Void_Type "returned" by
entry calls.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Er
This adjusts the new Resolve_Implicit_Dereference procedure to the cases
where nodes in an instance do not have the proper view of a type that
was declared as private (a well-known limitation of the current
implementation of generic instantiations for types that are only
implicitly referenced in th
Work around bug in Put_Image of types in Remote_Types packages. Use the
switch -gnatd_z to control enabling of Put_Image. Put_Image is still
disabled by default for all types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-11 Bob Duff
gcc/ada/
* exp_put_image.adb (Build_
This patch updates the Put_Image facilities in the Big_Numbers packages
to match the actual implementation of Put_Image.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Bob Duff
gcc/ada/
* libgnat/a-nbnbin.adb, libgnat/a-nbnbin.ads,
libgnat/a-nbnbin__gmp.adb, lib
This implements the AI under the -gnat2020 switch, which extends the
Ada 2005 No_Return aspect/pragma to functions and generic functions.
As explained in the AI, functions subject to this aspect/pragma must
still have a return statement, but it must be of a specific form.
This also fixes the imple
This aligns the handling of Ada 2012 implicit dereferences in the
Is_OK_Variable_For_Out_Formal predicate wih that in Is_Variable,
and removes unreachable code as a result.
This also makes more use of the Get_Reference_Discriminant helper
function to retrieve the reference discriminant of a type.
Enable Put_Image for types that don't cause regressions (which is most
types).
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Bob Duff
gcc/ada/
* debug.adb: Remove usage of -gnatd_z.
* exp_attr.adb, exp_put_image.ads, exp_put_image.adb: Clean up
the enab
Routine Get_Discr_Value takes a name of a discriminant, not its entity,
so its parameter should be a Node_Id, not an Entity_Id. Also, fix typo
in its comment and refactor repeated calls in the body. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Piotr Troja
Detection of overlapping actuals was suppressed for internal units,
because we were getting spurious warnings on container units. Now this
suppression has no effect (most likely because ignore parameters of
generic types).
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Piotr Trojan
Replace a low-level membership test "Ekind_In (Id, E_Entry,
E_Entry_Family)" with a high-level "Is_Entry (Id)", which is more
readable. Semantics stays the same.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Piotr Trojanek
gcc/ada/
* contracts.adb, einfo.adb, sem_ch4.a
For subprograms we call Warn_On_Overlapping_Actuals in Resolve_Call;
however, for protected entries we didn't call it at all, because
Resolve_Call was executing Resolve_Entry_Call and returning early. As a
result, we didn't detect overlapping actuals in entry calls. Now we do.
Tested on x86_64-pc-
This patch adds checks to reject illegal overriding indicators that
appear on subprogram declarations in protected bodies, where such
a subprogram cannot override any operation. Fixes ACATS test B831006.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Ed Schonberg
gcc/ada/
This acats test shows that we are not checking 13.1(9.2/5) for
representation aspects, now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Arnaud Charlet
gcc/ada/
* aspects.ads (Is_Representation_Aspect): New array.
* sem_ch13.adb (Analyze_Aspect_Specifica
This patch fixes a crash in the compiler when handling an instantiation
with a formal subprogram that carries an aspect specification, when the
actual in the instantiation is an overloaded name.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Ed Schonberg
gcc/ada/
* sem_
This patch fixes an infinite loop in the compiler on an instantiation
that includes formal packages and formal subprograms with aspect
specifications (but no pre- or postconditions), when compiling with
-gnatX.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Ed Schonberg
gcc/ada
Use Standard'Maximum_Alignment * 2 unconditionally to accommodate
possible requirements by user code compiled with specific cpu/arch
options such as -mavx on x86 targets, which Gigi assumes the SS can
handle.
Such options influence what Standard'Maximum_Alignment returns and are
typically not used
The required level of support for elementary streaming includes support
for 24 bits elements, which is added here.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-12 Arnaud Charlet
gcc/ada/
* exp_strm.adb (Build_Elementary_Input_Call): Add support for 24
bits elemen
We were detecting overlapping actuals in a call like "Proc (A, B, C)"
using two loops that iterated over all parameters, so we were examining
9 pairs:
A-A, A-B, A-C
B-A, B-B, B-C
C-A, C-B, C-C
Now the outer loop iterates over all parameters, while the inner loop
always starts from the next
This implements the AI under the -gnat2020 switch, which extends the
set of calls that can be made during the elaboration of library units
subject to the aspect/pragma Preelaborate, beyond the existing ones
to static functions. Calls to certain functions that are essentially
unchecked conversions
901 - 1000 of 3273 matches
Mail list logo