The compiler now warns if the condition in a pragma Compile_Time_Warning
or Compile_Time_Error does not have a compile-time-known value. The
warning is not given for pragmas in a generic template, but is given for
pragmas in an instance.
The -gnatw_c and -gnatw_C switches turn the warning on and o
Like Is_Path_Expression, function Is_Subpath_Expression should consider
the possibility that the subpath is a type conversion or type
qualification over the actual subpath node. This avoids spurious
ownership errors in GNATprove.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, c
An Alignment clause or an aspect_specification for Alignment may be
specified as 0, which is treated the same as 1.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-14 Bob Duff
gcc/ada/
* sem_ch13.adb (Get_Alignment_Value): Return 1 for Alignment 0,
and do not give a
This patch fixes a bug where if a protected function has a pragma
Inline, and has no local variables, and the body consists of a single
extended_return_statement, and the result type is an indefinite
composite subtype, and inlining is enabled, the compiler gives an error,
even though the program is
SPARK RM rule 3.10(14) restricts the use of Old and Loop_Entry
attributes on prefixes of an owning or observing type (i.e. a type with
access inside).
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-14 Yannick Moy
gcc/ada/
* sem_spark.adb
This patch modifies the implementation of Functional_Base to damp the
cost of its subprograms at runtime in specific cases. Instead of copying
the entire underlying array to create a new container, containers can
share the same Array_Base attribute. Performance on common use cases of
formal and fun
This fixes a long-standing oddity in the procedure analyzing the
instantiation of a generic subprogram, which would set the
Is_Generic_Instance flag on the enclosing package generated for the
instantiation but only to reset it a few lines below. Now this flag is
relied upon by the machinery which
This change is aimed at speeding up the inlining across units done by
the Ada compiler when -gnatn is specified and in the presence of units
instantiating a lot of generic packages.
The current implementation is as follows: when a generic package is
being instantiated, the compiler scans its spec
This fixes a glitch introduced during the initial OpenACC work import
process, causing crashes on any Acc_Parallel + Acc_Loop combination.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Olivier Hainque
gcc/ada/
* gcc-interface/trans.c (Acc_Loop_to_gnu): Return the opena
This gets rid of a small issue in the inlining machinery: under very
peculiar circumstances, it would add a pending instantiation for the
body of a generic package at the point of call to an inlined subprogram
of the instance. That's theoritically problematic because the saved
context is that of t
Use a constant for the Size_Too_Small_Message, so if it changes, it
won't change in one place but not another. DRY. It might be better to
move this code out of errout.adb, but that's for another day.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Bob Duff
gcc/ada/
* er
This patch fixes an old-standing problem with premature freezing. When a
derived type declaration includes a constraint, we generate a subtype
declaration of an anonymous base type, with the constraint given in the
original type declaration, Conceptually, the bounds are converted to the
new base ty
This patch modifies the handling of warnings on unused formal parameters
of generic subprograms. Previously such warnings were placed on the
formal appearing in the subprogram declaration, in contrast with
warnings on non-generic subprograms, where the warning is placed on the
corresponding entity
When code is inlinined for proof in the special mode for GNATprove, Ada
rules about non-aliasing should still be checked. Now fixed.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Yannick Moy
gcc/ada/
* sem_res.adb (Resolve_Call): Che
This patch refines the predicate that implements rule in RM 9.4 (11.9/2)
Compiling b94.ads must yield:
b94.ads:11:17: illegal overriding of subprogram inherited from interface
b94.ads:11:17: first formal of "N" declared at line 8 must be of mode
"out", "in out" or access-to-variable
-
When warning about length-check failures detected at compile time that
are flagged with "too few elements" or "too many elements", the compiler
now gives an additional message indicating the number of elements
expected by the context versus how many are present in the conflicting
expression (such a
For tagged types not defined at library level that derive from library
level tagged types the compiler may generate code to initialize their
dispatch table of predefined primitives copying from the parent type
data stored in memory after the dispatch table of the parent; that is,
at runtime the ini
The recent introduction of GNAT.Sockets IPv6 support broke support for
VxWorks RTPs due to the use of internal VxWorks kernel calls. This patch
rectifies this by using the VxWorks public API for these routines.
The following RTP should compile successfully on a Development profile
VxWorks kernel t
This fixes a fallout of the recent change keeping the
Is_Generic_Instance flag on the wrapper package built for the
instantiation of a generic subprogram.
There is no need to visit the Instance_Spec of an
N_Subprogram_Instantiation node anymore because the regular processing
for an N_Package_Decla
This fixes a bogus compilation error when a unit with SPARK_Mode
containing a pragma Elaborate_Body is with-ed by a generic unit
containing an inlined subprogram, and front-end inlining is enabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Eric Botcazou
gcc/ada/
*
The new routines convert back and forth between private type OS_Time and
a long integer which can be used in package Ada.Calendar.Conversions
routines to convert to Ada.Calendar.Time.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Dmitriy Anisimkov
gcc/ada/
* libgnat/s-
This change lifts the restriction that was still present in the new
on-demand instantiation scheme for the body of generics instantiated in
non-main units.
The instantiations that are compilation units were still dealt with in
the old-fashioned way, that is to say the decision of instantiating the
This fixes a fallout of a recent change clearing the
Is_Generic_Actual_Type on the implicit full view of a private actual
type in an instance. This flag is used to help disambiguating formal
types instantiated on the same actual type within an instance, but it
should be cleared outside the instanc
This patch fixes a compiler abort on an object declaration for a
class-wide type whose expression is a call to an expression function
that returns type extension.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-19 Ed Schonberg
gcc/ada/
* sem_res.adb (Resolve_Call): A call t
This patch corrects the code generated by the -gnateV switch in the case
of a private type whose full type is a modular type, removing spurious
run-time failures.
In addition, this corrects the initialization of exception occurrences
in exception handlers to avoid leaving data uninitialized, which
If the -gnatwf switch is used to activate warnings on unreferenced
formal parameters, the warning is no longer given if the subprogram is
dispatching, because such warnings tend to be noise. It is quite common
to have a parameter that is necessary just because the subprogram is
overriding, or just
This patch enables gap detection in type extensions.
With the -gnatw.h switch, on 64-bit machines,
the following test should get warnings:
gcc -c gaps.ads -gnatw.h
gaps.ads:16:07: warning: 48-bit gap before component "Comp2"
gaps.ads:17:07: warning: 8-bit gap before component "Comp3"
package Gap
This patch adds a formal function parameter "=" (L, R : Element_Type) to
SPARK containers. The equality that is used by default for Element_Type
after this patch is the primitive equality and not the predefined any
more. It also allows to use any function with the appropriate signature
for the equa
Generate target-dependent info into a file named ada_target_properties.
This information is used by tools for static analysis: they need to know
the size of standard types for a given run-time library. This metadata
is meant to be saved at the root of the run-time directory.
Tested on x86_64-pc-li
The patch gives an error message on "for T'Object_Size use 0;".
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* sem_ch13.adb (Object_Size): Give an error for zero. It really
rubs me the wrong way that we don't honor "for T'Object_Size use
Years ago, we adapted Get_Kind_Of_Unit so that gnatprove could use it to
detect both bodies and specs of predefined units.
However, this wasn't really needed: gnatprove could simply reuse
Lib.In_Predefined_Unit and now it does. This patch simply reverts two
commits mentioned above.
No frontend te
This patch makes the temp for initialization of an atomic variable be
constant.
No change in behavior; no test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
initialization of the atom
The compiler usually warns on Unchecked_Conversion between types with
mismatched sizes. This warning is now extended to the case where the
target type is a zero-sized array.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* sem_ch13.adb (Is_Null_Array):
This change is aimed at removing a couple of linear searches in the
units management code that can become problematic performance-wise when
the number of loaded units is in the several hundreds, which can happen
for large files even at -O0 without any inlining.
It introduces an auxiliary hash tabl
Pragma Warning_As_Error now works for style warnings (messages that
start with "(style)", enabled by -gnaty) the same way it works for
regular warnings enabled by -gnatw.
The following test should fail to build with style checks:
gnat.adc:
pragma Warning_As_Error ("two spaces required");
style.
This patch fixes a spurious visibility error on a dispatching call to
a subprogram with a classwide precondition, when the call qppears in
the same declarative part as the subprogram declaration itself.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Ed Schonberg
gcc/ada/
If a variable has pragma Persistent_BSS, the compiler now automatically
suppresses implicit initializations caused by Initialize_Scalars and
Normalize_Scalars. Variables with Persistent_BSS cannot be initialized,
and previously a pragma Suppress_Initialization was required before the
pragma Persist
Where possible GNAT will store the binary representation of a record
aggregate in memory for space and performance reasons. This
configuration pragma changes this behaviour so that record aggregates
are instead always converted into individual assignment statements.
The following package pack.ads:
If the delta_aggregate feature is used, the -gnat2020 or -gnatX switch
must be given.
The following test must get an error if neither
-gnat2020 nor -gnatX is specified:
gcc -c delta_aggregate.ads -gnat2012
delta_aggregate.ads:4:18: delta_aggregate is an Ada 202x feature
delta_aggregate.ads:4:18:
This instructs -gnatR4 to also list the Etype of a user-declared record
subtype if it is compiler-generated, for example in:
package P is
type U_Arr is array (Integer range <>) of Character;
type Rec1 (D1, D2 : Integer) is record
C : U_Arr (D1 .. D2);
end record;
type Rec_N is
When expanding a loop entry attribute for a while_loop we construct a
function that incorporates the expanded condition of the loop. The
itypes that may be generated in that expansion must carry the scope of
the constructed function for proper handling in the backend.
Tested on x86_64-pc-linux-gnu
The Delete operations in the bounded ordered containers have been
substantially sped up. No change in semantics, so no test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* libgnat/a-cborma.adb, libgnat/a-cborse.adb (Clear): Repeatedly
call D
The generated code has been improved so that aggregates with <> are more
efficient. No change in behavior; no test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* exp_aggr.adb (Expand_Array_Aggregate): Use build-in-place in
the nonlimited ca
It's illegal to call a function with a result of an immutably limited
type inside a type conversion that's used in one of the special contexts
that allow such a function call by itself (see RM 7.5 (2.1-2.10)), such
as in the initialization expression of an object declaration. The
compiler was recur
Routine Build_DIC_Procedure_Declaration appears to be heavily inspired
by Build_Invariant_Procedure_Declaration; they both wrap an expression
attached to a type inside an internal procedure. Initially none of them
were calling Set_Last_Entity.
For Build_Invariant_Procedure_Declaration this was fix
The special expansion done in GNATprove mode should be adapted to slices
where the prefix has access type, like indexed expressions.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Yannick Moy
gcc/ada/
* exp_spark.adb (Expand_SPARK_N_S
The modification to round time up to even second was added decades ago.
It was done to avoid unneeded recompilations when the project was built
on non-FAT filesystems and then moved to FAT filesystems. Such a
situation is now very rare and does not deserve time distortion.
Tested on x86_64-pc-linu
This patch fixes a crash on an aspect specification for Storage_Size for
a type T when the expression for the aspect depends on attributes of a
previously declared type that is not frozen yet. The temporary
declaration that captures the value of the aspect must be part of the
actions attached to t
The compiler now generates faster code for functions that return
discriminated types in many cases where the size is known at compile
time.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-20 Bob Duff
gcc/ada/
* exp_ch6.adb (Needs_BIP_Alloc_Form): Call
Requires_Trans
The compiler can now warn for out-of-order record representation
clauses. A warning is given if the order of component declarations,
component clauses, and bit-level layout do not all agree. The warning
is disabled by default, and may be enabled by the -gnatw_r switch.
Tested on x86_64-pc-linux-g
The compiler crashes processing an internally generated cloned tree that
has a subprogram call with a named actual parameter.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Javier Miranda
gcc/ada/
* sem_util.adb (Update_Named_Associations): Update
First_Named_Ac
Allow values of negative one to be accepted as a valid parameter as a
special case.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Justin Squirek
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst: Modify
documentation to reflect expected behavior.
Ownership checking done as in GNATprove should ignore address of
subprograms, as it applies only on objects. Now fixed.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Yannick Moy
gcc/ada/
* sem_spark.adb (Process_Path): Do nothing on
In the case of a task declaring an entry with an aliased formal
parameter of a limited class-wide type, the front end was creating a
master object (_master) for the access type generated for such an entry
formal inside the task specification, even though such access types
don't need an associated m
This fixes a (sub)type mismatch in the expansion of an extended return
statement generated for a built-in-place function that doesn't need a
BIP_Alloc_Form parameter but returns unconstrained.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Eric Botcazou
g
GNATprove analyzer for SPARK code depends on the frontend to accurately
propagate the known value of Size attribute. This was not done for
formal type parameters in generic instantiations. Now fixed.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21
This fixes an assertion failure on the instantiation of a generic
package on a type derived from the private view of a protected type,
ultimately caused by Finalize_Address returning Empty for the subtype
built for the generic actual type of the instantiation.
Finalize_Address has a special proces
'read' system call may be interrupted by signal with 'errno' is set to
EINTER. In this case, re-try a few times.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Vadim Godunko
gcc/ada/
* libgnat/g-expect.adb (Expect_Internal): Attempt to read
several times when 'r
This instructs -gnatR4 to also list the Etype of components in
user-declared record types if it is compiler-generated, for example in:
package P3 is
type idx is range 1 .. 100;
type Arr is array (Idx range <>) of Character;
type Rec is record
C : Arr (1 .. 5);
end record;
It was unusual for the analysis phase of compiler to rewrite static
expression of pragma Entry_Queue_Length with its value. This typically
happens when expanding the AST and only if needed for a given backend.
In particular, GNATprove doesn't need such an expansion and actually
needs the unrewritte
GNATprove directly handles non-null access checks, and requires that the
frontend does not insert explicit checks in the form of conditional
exceptions being raised. Now fixed.
There is no impact on compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-08-21 Yannick Moy
gcc/ada
This fixes a long-standing issue in the compiler which would return
a wrong value for the Size attribute applied to slices of bit-packed
arrays whose size is not a multiple of the storage unit.
The problem is that the computation was done in the code generator
after the bit-packed array had been i
Avoid calling Copy_Bitfield if there are volatile or independent
components that might be read or written. The test is conservative.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Bob Duff
gcc/ada/
* exp_ch5.adb (Expand_Assign_Array_Loop_Or_Bitfield): Add tests
...in cases where the Val_2 might cross a page boundary, and the second
page is now known to exist.
Copy_Bitfield is still disabled in the compiler: no test possible.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Bob Duff
gcc/ada/
* libgnat/s-bituti.adb (Get_Val_2, Se
Sock_Addr_Type has Family_Unix variant now. This variant can be created
with function Unix_Local_Addr call. And this variant is working in
GNAT.Socket routines where it is appropriate.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Dmitriy Anisimkov
gcc/ada/
* gsocket.h
This should fix PR ada/91268 by only defining macros if not already
done.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Arnaud Charlet
gcc/ada/
* adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.--- gcc/ada/adaint.c
+++ gcc/ada/adaint.c
@@ -35,8 +35,14 @@
This patch adds support for the use of raise expressions in more
limited contexts (as described in the Ada Isssue AI12-0172).
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Javier Miranda
gcc/ada/
* exp_ch3.adb (Build_Record_Init_Proc): Do not generate code to
a
When verifying that the meaning of an aspect has not changed between the
freeze point of the entity and the end of the declarations, we analkyze
a copy of the expression to verify its conformance to previous analysis.
If the expression contains overloaded references, these have to be
resolved, whic
'poll' returns -1 in case of any error (including interruption by a
signal), so call need to be repeated few times to avoid false failures.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Vadim Godunko
gcc/ada/
* libgnat/g-expect.adb (Expect_Internal): Try to call 'poll'
Clarify the documentation for Stack_Usage (both comments in the code,
and user documentation) to note that tools like Valgrind won't work.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Bob Duff
gcc/ada/
* doc/gnat_ugn/gnat_and_program_execution.rst: Clarify
doc
Old versions forced even file timestamp in Windows in
GNAT.OS_Lib.GM_Split implementation. We removed this time distortion in
GNAT.OS_Lib.GM_Split a few commits. But gprbuild became unnecessary
recompiling the sources in 50% cases, when the source has odd file
timestamp. This commit is restoring th
Add a utility routine for detecting attribute 'Old. It will be
immediately reused in the GNATprove backend.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Piotr Trojanek
gcc/ada/
* sem_util.ads, sem_util.adb (Is_Attribute_Old): New utility
routine.--- gcc/ada/se
Function Scaled_Divide in s-arith runtime unit computes the combined
multiplication and division of its arguments ((X*Y) / Z). In a very
special case where the quotient computed before rounding is 2**64-1,
then rounding may lead to undesirable wrap-around, leading to a computed
quotient of 0 instea
This fixes a recent regression introduced in the machinery giving style
warnings: the -gnatyN switch no longer cancels an earlier -gnaty switch
for separate compilation units.
Running this command:
gcc -c slib.adb -gnatyaAbcefhiIklmM25OnprStux -gnatyN
On the following sources:
package Slib is
Sem_Util.Wrong_Type usually emits an error message, but in some cases it
does not. The code which prevents emitting an error message was going
too far in some cases, causing illegal constructs to be accepted. For
example, a qualified expression such as Integer'(null) might be passed
in as an actual
The character type comment in exp_dbug.ads documented the QU and QW
encodings, but did not document the plain "Qc" encoding, where 'c' is
the character itself. This patch updates the comment to follow the
implementation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Tom Tromey
Fixed-point multiplication, division and conversion may lead to calling
the function Double_Divide in s-arit64 runtime unit. In the special case
where arguments have the special values X = -2**63 and the absolute
value of the product of its other arguments Y*Z = 2**64, the rounded
value should be e
Multiple comments in functions Double_Divide and Scaled_Divide were
incorrect. Now fixed.
Also change the expression (if Zhi /= 0 then Ylo * Zhi else 0) to the
simpler equivalent (Ylo * Zhi) in Double_Divide.
Also add a comment explaining why the implementation of Algorithm D for
multiple-precisi
We use Long_Long_Integer'Size / 2 instead of 4 * 8 to support
specifying a target configuration file where the largest integer is
32 bits instead of 64.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Arnaud Charlet
gcc/ada/
* libgnat/s-bitfie.ads (Val_Bits, Val_Bytes):
A primitive for removing a mapping from a functional map has been added.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Claire Dross
gcc/ada/
* libgnat/a-cofuma.ads, libgnat/a-cofuma.adb (Remove): New
function which returns a copy of the input container without
This patch adds assertions to ensure that the frontend passes to the
backend the right number of extra parameters required for build in place
function calls. No functional change.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Javier Miranda
gcc/ada/
* exp_ch6.ads (Need
In GNATprove, local subprograms without contracts are candidates for
inlining, so that they are only analyzed in the context of their calls.
This does not apply to dispatching operations, which may be called
through dispatching, in an unknown calling context. Hence such
operations should not be con
This change only affects GNATprove backend, where it avoids spurious
errors on missing ALI files for units indirectly withed from the current
unit and processed as part of a different .gpr project.
No test provided, because only GNATprove is affected.
Tested on x86_64-pc-linux-gnu, committed on t
'Close' subprogram of GNAT.Expect can close irrelevant file descriptors
when 'Expect' was terminated by Process_Died exception and any file open
operations was done before call to 'Close'.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Vadim Godunko
gcc/ada/
* libgnat/g
This change only affects the SPARK toolset. In the part of semantic
analysis enforcing ownership rules for SPARK, it corrects a crash in
analysis of a declaration of a local borrower whose definition is a
chain of several calls to traversal functions.
Tested on x86_64-pc-linux-gnu, committed on tr
Function Double_Divide computes the division of its parameters
(X / (Y*Z)) in a way that avoids overflows on signed integers, except in
two specific cases, when X = -2**63, abs(Y) = abs(Z) = 1 (leading to an
overflow in -To_Int(Qu)) and when X = -2**63 and Y*Z is large enough
that Qu=0 and so the r
The frontend silently skips propagating attribute Is_Tagged_Type to the
constrained corresponding record subtype associated with a protected
type or task type with discriminants. This change does not affect the
functionality of the compiler; it leaves more clean the decoration of
internal entities.
This pragma has been long obsolescent and confuses users.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-17 Ed Falis
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst: Remove
section.
* gnat_rm.texi, gnat_ugn.texi: Regenerate.
patch.diff.gz
Descrip
In GNATprove, a borrow during package elaboration is illegal, but a
crash could be issued when analyzing the corresponding declaration. Now
avoid analyzing the declaration in that case.
There is no test as this does not impact compilation.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-0
The frontend silently skips propagating attributes Has_Predicates and
Predicate function to the internally built cloned subtype. This change
does not affect the functionality of the compiler; it leaves more clean
the decoration of internal entities.
Tested on x86_64-pc-linux-gnu, committed on trun
An error message mentions "gnamake", where it meant to mention
"gnatmake".
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-18 Tom Tromey
gcc/ada/
* make.adb (Initialize): Fix typo.--- gcc/ada/make.adb
+++ gcc/ada/make.adb
@@ -3789,7 +3789,7 @@ package body Make is
In function Copy in Ada.Containers.Bounded_Ordered_Sets and other
bounded containers packages, remove a possible use of an uninitialized
variable. This was not a bug, because the uninitialized variable could
be used only if checks are suppressed, and the checks would have failed,
leading to erroneo
This fixes the wrong errno for rename when the file is not existing on a
dosFs. In the end it makes Ada.Directories.Rename raising the right
exception in the case we are trying to move a file in a non existing
directory.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-18 Frederic Konra
Rename global constants from I to J. No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-09-18 Claire Dross
gcc/ada/
* libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
Keys_Included, Keys_Included_Except): Rename loop indexes and
global c
The dwActiveProcessorMask field in a SYSTEM_INFO structure on Windows
should be DWORD_PTR, an integer the size of a pointer.
In s-win32, it is currently declared as DWORD. This happens to work on
32bit hosts and is wrong on 64bit hosts, causing mishaps in accesses to
this component and all the fol
This patch fixes an issue whereby assignments from anonymous access
descriminants which are part of stand alone objects of anonymous access
did not have runtime checks generated based on the accessibility level
of the object according to ARM 3.10.2 (12.5/3).
Tested on x86_64-pc-linux-gnu, committe
In sem_eval.adb, we have an assertion that the type of a "null" literal
is an access type. It turns out that this assertion can fail when
processing an illegal program, e.g. one that contains something like
"Integer'(null)". This leads to differences in the compiler's generated
output for such tes
Create a separate routine in Exp_Util for deciding the value of the
Constrained attribute when it is statically known. This routine is used
in Exp_Attr and will be reused in the backend of GNATprove.
There is no impact on compilation and hence no test.
Tested on x86_64-pc-linux-gnu, committed on
Previous change in that procedure to handle overflow issues during
scanning removed the special handling for trailing zeros in the decimal
part. Beside the absence of overflow during scanning the special
handling of these zeros is still necessary.
Tested on x86_64-pc-linux-gnu, committed on trunk
This patch fixes an issue whereby subprograms with anonymous access
formals may trigger spurious runtime accessibility errors when such
formals are used as actuals in calls to nested subprograms.
Running these commands:
gnatmake -q pass.adb
gnatmake -q fail.adb
gnatmake -q test_main.adb
g
2001 - 2100 of 3426 matches
Mail list logo