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/
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
1101 - 1200 of 3386 matches
Mail list logo