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/
Routine Set_Entity_With_Checks called Set_Entity, did some checks, and
then called Set_Entity again. This second call was redundant and had no
effect; this patch removes it.
Those two calls appear to come from a sequence of refactorings:
initially there was just a call to Set_Entity at the end; wh
Compiler aborts when the Restriction_Warning (No_Tasking) appears as a
configuration pragma, and the main unit includes a task declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
when the restricti
This patch improves an error message on an illegal prefixed procedure
call Obj.Name (Args) when Name denotes a visible component of Obj, as
well as a primitive operation of the type of Obj.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Call_And_Resolve
Routine Resolve_Membership_Op didn't reference its Typ parameter and
instead suppressed warning with a suspicious pragma Warning. This could
be rather pragma Unreferenced, but actually we can reference the type in
assertion that enforces an existing comment.
Tested on x86_64-pc-linux-gnu, committe
This AI restricts renaming of a qualified expression to cases where the
operand is a constant, or the target subtype statically matches the
nominal subtype of the operand, or is unconstrained with no predicates.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (An
The initial implementation was simply using 'Image which will loose
precision in some cases. Fixed by always using a sufficient number of
digits.
To_Big_Real could be made more efficient by not going through strings,
this is left for a later step.
Tested on x86_64-pc-linux-gnu, committed on trunk
This also reimplements the I/O support for all fixed-point types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Likewise.
(GNATRTL_128BIT_OBJS): Likewise.
(GNATRTL_128BIT_PAIRS): Add new 128-bit variants.
* cs
Pragma Annotate for CodePeer must immediately follow the designated line.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuer.adb (Scan_Raw_Real): Move pragma Annotate around
and adjust its parameters.diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/l
The code would incorrectly compare using absolute values, which was a
left over for another implementation incorrectly carried over.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-nbnbre.adb ("=", "<"): Fix.diff --git a/gcc/ada/libgnat/a-nbnbre.adb b/gcc/ada/libgn
This commit adds checks for rule 6.5.1 4/3 of the Ada RM which declares
nonreturning procedures and nonreturning generic procedure instances
illegal.
The reason this check is performed in sem_prag.adb rather than in
Check_Returns in sem_ch6.adb is that generic procedure instances won't
have their
This removes a use of the absolute value that could potentially fail
the overflow check and add assertions guarding a second use and the
manipulation of string buffers, the latter for the sake of CodePeer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-imagef.adb
In most cases, the common operations for fixed-point types are implemented
by means of corresponding integer operations, in particular multiplication
and division. Because scaling is required to go back and forth between
the two representations, the expander needs to control the magnitude of
opera
Add support for the recently added 128bits integer support in
Big_Integers.To_Big_Integer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-genbig.ads, libgnat/s-genbig.adb (To_Bignum): New
variant taking an Unsigned_128.
* libgnat/a-nbnbin.adb (To_B
It can block the transformation of the multiplication by a power of 2
into a shift operation when the context is Universal_Integer and checks
are disabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Op_Multiply): Move down block calling
Nar
None of these programs analyzes the resulting node on return any more.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_fixd.adb (Build_Conversion): Adjust head comment.
(Build_Divide): Likewise.
(Build_Double_Divide): Likewise.
(Build_Multiply): L
This aligns the behavior of gnatmake with the way the runtime is now
built.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* make.adb (GNAT_Flag): Change to "-gnatg".
(Compile): Adjust comments accordingly.diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
--- a/gcc/ada
When reorganizing the mechanism which evaluates relational operators and
potentially folds them, the "General case" in routine Eval_Relational_Op
was put into an ELSE branch. This was subtly wrong, because it must be
executed unless the special case in the THEN branch exits with a RETURN
statement.
This set of changes aimed at optimizing the generation of range and
overflow checks for fixed-point types contains two parts:
1. a cleanup to the generation of range checks for type conversions
involving fixed-point types, which is now more clearly deferred
entirely to after the expans
This reimplements the aforementioned generic package according to the
requirements of the Ada 2020 RM, namely that To_Big_Real be exact and
that From_Big_Real use the common floating-point conversion rules,
which are round to nearest, ties to even, in GNAT as per IEEE 754.
Tested on x86_64-pc-linu
Replace an access type parameter, which is unusual in the GNAT sources
and more difficult to understand, with a parameter of mode out. Code
cleanup only; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.ads (Compile_Time_Compare): Change para
Enabling checks in the runtime made a latent bug with the sjlj runtime
visible. We used to handle abort deferral differently between GCC ZCX
and GNAT "Front-End" SJLJ, which is no longer the case with GCC SJLJ, so
remove differences to simplify the code and fix the inconsistency.
Tested on x86_64-
The following pragma is currently accepted:
pragma Assertion_Policy (Assertion_Policy => Ignore);
because of what appears to be a typo in a previous commit on this topic.
With this patch the above pragma is rejected as illegal.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
In the listing of assertion kinds accepted for pragma Assertion_Policy
some items were wrongly included while other were missing. Now this
listing is synchronized with Sem_Prag.Is_Valid_Assertion_Kind.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementatio
Default_Initial_Condition was created for SPARK, but has been adopted by
Ada 202x, so now it is an RM defined aspect and an assertion policy.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst:
(Assertion_Policy): Move "Def
Some code currently relies on To_GM_Time returning some reasonable value
in this case rather than e.g. raising an exception and it appears that
Windows returns 1970-01-01 except with second set to -1 (triggering an
exception), while linux returns 1970-01-01 minus 1 second (so 1969-12-31
at 23:59:59
This is only an initial implementation, subject to many limitations.
Some interactions with derived types and inheritance are not
implemented. Other limitations are idenitified in the code with "???"
comments. However, Stable_Properties and Stable_Properties'Class aspect
specifications are implem
This restricts the use of 128-bit division for fixed-point types to
the cases where there is a 128-bit type in the source code, that is
to say this prevents the compiler from using it for 64-bit types.
This is done mainly for the sake of backward compatibility with earlier
compilers not supporting
Similar to what is done for compilation, range checks should not be
applied inside generics during GNATprove analysis. This fixes an
assertion failure in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Selected_Range_Checks): Adapt the condition for
This makes System.Value_R.Scan_Raw_Real round the extra digit it returns
to the caller, so that it is precise to the last 'Aft digits for strings
that are the exact representation of a number, i.e. not already rounded.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/
Replace an access type parameter, which is unusual in the GNAT sources
and more difficult to understand, with a parameter of mode out. Code
cleanup only; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.ads (Compile_Time_Compare): Restore par
When working on LLVM/CCG, we found that the generated tree had a wrong
reference before declaration usage. Fixed for LLVM/CCG. The issue might
still be latent with Modify_Tree_For_C, but this expansion will
disappear in the future, so not worth bothering.
Tested on x86_64-pc-linux-gnu, committed o
When using the Shift_Right operator on negative values (e.g. -1 on a
signed type), the wrong value is incorrectly folded after recent changes
in sem_eval.adb to add compile time evaluation of the shift operators.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (
This fixes a minor oversight in Integer_To_Fixed and restricts the
previous change to System.Value_R.Scan_Raw_Real for the sake of
backward compatibility with earlier conversions of the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuef.adb (Integer_T
Generating an internal subprogram (e.g. array comparison functions)
returning an array, the Transform_Function_Array mechanism gets confused
and references the wrong entities in some cases. Fix this discrepency by
directly transforming these functions into procedures instead of
triggering the gener
In a context where the bounds of an array aggregate are not known, the
aggregate is not allowed to include an "others" choice. The error
message given by GNAT now includes a suggestion to qualify the aggregate
with a constrained subtype to fix the issue.
Tested on x86_64-pc-linux-gnu, committed on
Compiler rejects a use of a name in a subprogram body that appears in a
with_clause, when the name is that of an inherited function for a local
derived type, and is hidden by an explicit declaration of a
non-overloadable homonym, and other homonyms exist in the environment of
the subprogram body.
This removes a superflous processing during the conversion to fixed point.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuef.adb (Integer_To_Fixed): Do not modify numerator
or denominator in order to reduce the exponent.diff --git a/gcc/ada/libgnat/s-v
This patch fixes a bug, where an assignment of the form X(Y).Z := ...
causes the compiler to crash when X does not refer to a visible
declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Error_Msg_NEL): Do not call Set_Posted if errors
are being i
Found by using -gnatVa and Initialize_Scalars on GNAT sources.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dist.adb (RCI_Cache): Initialize.diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb
--- a/gcc/ada/exp_dist.adb
+++ b/gcc/ada/exp_dist.adb
@@ -902,7 +902,7
The compiler rejects an element iterator (for .. of) over a container
that extends a predefined container with additional operations in the
private part, when these added operations overload existing
GNAT-specific private operations used to optimize such loops.
Tested on x86_64-pc-linux-gnu, commi
This fixes an issue when setting the control flags of the serial
communication port. The c_cflag termios field should not be set with the
baud rate. The speed of the communication is set using the c_ispeed and
c_ospeed fields. Setting the baud rate into the c_cflag has unexpected
results as it will
Folding of comparison operators was disabled for GNATprove in assertion
expressions (except for some special cases). However, folding itself is
harmless. The problem was only in the current value optimizer, which
interferes with assertions that act as cut points for proof.
Tested on x86_64-pc-linu
Function P_Formal_Part was unnecessarily calling Scan after calling
T_Semicolon: T_Semicolon is already calling Scan to go past the
comma-used-insted-of-semicolon.
This avoids spurious cascaded errors in case of e.g:
procedure P (A : Integer, B : Integer, C : Integer) is
where ',' is used inst
This patch fixes a bug in which if the expression of an expression
function is a conditional expression of limited type, the compiler
crashes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Expand_N_Object_Declaration): Avoid crash in case
of conditiona
This was overlooked in the original implementation of these types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (-xdr):
Document that XDR is not supported for 128-bit integer types.
* gnat_ugn.texi: R
The -gnateb switch instructs gnat to store configuration pragma files by
their basename in ALI files instead of using absolute paths.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Describe -gnateb switch.
This reimplements the aforementioned generic package according to the
requirements of the Ada 2020 RM, namely that To_Big_Real be exact and
that From_Big_Real use the common conversion rules.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-nbnbre.adb (Float_Convers
These checks are not very costly these days and bring additional safety
and security guarantees built into the Ada language, so enable them by
default.
It turns out that enabling checks on s-bitfie.adb makes a latent
visibility bug appeared on strict alignment platform (related to
alignment checks
This change relaxes the conditions under which the implementation of
ordinary fixed-point types uses only underlying integer instructions.
These conditions are on the Small of the ordinary fixed-point types,
which must now be a rational number whose factors are of a magnitude
bounded relatively to
The existing (SPARK-based) implementation of Default_Initial_Condition
aspects only applies DIC checks based on a type's own DIC (or only one
DIC from an ancestor if the type doesn't specify one, but not from
further up the ancestor chain), but Ada 202x (AI12-0265) specifies that
all DICs of parent
This prevents the expander from creating an access before elaboration
issue for a temporary generated for a range check applied to the
expression of a degenerate extended return statement (an extended return
statement without an explicit do/end construct).
Expand_N_Extended_Return_Statement has go
The procedure Replace_Discr_Ref added a few years ago is overzealous and
triggers in too many cases in the case of multiple records with
discriminants involved. It appears that this procedure is no longer
needed at this stage, so simply remove it.
Tested on x86_64-pc-linux-gnu, committed on trunk
These control characters are mainly causing confusion at this stage,
so remove them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Makefile.in, gcc-interface/trans.c: Remove ^L
characters.diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-in
After recent changes to evaluate logical Shift operations at compile
time, do the same for the more complicated case of
Shift_Right_Arithmetic as well as for Shift_Right/Shift_Left for signed
integers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (Eval_Intrin
This patch implements AI12-0180, so protected subprograms and invariants
are directly visible within Invariant aspects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Visible_Component): Enable this code for task
and protected types, as well as record
Rather than generating a hard error on unknown aspects, generate a
warning which is friendlier wrt compatibility across versions and is
similar to what is done for unknown pragmas.
We keep an error when -gnatd2 is used for now, for strict conformance
until the Ada RM is also changed to allow this
In some case involving a type with a predicate and an inner package with
a subprogram referencing the type, GNAT would call Add_Predicate twice
on the same pragma node, causing tree sharing conflicts.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Add_Predicat
In GNATprove mode we special-case the removal of side effect to do
nothing for object declarations. However, this special casing applied
only to some object declarations; now it applies to all.
This patch only affects GNATprove, where it prevents recursive expansion
of object declaration of a very
It is excessive for Is_Type to guard a call to Is_Discrete_Type, because
both are implemented as Ekind membership test and are equally likely to
fail or succeed.
Part of a cleanup in code related to propagation of subtype predicate
flags.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada
This patch adds the Ada_2020 aspect Aggregate to standard containers
(vectors, maps, and sets) that support the new construct. This patch
also refines the resolution of record vs. container aggregates, and the
resolution of the aggregate primitive Add_Indexed when the given name
corresponds to an e
We've recently found that Scope_Depth_Value is sometimes called on the
wrong nodes.
This is fixed by adding proper assertions and updating the problematic
call.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads, einfo.adb (Scope_Depth_Value,
Set_Scope_Depth_
In routine Process_Subtype we had two calls to Null_Exclusion_Present
(P): one guarded by "Present (P)" and the other by "Nkind (P) in ...".
Now both calls are guarded by the conjunction of those guards.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Process_Su
When a generic package has a private with clause, this clause may not be
properly uninstalled, causing entities to be visible that shouldn't be.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch10.adb (Install_With_Clause): Fix implementation of Ada
2005 AI-262
Refine types to make the code easier to understand. Semantics is not
affected; all the callers have been already respecting the more
restrictive type of parameter anyway.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.ads, sem_ch3.adb (Make_Index): Refined type of
This changes a few runtime units to use explicit bounds based on
Long_Long_Integer instead of maximal values from System, which may
become very large when 128-bit types are supported.
They are used for index types and memory byte counts and, therefore,
the magnitude provided by Long_Long_Integer i
An expression for May_Have_Null_Exclusion variable mirrors an assertion
in Null_Exclusion_Present. The assertion was then extended with another
node kind and so May_Have_Null_Exclusion got out of date.
The May_Have_Null_Exclusion is just a defensive code, so compilation is
not affected.
Tested on
When calling Error_Msg_FE with a message string that contains "<<"
insertion characters, the error reporting machinery was accessing
uninitialized Error_Msg_Warn variable to decide whether to emit error or
a warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.a
Remove a reference to the "depressed stack pointer" method of doing
returns of caller-unknown-size subtypes. DSP was removed from the
compiler years ago.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_Simple_Function_Return): Remove DSP part
of c
The standard storage pool can be specified in a Default_Storage_Pool
pragma or aspect. This new feature is documented in AI12-0003-1.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Adding semantic support of
Standard to Default_Storage
When detecting a type name we must look for both identifiers and
expanded names.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration): Recognize both
identifiers and expanded names; use high-level Is_Scalar_Type
instead of
This patch fixes a compiler abort on a subtype of a fixed-point type
with a 'Small smaller than one. The bounds of a declared subtype of a
fixed-point type where rescaled twice, leading to meaningless values
(constraint-violating) for those bounds.
Tested on x86_64-pc-linux-gnu, committed on trunk
When a function returns a function call, we want to avoid making an
unnecessary copy. This is particularly important because of a bug
which had the effect that when a copy was generated, the copied
object was never finalized. If, as in the case of the example for this
ticket, finalization was being
There are cases involving limited class-wide allocators with an
aggregate that result in if-statements in library-level elaboration
code, where parts of the if-statement can contain a nested subprogram at
the outer level of the statement lists, and the subprogram can make
up-level references to obj
This introduces a new attribute Max_Integer_Size that can only be
applied to Standard and yields the size of the largest supported integer
type for the target. It is primarily intended to implement
System.{Min,Max}_Int.
This also implements a couple of internal helper functions in the
compiler to
This switch has never been very useful nor used in practice, so remove
the associated code complexity.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl, gnat1drv.adb, expander.adb
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_ugn/buildi
An unconstrained array object declaration might require two itypes: for
object definition and for its initial value. Their names do not matter
for the frontend, but GNATprove requires all types to have unique names
(except private/full views).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
Always using the primary stack when concatenating arrays can lead to a
very large stack usage. To alleviate this, if the current scope is
already using the secondary stack, then allocate the temporary object on
the secondary stack as well.
For the time being, this is for string concatenation, sinc
The compiler rejects a declare expression whose declarations are only
object renaming declarations, when the expression references those
local objects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Declare_Expression): Retrieve the created
bloc
This replaces the use of Long_Long_Integer by Standard'Max_Integer_Size
in the definition of Min_Int, Max_Int and Max_Binary_Modulus.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-aix.ads: Likewise.
* libgnat/system-darwin-arm
SPARK Reference Manual has been updated to allow the use of volatile
types and objects without Async_Writers or Effective_Reads in more
places, as these references are not considered as external effects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_G
Implement changes in SPARK RM 9(1): previously an object was
'synchronized' if it was a constant, now constants are only synchronized
if they are not of an access-to-variable type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads, sem_util.adb (Is_Access_Variable
A Boolean aspect Exclusive_Functions is added to the language to change
the semantic of protected functions to use a R/W lock instead of a Read
lock.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* aspects.ads, snames.ads-tmpl: Add support for
Exclusive_Functions asp
Having system.ads in libgnat can cause various kinds of inconsistencies,
so we move it to gcc-interface.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Make-lang.in: Update dependencies on system.ads,
add gnatbind switch -t to avoid timestamp inconsist
When determining the legality of a generic parameter association
for a formal type derived from a type that imposes a discriminant
constraint, the compiler was incorrectly concluding that an actual
type that inherits the constraint of the formal's parent type was
not compatible with the formal type
Refinement of previous patch: the root type must be used for the image
of enumeration types, because the literal map is attached to the root
type even when derivations are present.
Fixes several ACATS and fixedbugs regressions involving 'Image.
Tested on x86_64-pc-linux-gnu, committed on trunk
gc
When a (simple) return statement in a function that returns a class-wide
result type returns a call to a function that returns a specific
result type, do not finalize that function result before returning it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Is_R
This is the first step in supporting [...] notation for aggregates in
-gnatX mode.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-numeri.ads: Remove the greek letter.diff --git a/gcc/ada/libgnat/a-numeri.ads b/gcc/ada/libgnat/a-numeri.ads
--- a/gcc/ada/libgnat/a-n
This patch allows parsing of qualified expressions of the form
T'[...]
where [...] is a new syntax for aggregate in Ada 2020.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch4.adb (P_Name): Allow Tok_Left_Bracket in two places to
call P_Qualified_Expressi
Recent changes exposed that some assertions were too strong, now
relaxed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* scil_ll.adb, sem_scil.adb: Update assertions.diff --git a/gcc/ada/scil_ll.adb b/gcc/ada/scil_ll.adb
--- a/gcc/ada/scil_ll.adb
+++ b/gcc/ada/scil_ll.adb
@
In some cases combining a build in place function call returning a
controlled object, part of another procedure call, if the function call
raises an exception before executing the extended return statement, the
caller would attempt to finalize the build in place result which has not
been initialize
This patch fixes the handling of the Ada_2020 attribute Img when applied
to derived types. If the type is private it is necessary to retrieve a
non-private description of the type structure, by using an underlying
view (which crosses the privacy boundary). The underlying view is that
of the base ty
Type in a view conversion can be both qualified and unqualified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_View_Conversion): Detect qualified types.
* sem_util.ads (Is_Actual_In_Out_Parameter): Fix style in
comment.diff --git a/gcc/ada/
AI12-0262 indicates that the reducer in an attribute reference
'Reduce must be either a binary function with same types for parameters
and result, or else a procedure with an in_out parameter that serves
as an accumulator. The function case includes attributes that are
themselves funxtions: the onl
In particular RM10.2.1(8) states:
5 An elaborable construct is preelaborable unless its elaboration
performs any of the following actions:
...
8 The evaluation of a primary that is a name of an object, unless
the name is a static expression, or statically denotes a
discri
1201 - 1300 of 3273 matches
Mail list logo