This commit lets users know what the expected and actual size are when
conflicting representation clauses are present.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Record_Representation_Clause,
Check_Record_Representation_Clause): Add expecte
This prevents the freezing mechanism from putting a node inside the
subprogram body generated for a predicate function, which can for
example happen for a function referenced in the predicate.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (In_Expanded_Body): Ret
Iterator filters can appear in loop parameter specifications and in
iterator specifications, and determine which elements of some domain of
iteration are to be used in a loop, aggregate ,or quantified expression.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par.adb (P_Ite
The implementation of static expression functions exhibited various
problems when compiling with the switches -gnatd.F (SPARK mode) or
-gnatc. Use of those switches could lead to errors on legal calls to
static expression functions (such as the calls being flagged as not
static), plus the compiler
Aspect Relaxed_Initialization has been prototyped for ordinary
subprograms and then SPARK RM 6.10 allowed it for generic subprograms as
well.
This is mostly straightforward to implement, except when 'Result appears
in the aspect expression for a generic function. When instantiated in a
wrapper pac
Problem: Expression functions that have class-wide pre/post conditions
which call functions that are themselves expression functions refer to
entities from a specification that isn't theirs.
Solution: When creating the class-wide clone of the function that has
the class-wide condition, update its
When analysing aspect Yield we were adding a minimum decoration to the
annotated entity by setting its kind to E_Function/E_Procedure. This
kind was then correctly reset to E_Generic_Function/E_Generic_Procedure
after all aspects has been analysed.
It seems cleaner to set this kind once and correc
This documents the implementation choice made for byte-packed array
types, where we let the code generator deal with them if the type is
composite and use the manipulation routines of the front-end if the
type is discrete.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* free
Now that Interfaces.C also defined long_long and unsigned_long_long,
make definitions in Interfaces.C.Extensions subtypes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-cexten.ads (long_long, unsigned_long_long): Now
subtypes of Interfaces.C types.
This freezing issue shows that Freeze_Expression does not fully control
the placement of freeze nodes produced by an expression coming from the
Actions list of various constructs, here an N_And_Then node, because it
does not check whether the entity being frozen, for example a type, is
really decla
They are mostly warnings on unused parameters, useless variables, casts
between integer and pointers of different size, or missing or incorrect
prototypes. There is also an improper checking of a return value.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.h (__gnat
This disables the warning that is given by the C compiler when it is
compiling the generic implementation of the backtrace facility used
on some platforms.
This happens when a positive frame level is requested, which can be
problematic in the general case. But this implementation is known to
work
For an allocator in the subtype mark case, the constraints of the subtype
must be checked against the designated subtype, except in the case where
the No_Initialization flag is set on the allocator node.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_A
The C compiler switch -Wparentheses causes the warning suggest
parentheses around '&&' within '||'.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* socket.c [_WIN32] (__gnat_minus_500ms): Parentheses around &&
operations. Remove notes about TN in comment.diff --git
This just replaces Find_Aspect with Find_Value_Of_Aspect, which seems
to be the preferred idiom to retrieve the value of an aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Expr_Types): Replace call to Find_Aspect
with call to Find_Value_Of_
The problem is that the compiler freezes the iterator type associated
with a given type in the body of an expression function that contains
a quantified expression for this type and happens to be the completion
of a previous declaration. The reason is that Freeze_Expr_Types does
not see that the
Reorganize the code and add new generic parameters so that this unit can
be reused in more contexts and in particular provide support for bounded
large integers without needing any dynamic memory allocation nor
secondary stack.
Move the implementation of To_String to System.Generic_Bignums to allo
This patch adds global contracts to functions from
Ada.Numerics.Big_Numbers.Big_Integers and
Ada.Numerics.Big_Numbers.Big_Reals. This removes the warnings returned
when using these functions in SPARK.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-nbnbin.ads, libg
Given two interface types Ifc0 and Ifc1 where Ifc1 is a descendant of
Ifc0, the frontend reports a spurious error handling a call to a
Generic_Dispatching_Constructor instance that occurs as the operand of a
qualified expression initializing an allocator where Ifc1'Class is the
subtype_mark of the
This is ongoing work for the implementation of Ada 2020 generalized
aggregates for containers. The patch includes the infrastructure to
support the new aspect and related subprograms, and implements the
functionality of positional aggregates for set-like containers.
Still to come:
a) resolution a
This removes the left-overs of an expansion done in Expand_Call_Helper
in order to pass the correct accessibility level to the callee when
the actual is an if-expression of an access type. The expansion uses
a dummy temporary to analyze the outermost Expression_With_Actions it
makes and removes it
In routine Check_Completion once the entity kind is determined, it is
enough to look if the required completion is provided. However, those
two tests were combined, so we were processing the entity several times,
which was inelegant and inefficient.
Tested on x86_64-pc-linux-gnu, committed on trun
This replaces calls to Esize or RM_Size for standard integer types with
their value, uses Standard_Long_Long_Unsigned directly in one case and
Standard_Long_Long_Integer in another case, and changes the recently
added Narrow_Large_Operation to use Uint instead of Nat for sizes.
No functional chang
We want to favor large static aggregate at library level, but within
subprograms, we want to favor loops instead when relevant.
As part of this work we uncovered a missing freeze on allocator subtype
marks showing up with this change, as well as the need to generate
predicate checks within init pr
Now that volatile properties can be set on types, objects other than
variable may have fine-grain volatile properties inherited through their
type. This is now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Has_Enabled_Property): Add handling of
For GNATprove we have a special expansion of attribute Update. It is now
refactored it into a dedicated routine and reused for delta_aggregate.
For attribute Update the behaviour is as it was; for delta_aggregate we
now decorate the AST with range checks flags that were previously
missing.
Tested
Comments for routines No_Caching_Enabled and Is_Effectively_Volatile,
which are both related to volatile objects, were not enforced with
assertions. As a result, we had failing assertions much deeper in the
call tree, far from where the problems occur. This patch adds both the
missing assertions an
A recent patch enforced an existing comment in Is_Effectively_Volatile
with an assertion. To satisfy this assertion, it also set the Ekind on
discriminants earlier. However, a subtle prevention of cascaded errors
in routine Enter_Name relies on the Ekind of discriminants being set
late.
This patch
GNAT expands attribute Update applied to a record component into a
sequence of assignments to a temporary object and applies range checks
when analysing those assignment. GNATprove keeps such an aggregate
unexpanded, so it misses range checks, especially when several
components of a different type
First, this change extends the memset optimization to the case of array
aggregates nested in other aggregates, when the outer aggregates are
expanded component-wise; second, it prevents the compiler from
duplicating allocators and other nonstatic constructs present in an
Others choice of array aggr
Routine Is_Actual_Parameter, which deals with cross-references and
pragma Unreferenced, for a procedure call like this:
P (A);
was wrongly returning True for both the identifiers P and A above, on
the grounds that both have N_Procedure_Call_Statement as their parent.
Now it only returns True f
Nowhere in the code we call set Ekind to E_Protected_Object, so all the
code that tests this is necessarily dead. This patch removes references
to E_Protected_Object.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads (E_Protected_Object): Enumeration literal removed.
This makes the compiler issue an unconditional warning for an overlay
that changes the scalar storage order, i.e. for an address clause when
the overlaid and the underlying objects are of array or record types
that have opposite scalar storage order. The reason is that the code
generator does not
This patch implements AI12-0368, which allows declare expressions
to be static.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Expression_With_Actions): Check the rules
of AI12-0368, and mark the declare expression as static or known
at
Commit titled "Update handling of assigned value/unreferenced warnings"
added a comment "... *unless* this is an actual parameter" and at the
same time removed a "not" operator from the corresponding condition.
This is now reverted to match both the previous code and the current
comment.
Tested on
Compiler rejects an indirect call through an Access_To_Subprogram
value that denotes a parameterless subprogram, when the corresponding
access type has a pre- or postcondition.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Access_Subprogram_Wrapper_Body)
Windows is case insensitive but also case preserving, so we don't want to
generate a file in lower case if the input file wasn't.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint-c.adb (Set_File_Name): Preserve casing of file.
* osint.adb (File_Names_Equal): New
This patch fixes the general problem in the detection of potentially
unevaluated nested expressions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb
(Immediate_Context_Implies_Is_Potentially_Unevaluated): New
subprogram.
(Is_Potentially_U
This implements additional functionality for the Ada 202x container
aggregates, in particular the use of iterated_component_association in
both Unnamed (positional) and Named (keyed) aggregates for types for
which the Aspect Aggregate is defined.
Tested on x86_64-pc-linux-gnu, committed on trunk
When we detect effectively volatile array type we only need to examine
the type of array component if the array itself has no
Has_Volatile_Components property.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Atomic_Components): Simplify with Ekind_In.
(
This changes the Sloc used to expand a timed entry call from that
of the Select to that of the Delay statement for coverage purposes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch9.adb (Expand_N_Timed_Entry_Call): Use the Sloc of
the delay statement in the e
The RM C.6(19) clause says that atomic or volatile objects of types
that are not by reference must be passed by copy in a call if the
type of the formal is not atomic or volatile respectively. But this
requirement does not apply to initialization procedures, which are
generated by the compiler, an
The predicate returns true only if an aspect requiring delaying like
Alignment or Address is the first aspect in the list. The change
also contains a small consistency fix for Freeze_Object_Declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Delayed_As
This patch extends static functions and allow them on Intrinsic imported
subprograms in addition to expression functions, under -gnatX. We also
implement compile time evaluation of Shift_Left/Right operators as a
first set of useful static-compatible intrinsics.
Tested on x86_64-pc-linux-gnu, com
In a case of a complex precondition expression with quantifiers, we can
get a crash in Resolve_Type_Conversion when trying to emit a -gnatwr
warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Type_Conversion): Protect against null
entity.
This ACATS test shows GNAT was not enforcing legality rules related to
subpools.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Freeze_Type): Remove warning in expander,
replaced by a corresponding error in sem_ch13.adb. Replace
RTE_Available by
Apart from the usual editorial tweaks, this documents the discrepancy
between the aspect and the non-aspect cases for alignment settings in
object declarations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads (Delayed Freezing and Elaboration): Minor tweaks.
This patch fixes an error in the compiler whereby an allocator for a
limited type may cause spurious accessibility errors due to a
miscalculation of access levels on interally generated temporaries.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Make_Build_In_P
Detecting effectively volatile objects in restricted contexts happens in
two routines: Is_Effectively_Volatile_Object and Is_OK_Volatile_Context.
Their handling of type conversions and slices were different; also none
of them has been dealing with qualified expressions, which has been just
added to
In expression like "(Arr with delta Low .. High => New_Component_Value)"
bounds Low .. High might denote a null range. In this case both Low and
High can be any values from the base type of the array's index type;
they don't need to belong to the array's index type itself.
This patch removes unnec
Use aspect SPARK_Mode with value Off in the spec and body of standard
containers, bounded and unbounded versions, so that it is clearer that
they cannot be used in SPARK code. Formal containers should be used
instead.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a
In some cases where a procedure call is expected but a function is
provided such as "Interfaces.C."=" (x, y);" GNAT would not generate any
error message.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Procedure_Call): Detect use of operators
in
If an exception is raised early in Allocate_Any_Controlled, no lock is
taken yet and Unlock is called on a lock which isn't taken.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-stposu.adb (Allocate_Any_Controlled): Fix logic in
lock/unlock.diff --git a/gc
This prevents the compiler from generating elaboration code for a record
declared with an initial value and an alignment aspect. The expression
of an alignment aspect must be static so, in practice, there is no need
to defer the elaboration of the object just because of it.
Tested on x86_64-pc-li
Cleanup frontend code before routine Find_Overlaid_Entity will be reused
in GNATprove backend.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Find_Overlaid_Entity): Fix style in comment.
(Note_Possible_Modification): Simplify repeated calls to Ekind.di
Target name (i.e. "@"), which was introduced to Ada 202X in AI12-0125,
denotes a constant object (RM 3.3(21.2/5)), even though target_name
itself is not an object (RM 3.3(2)).
This patch allows @ to be appear as a prefix for Address attribute
(which requires an object). Also, it enables constructs
GNAT would in some cases not resolve a Predicate_Failure aspect properly
and generate spurious errors of the form:
cannot find unique type for raise expression
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Add proper
This patch modifies the parser to recognize
iterated_element_associations, which may include a key_exprewsion to be
used in a named aggregate such as a map. The new syntactic node
N_Iterated_Element_Association is recognized throughout the compiler.
The patch also extends the analysis and expansion
Renamed_Entity is only valid for a few entities, using it on any entity
passed to Is_Renaming can result in crashes. Fixing this requires
making sure that Is_Renaming only uses Renamed_Entity on entities where
this is allowed and uses Is_Renaming_Of_Object everywhere else.
Tested on x86_64-pc-lin
This adjusts the description of Flatten, removes an obsolete comment
and uses Compile_Time_Known_Value as now done in Is_Static_Element.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Flatten): Adjust description.
(Convert_To_Po
Part (1) clarifies that we anticipated in Statically_Names_Object,
update comment accordingly.
Part 4 (4) clarifies: 4.2.1(3/5) says that the only parameter of a
user-defined Integer_Literal function is of type String. But it doesn't
specify a mode.
Since the parameter is passed a string literal,
This patch fixes a bug in the compiler whereby a local object of a named
access type used as an actual for an anonymous access discriminant
within a return aggregate would lead to an incorrect accessibility level
calculation and thus an incorrect compile-time accessibility error on
such an object.
Performing null exclusion checks on generated entities can result in
bogus error messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Object_Declaration): Add
Comes_From_Source call.diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
---
Trivial cleanup with equality between universal integers, which should
be much faster than subtraction. Semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_case.adb (Build_Choice): Simplify.diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb
---
This patch implements AI12-0289. In particular, if an untagged type T is
completed with a tagged full type, and a parameter whose type is "access
T", where T denotes the partial view in the subprogram spec, an explicit
"not null" is required.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/
This replaces the special case done in "**" so far.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-genbig.adb ("**"): Remove capacity limit check.
Improve code by using an extended return.
(Normalize): Perform capacity limit check here instead whic
This patch fixes an error in the compiler whereby an allocator for a
limited type may cause spurious accessibility errors due to a
miscalculation of access levels on internally generated temporaries
within the instance.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4
The recent change in Exp_Ch3.Freeze_Type exposes a latent issue in
Sem_Ch8.Note_Redundant_Use when Load_RTU triggers at the wrong time,
causing spurious redundant use clause warnings.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (Note_Redundant_Use): Add missi
GNAT crashes when building static predicate functions out of a case
expression that contain an "others" clause. This is because it attempts
to call Is_OK_Static_Expression() on the N_Others_Choice of the case
expression when trying to figure out whether the case is exhaustive or
not.
Fixing requir
To avoid creating circular dependencies between runtime units and to
allow compiling e.g. GNAT with Initialize_Scalars.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* frontend.adb: Disable Initialize_Scalars on runtime files.diff --git a/gcc/ada/frontend.adb b/gcc/ada/front
A prefixed view of a subprogram with aspect Synchronization being
By_Protected_Procedure has convention protected. This new feature is
documented in AI12-0107.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_attr.adb (Has_By_Protected_Procedure_Prefixed_View): New
AI12-0042 specifies a couple of new rules for type invariants. The first
is that when a type extension inherits a nonabstract subprogram that is
a private operation of an ancestor type that has a class-wide invariant
and the parent subprogram is visible at that point, the subprogram must
be overrid
The routine to output strings in an optimized manner has an overflow
error in case of very large strings.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-ststop.ads: Fix typo.
* libgnat/s-ststop.adb (Read, Write): Fix block number
computation to avo
This patch fixes a bug where gnatbind would suggest adding the
No_Entry_Calls_In_Elaboration_Code restriction, when that restriction is
already present.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* bindo-diagnostics.adb (Output_Invocation_Related_Suggestions):
Use
The compiler was disallowing an access to a container to be used as the
prefix of an indexing of the container, but implicit dereferencing is
allowed in such a context (basically because a prefix can be an
implicit_dereference, by RM 4.1(4); a Ramification note was added in RM
4.1.6(11.a/5), to cla
This patch fixes a regression introduced by the recent work done for
tagged type constructors with task components.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Expand_N_Full_Type_Declaration): Ensure a _master
declaration on limited types that might
This Ada AI clarifies that Ada identifiers that contain characters that
are not allowed in Normalization Form KC are illegal.
It also introduces a new function Is_NFKC.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* scng.adb (Scan): Detect wide characters not in NFKC.
This patch adds support for indexed aggregates with both positional
components and component associations that include multiple choices and
range specifications. For indexed aggregates the expansion uses a
separate pass, as suggested in AI12-0212, to compute the size of the
resulting object and pre
This patch removes a spurious error in a compilation of a generic body
GB that includes a formal package whose source GF includes a nested
generic package NGF, and GB includes instances of NGF and of further
generic units declared within NGF.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/
This AI clarifies that a renames-as-body freezes the expression of any
expression function that it renames.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (Analyze_Subprogram_Renaming): A renames-as-body
freezes the expression of any expression function
This sets the Parent field of the block entity created in the case of
a statement sequence by Expand_N_Accept_Statement to the newly created
block statment, as done for example in Add_Block_Identifier. This is
needed in peculiar cases where the block contains instantiations of
packages with generi
Implement the No_Tasks_Unassigned_To_CPU restriction.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatbind.adb (Gnatbind): For No_Tasks_Unassigned_To_CPU, check
that CPU has been set on the main subprogram.
(Restriction_Could_Be_Set): Don't print
This patch adjusts the heuristics about the size of static aggregates,
which determine whether an aggregate should be statically allocated.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Max_Aggregate_Size): Use the small size of 64
when copying is nee
The custom implementation of Tan in a-numaux__x86.adb has some holes for
large values and will e.g. produce the wrong result on Tan (16367173.0 *
2.0**72).
This is fixed by replacing the use of a-numaux__x86 by
a-numaux__libc-x86.ads.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
a-numaux__libc-x86.ads wraps around long double trig functions that
Lynx178 does not have, so use the default a-numaux.ads instead to match
what is offered on Lynx178.
This is done by removing X86_TARGET_PAIRS from the x86-lynx178elf
configuration as it is now redundant: the default a-numaux pacak
The requirement for overriding an inherited visible private operation
when extending from an ancestor that specifies Type_Invariant'Class as
specified in RM 7.3.2(6.1/4) (AI12-0042) was unintentionally
overrestrictive. The rule is loosened by AI12-0382 so that it only
applies to type extensions th
Warnings aare emitted when a declaration for a constant C has an address
aspect or an address_specification clause of the form O'Address, where
O is a previously declared entity that is not a constant, The warning
must br supppressed if O is a generic formal In_Parameter, which is a
constant within
In GNAT mode attribute Pos is typically expanded into either a type
conversion (unless applied to enumeration types with custom
representation values) and analysis of this type conversion adds check
flags as required.
In GNATprove mode we expand the attribute with
Apply_Universal_Integer_Attribute
AI12-0194 specifies that language-defined aspects aren't permitted
on entry bodies, which is already effectively enforced by GNAT,
however the error message given when Max_Entry_Queue_Length is applied
to an entry body is potentially confusing, because it says that the
aspect "must apply to a prote
Unbounded string operation has to raise Constraint_Error if resulting
string going to be over Integer'Last length.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strunb.adb (Sum, Mul, Saturated_Sum, Saturated_Mul):
New routines. Use them when resulting st
Change the wording of error messages about 'Image to indicate that newer
versions of the language allow more cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.ads, errout.adb (Error_Msg_Ada_2020_Feature): New
procedure analogous to Error_Msg_Ada_2012_Feat
This old code is likely made obsolete by recent changes related to the
handling of the universal access "=" operator.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Resolve_Attribute): Remove dead code.diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
-
This removes obsolete code that would prevent a subtype dependent on a
private type from having its views switched when those of the private
type are switched by Switch_View.
Not switching the views in this case is problematic because this is not
in keeping with what the mechanism based on Install
Implement Put_Image for the random number packages and for
Ada.Containers.Vectors. More to come.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-rannum.ads, libgnat/s-rannum.adb: Add Put_Image.
This will be inherited by the language-defined packages
This patch fixes a bug in which Enum_Subtype'Image, where Enum_Subtype
is a non-first subtype of an enumeration type, would return the image of
the 'Pos -- that is, an integer instead of the text of the enumeration
literal.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp
This AI allows names that denote values rather than objects to
nevertheless be renamed using an object renaming.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (Analyze_Object_Renaming): Allow values in Ada
2020 mode.diff --git a/gcc/ada/sem_ch8.adb b/gc
This AI refines AI12-0074 to disallow cases of potential de-initializing
of out parameters.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Actuals): Refine 6.4.1 rules as per
AI12-0377.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
--- a
This patch fixes a bug in the compiler whereby taking 'Access on a
component of an anonymous access formal parameter and using such an
expression as an actual in a call where the corresponding formal is also
an anonymous access type will cause dynamic accessibility checks within
the callee function
This reverts commit 593627b4562814d2206e53e9ad6ce2e85295aa58.
That commit was installed in GCC by mistake, bringing it in sync with an
earlier, internal transitory state that had just been resolved in a
separate patch.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* switch.
Now that we're adding more and more Ada 2020 specific aspects in runtime
units, this is the convenient thing to do. Note that this doesn't impact
the Ada version used by user code.
Also fix a latent bug in sem_ch3 along the way, showing up when
System.Atomic_Primitives generic children are compile
601 - 700 of 3273 matches
Mail list logo