This is useful in particular to be able to mark a formal parameter of an
expression function as unreferenced:
function F (Param : Integer with Unreferenced) return Integer is (1);
We also add the infrastructure to support other aspects on formal
parameters in the future.
Put this feature unde
Parameters of Constrain_Decimal, Constrain_Enumeration, etc. routines
are type entities, which is now reflected in the parameter type. Cleanup
only; behavior is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Constrain_Decimal, Constrain_Enumeration,
The VxWorks kernel implementation of __gnat_environ was more convoluted
than it needed to be and had an unneeded dependency on ppGlobalEnviron,
a symbol which Wind River has removed in newer versions of VxWorks. This
patch simplifies the implementation and uses a common implementation for
both VxWo
Capacity_Error should be raised on insertion inside a formal vector when
the capacity is exceeded.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cofove.adb (Copy): Add explanation in case of
Capacity_Error.
(Insert_Space): Raise Capacity_Error if
The modification file time precision now defined by OS.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.c (__gnat_file_time): New routine.
(__gnat_copy_attribs): Copy timestamps in nanoseconds.
* libgnat/a-direct.adb (C_Modification_Time): Bind to
GNAT emits references to GNAT-generated entities when generating
finalizers. These references are protected by a counter. GCC is unable
to detect that the counter protects these references and emits warnings
when -Wmaybe-uninitialized is used.
This is a problem because users can't do anything to p
Minimum accessibility level was stored in a variable which was never
modified. It seems cleaner to store it in a constant, which hopefully
allows better optimization (e.g. when tracking know object the value of
a variable is killed on a subprogram called).
No impact on compiler behaviour, expect p
VxWorks 7 provides newer APIs for kernel mode for accessing environment
variables that lead to smaller and more efficient code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* env.c (__gnat_setenv): call setenv for VxWorks 7 kernel mode.
(__gnat_environ): envGet take
This fixes a bogus error recently introduced in the compiler for a
bit-packed array component in a record type with Volatile_Components
aspect on the array definition. The array type should not be deemed
requiring strict alignment, although it is a by-reference type.
Tested on x86_64-pc-linux-gnu
This patch fixes an error in the compiler whereby extra accessibility
level actuals did not get expanded properly in calls - leading to
mislabed parameter associations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_Call_Helper): Modify calls to
The -mthreads flag is no longer needed. It was deprecated in 2.2.4 and
in 2.2.5 causes the linker to reference a non-existent directory.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-osinte__lynxos178e.ads: Remove -mthreads switch.diff --git a/gcc/ada/libgnarl/
When expansion was disabled, e.g. in GNATprove mode or when switch
-gnatc was used, analysis of the iterated_component_association's
expression was crashing when the expression included a function call.
The problem was that a copy of the expression was created with empty
parent. Then an access-be
This replaces the manual retrieval of the freeze node for the enclosing
body of the generic with a mere call to Package_Freeze_Node.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Freeze_Subprogram_Body): Call
Package_Freeze_Nod
When a protected subprogram invokes a function that returns a limited
type, and the sources are compiled with pragma Detect_ Blocking, the
code generated by the compiler erroneously invokes the runtime service
Activate_Tasks, call which is detected by the runtime as a potentially
blocking call (as
A code for detecting illegal OTHERS clause is handles both
component_association and iterated_component_association, whose choice
list must be accessed with Choices and Discrete_Choices, respectively.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Arra
In the case where a function call
a) has a non-limited result type that requires finalization; and
b) the callee has an out-mode (or in-out-mode) formal parameter; and
c) the corresponding actual parameter's subtype is subject to an
enabled predicate
, fix a compiler bug that could cause
Processing of index parameters in iterated_component_association was
different within array aggregates (where we created a synonym
identifier) and array delta aggregates (where we used the existing
defining identifier). Apparently, we can use the existing defining
identifiers in both cases.
This
When post call actions are created for a call to a function with a
result of a controlled type, such as for performing an invariant check
on a parameter with mode out or in out, the compiler can violate an
assertion (or crash with a Storage_Error) due to not recognizing the
expanded call as a funct
This prevents the compiler from giving an error message when the new
Long_Long_Long_Size entry is missing in a target configuration file.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* set_targ.adb (DTN): Fix oversight.
(Read_Target_Dependent_Values): Do not error o
This patch adds pragma Assert to help CodePeer static analysis and
pragma Annotate to ignore Intentional or False_Positive warning.
Furthermore, some minor changes were added to take into account CodePeer
finding.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-car
This prevents Freeze_Subprogram_Body from moving the freeze node of a
package body outside of its scope when it contains the instantiation
of a generic subprogram and the parent of the package body happens to
be in the same declarative part as the freeze node of the scope of the
generic subprogram.
When checking legality of the iterated_component_association's
expression the index parameter must be in scope, even its range is null.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Gen_Loop): Analyze copy of the expression in the
scope of the implici
The new 128-bits integer support requires adapting the special target
configuration file used for CodePeer and SPARK analysis. One change was
missing in Width_From_Size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ada_get_targ.adb (Width_From_Size): Add case for 128 bits
Some gcc versions (4 or less) support the __builtin_*_overflow
routines while corresponding g++ compilers do not.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.c (__gnat_file_time): Use regular arithmetic instead of
__builtin_*_overflow routines if GCC versi
Jorvik was meant to include the restrictions
No_Implicit_Task_Allocations and
No_Implicit_Protected_Object_Allocations but they accidentally got
overlooked during the standardisation of the GNAT_Extended_Ravenscar
profile. These restrictions are important as they allow us to statically
determine th
Confusing error messages are emitted about arguments when erroneously
using the import/convention aspect. This is caused by GNAT turning
aspects into pragmas and then emitting error messages about pragmas.
This is fixed by checking if the pragma comes from an aspect
specification and emitting a di
Reduce visibility of variables in procedure Check_Unused_Withs by moving
them to a nested procedure Check_One_Unit. Code cleanup; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Check_Unused_Withs): Move local variables from
to
The compiler confuses itself because it generates a range check in Float
whose upper bound is 2 ** 128, but this number is larger than the largest
number representable in Float so it triggers an error when converted to
Float as part of the check.
The fix is to saturate the upper bound of the check
This patch completes the handling of predefined bounded containers,
including indexed containers with iterated_component_associations. The
size of the constructed object is taken from the size of the aggregate
if it can be determined statically, and otherwise uses the default value
for the given p
Using the Suppress aspect results in a crash. This is caused by the
incorrect transformation of the Suppress aspect into its pragma
equivalent: the entity and check name were inverted. We use this change
as an excuse to turn Make_Aitem_Pragma into a function that returns a
new value instead of cha
The code would correctly distinguish the entity from the selected
component case but not use the result of the analysis in the latter
case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Eval_Attribute): Fix oversight for Bit_Position.diff --git a/gcc/ada/sem_
Reuse Append_New_To when expanding pragmas and appending code to
possibly empty lists of statements. This is equivalent to checking it
the list exists, allocating a new list if necessary, and appending to
it.
Code cleanup only related to implementation of aspect
Subprogram_Variant, which is simila
The resolution rules for container aggregates can lead to ambiguities
when homonym subprograms have a formal of a composite type, and the
actual in a call is an aggregate. This patch adds an indication that
this aggregate should be qualified to remove the ambiguity.
Tested on x86_64-pc-linux-gnu,
An attempt to reference a streaming attribute of a type that has no
corresponding attribute definition is typically rejected at compile
time. For example, if a task type T lacks a user-defined Read
attribute, then a reference to T'Read is illegal. However, obscure ways
to bypass these legality rul
The two arms of the conditional construct have been the same for 25 years.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_fixd.adb (Fpt_Value): Fold if-then-else with identical arms.diff --git a/gcc/ada/exp_fixd.adb b/gcc/ada/exp_fixd.adb
--- a/gcc/ada/exp_fixd.adb
+++
Casing issues are not detected when using `-gnaty` if the keyword does
not start with a capital letter. This is fixed by checking if any letter
in the keywoard is uppercase.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* scng.adb (Scan): Check if any letter of the token is
This documents that the Has_Constrained_Partial_View flag now explicitly
applies to the base type only.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads (Has_Constrained_Partial_View): Add "base type" marker.diff --git a/gcc/ada/einfo.ads b/gcc/ada/einfo.ads
--- a/g
AI12-0280 has already been mostly implemented, but some interactions
with container aggregates were not initially implemented. In
particular, RM 6.1.1's mention of "the expression of a
container_element_association" in the definition of the term "repeatedly
evaluated" needs to be reflected in the
AI12-0095 is a binding interpretation that revises the RM to have a
general rule about how generic formal discriminated types are considered
to have a constrained partial view within generic bodies, rather than
just have this rule appear in the sections of the RM on Access
attributes and type conve
Iterator filters can appear in loop parameter specifications and
in iterator specifications, and thus in Iterated_Element_Awsociations
in container aggregates. This patch extend the parsing and expansion
of Iterated associations, to better distinguish the Ada_2020 construct
from the Ada_2012 Iterat
The CUDA bindings change very frequently, sometimes changing the
underlying representation of types. In order to reduce the amount of
work needed in the compiler on each CUDA update, we make GNAT infer the
types it needs instead of hard-coding them.
Tested on x86_64-pc-linux-gnu, committed on trun
This patch removes much of the logic relating to static and dynamic
accessibility level checks and replaces it with a simplified and
centralized implementation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Accessibility_Check): Modify condition to
In order to reflect that the size limit is System_Max_Integer_Size now.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.ads (Check_Compile_Time_Size): Adjust size limit.diff --git a/gcc/ada/freeze.ads b/gcc/ada/freeze.ads
--- a/gcc/ada/freeze.ads
+++ b/gcc/ada/freeze.
This enables the build of the support units for 128-bit integer types
in the full runtime of 64-bit platforms.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (64-bit platforms): Add GNATRTL_128BIT_PAIRS to
the LIBGNAT_TARGET_PAIRS list and also GNATRTL_
This patch fixes an error in the compiler whereby the accessibility
level for explicit type conversions from an anonymous access object to a
named access type led to spurious runtime accessibility errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Accessib
AI12-0211 introduces two new legality rules. The first says that if a
nonoverridable aspect is explicitly specified for a type which also
inherits that aspect from another type (an ancestor or a progenitor),
then the explicit aspect specification shall be confirming. The second
says that if a type
This enables the support of 128-bit integer types by default on 64-bit
platforms (except for BB ports): the -gnate128 switch is removed and
the debug switch -gnatd.H can now be used to disable again the support.
Technically speaking, apart from the obvious effect on integer types,
this will bump t
Some Ada front-end files had a runtime license exception header, which
is not needed since these files are pure compiler (tool) files, and not
runtime files.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* alloc.ads, aspects.adb, aspects.ads, atree.adb, atree.ads,
ca
Originally the allowed combinations of external properties (i.e.
Async_Readers, Async_Writers, Effective_Writes and Effective_Reads) were
described in the SPARK RM as a sequence of conditions. Then they have
been rewritten as a table and now the correspondence between description
in the SPARK RM an
Routine Analyze_External_Property_In_Decl_Part, which deals with pragmas
Async_Readers, Async_Writers, Effective_Reads, Effective_Writes,
returned early when the pragma has been already analyzed. When this
happened, its output parameter Expr_Val was set to False no matter what
the pragma argument w
This lifts the condition of the presence of s-arit128.ads in order to
enable the support for 128-bit integer types on 64-bit platforms, the
rationale being that this mirrors the support for 64-bit integer types
on 32-bit platforms, which is always enabled.
Tested on x86_64-pc-linux-gnu, committed
An object of a nominal unconstrained array type may be given a subtype
by initialization with an aggregate with specified bounds and box
initialization. The freezing of the object copies the aggregate into
the object, which propagates uninitialized values if the component type
has no default specif
This patch fixes a "comes from source" calculation needed for
determining the innermost master scope depth.
Also, this patch fixes issues calculating accessibility for function
calls which initialize objects in their entirety.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
When a tagged type erroneusly defines primitives by means of renaming
subprograms that require overriding, the compiler properly reports the
error; however, it also reports bogus errors indicating that the
renaming declaration must be overridden.
Tested on x86_64-pc-linux-gnu, committed on trunk
This patch fixes a compiler abort on an expression function that is a
completion, when the expression includes function calls and dereferences
and the result is an access type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Type_Refs): Add guard on freezi
When expanding pragma CUDA_Execute, the compiler declares temporary
variables to capture the value of the pragma's arguments. These
declarations's type is inferred from the pragma's arguments type,
because said arguments could be integers of CUDA.Vector_Types.Dim3s.
Inferring the type of these dec
The previous version of the CUDA bindings had a C_Pass_By_Copy
convention on its definition of the Dim3 type. The new version doesn't.
This change causes ABI issues in generated binaries.
In order to avoid needing changes in the compiler every time the
public bindings are updated, a new Dim3 type
In cases involving instantiations and formal packages, a call to an
abstract nondispatching subprogram within an instantiation, where
the operation comes in via the actual for a formal package, was
not being flagged with an informative message on the instantiation.
(A program could potentially comp
When resolving iterated_component_association that occurs within
delta_aggregate, we create an implicit loop which should act as a scope
for the index parameter entity. However, the name of this entity was
entered before pushing the scope of the implicit loop, so the index
parameter was visible out
Expansion of array delta_aggregate in GNATprove mode needs handled
ranges and expressions (including type identifiers), but not
subtype_indications (e.g. "A with delta Integer range 1 .. 10 => 0").
Also, call Apply_Scalar_Range_Check didn't seem necessary for ranges and
likewise it makes no differ
When using .C_Streams.Open with a null Name, the File will be
incorrectly set as a temporary file, causing a wrong attempt to delete
it when closing it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-fileio.adb (Open): Fix setting of Tempfile.diff --git a/gcc/
In some cases involving a package spec using object.method notation
in e.g. subprogram aspects, an old change in Complete_Object_Operation
would disable the proper detection of an unused "with" clause.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Complete_Obj
When compiling iterated_component_association, the analysis, resolution
and range checking is done when expanding aggregate into assignments.
This is now mirrored in the custom expansion for GNATprove, so that the
backend sees a fully decorated (but unexpanded) AST.
Tested on x86_64-pc-linux-gnu,
When the Image attribute is applied to an enumeration type subject to
pragma Discard_Names, the underlying numeric value is printed instead
of the string of the literal and this is done by invoking the Image
routine of Long_Long_Long_Integer, which is overkill in the context.
Tested on x86_64-pc-l
To prevent ambiguities in the use of predefined containers in legacy
code, the resolution of aggregates must ignore the presence of the
Aggregate aspect when the compilation version is earlier than Ada_2020.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resol
GNAT started generated a new legitimate warning on g-socthi__mingw.adb:
g-socthi.adb:395:19: warning: condition is always True
After further investigation, it appears that Original_WFS was
unconditionally dereferencing Writefds without first checking against null.
Tested on x86_64-pc-linux-gnu, c
Implement wait on set of sockets to become ready to perform I/O
operations. Current implementation of the similar functionality with
type Selector_Type and Check_Selector routine in GNAT.Sockets package is
limited by 1024 sockets. New implementation limited only by process
limit on number of open
This patch implements AI12-0035, AI12-0335, AI12-0345, AI12-0372, and
partially Ada2012-A235 and fixes many holes in accessibility checking.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Accessibility_Check): Skip checks against
the extra accessib
We had code that was trying to read an existing ALI files to extract
information in -gnatc mode, mainly for ASIS use. Remove this code which
is no longer needed and might even cause hard to understand effects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.ads, lib
In pragma Contract_Cases argument only "CASE_GUARD => CONSEQUENCE"
clauses are allowed. Once we know that the pragma argument is an
N_Aggregate, we checked if it has component associations; now we also
check that it has no expressions.
Same for the argument of the Subprogram_Variant contract, whos
This removes the now obsolete legality rules specified by AI12-0128
and replaces them with the new legality rules specified by AI12-0363
pertaining to nonatomic subcomponents of full access types and objects.
This also introduces the new aspect Full_Access_Only in Ada 2020 mode
and revamps the imp
The Digits_From_Size and Width_From_Size functions of Get_Targ, as well
as the *_Width and *_Digits constants of Ttypes, have been unused for a
while in the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ada_get_targ.adb (Digits_From_Size): Delete.
(Width_
This unit added recently generate legitimate warnings which were not
caught because this file had not been added to Makefile.rtl.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-spogwa object.
* libgnat/g-spogwa.adb: Fix
This patch allows the compiler to handle array aggregates with more than
two dimensions, when the aggregate includes nested
Iterated_Component_Associations for sub-aggregates. These constructs are
expanded into a loop that contains a copy of the expression. Previously
their semantic analysis was do
This new flag is introduced to enable the transformation of function
returning constrained arrays into a procedure separately from
Modify_Tree_For_C for easier reuse.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb, freeze.adb, gnat1drv.adb, opt.ads, sem_ch6.adb
GNAT only partially analyzes iterated_component_associations within
array aggregates, as they are fully analyzed when expanded into loops.
GNATprove must therefore analyze iterated_component_associations as part
of its custom expansion. This only worked for one-dimensional array
aggregates; now it
on the list. Thank you
again for your contribution.
--
Pierre-Marie de Rodat
There several more missing cases of needing to reinitialize
Stored_Contraint when changing Etype from an incomplete type to
a modular or array type (where the field is Original_Array_Type).
Also, include the node number in the -gnatd_v output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
An aggregate of a type that has a variant part has to satisfy certain
rules about the discriminant value governing that variant part. If these
rules are violated, then the front end typically emits a message
associated with the discriminant value. However, this is not useful in
the case where the d
The next Ada standard will finally be Ada 2022, so update references to
Ada 2020 and 202X accordingly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads, errout.adb, errout.ads, exp_aggr.adb, exp_ch5.adb,
exp_ch6.adb, exp_ch8.adb, exp_ch9.adb, exp_imgv.adb,
When processing an access type declaration that completes an incomplete
type, we now cleanly switch to a proper access type before setting the
designated type. This simplifies the previous ad-hoc machinery for error
recovery, which actually didn't work when the completion as an access
type referenc
This patch fixes a bug in which the compiler could crash if there is a
subtype of a private type, and the full type has invariants.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Propagate_Invariant_Attributes): Call
Set_Has_Own_Invariants on the base
Give a better error message when we run out of fields.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen.adb (To_Bit_Offset): Use 'Base to avoid overflow in
computations in Last_Bit when Offset = 'Last.
(Choose_Offset): Give a better error message wh
The old compiler (pre-var-size nodes) had code in Set_Then_Actions to
set the parent of the Then_Actions to point to the If_Expression, even
though this field is not syntactic.
This was missing from the new version.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen
In particular we now recognize expressions of the form
xxx and False
xxx or True
when xxx has no side effect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (Eval_Logical_Op, Test_Expression_Is_Foldable):
Add support for folding more "and"/"or" ex
The comment for Find_Overlaid_Entity which says "node N should be an
address representation clause" is now enforced with an assertion. A
defensive code is removed from the body; the defensive code at the
callers of this routine is enough to prevent crashes.
Code cleanup related to improved handlin
gnat_argv is defined as pointer to const memory in argv.c but declared
and accessed as pointer to mutable memory in rtinit.c, which breaks the
One Definition Rule in C++. Its initialization is also non-standard.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* argv.c: Add in
...for uniformity of referencing code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen-gen_entities.adb (E_Loop_Parameter): Add
Interface_Name field.diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb
--- a/gcc/ada/gen_il
This patch fixes a failure of ACATS test cxaib08, which was getting
errors in instances of Bounded_Hashed_Maps about nonpreelaborable
constructs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_cat.adb (Check_Non_Static_Default_Expr): Allow nonstatic
expression i
Use Implementation_Base_Type instead of Base_Type in certain synthesized
attributes so they work on private types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.adb (Known_Component_Size,
Known_Static_Component_Size, Unknown_Component_Size): Use
Minor fix in comment; behaviour is unaffected. Spotted while examining
the expansion of attribute Image in GNAT so it can be better supported
in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_imgv.adb (Expand_User_Defined_Enumeration_Image): Fix
typos
The compiler issues an error on passing 'Access of a subprogram declared
within a generic unit body to an anonymous access-to-subprogram formal
of a formal subprogram of the generic that has an "is null" default,
when the generic is instantiated and the actual for that formal
subprogram is defaulte
This Ada202X AI, as well as AI12-0396 and AI12-0423, clarifies the
notion of nonoverridable aspects, as well as the rules for confirming
inheritance of such aspects. This patch refines the check for confirming
specifications to allow, e.g. renamed discriminants to carry an
Implicit_Dereference aspe
Routine Is_Access_Variable, which relied on the Ekind of the type,
wrongly returned True for subtypes of an access-to-subprogram type. It
is more reliable to also use Directly_Designated_Type.
This only affects SPARK legality checks for Global and Depends
contracts; compilation is not affected, be
This patch fixes some calls to Reinit_Field_To_Zero that were called for
too many or too few Ekinds. In particular, SPARK_Aux_Pragma_Inherited
does not exist in concurrent subtypes, causing crashes in Atree when the
pragmas at the start of the file are removed.
Tested on x86_64-pc-linux-gnu, commi
Side-effects in component declarations are prohibited in SPARK (both in
the constraints of component type definitions and in the default
expressions), but GNAT requires them to be removed when processing
records with per-object constraints.
This patch allows removal of side-effects in component de
The patch implements the No_Task_Parts aspect, which says that a type
and extensions of it cannot contain tasks.
In addition, we optimize away tasking-related code for T'Class when T
has No_Task_Parts. This is mostly just an efficiency improvement, but it
fixes a bug in one obscure case: The expan
We have an existing mechanism for suppressing dead code warning messages
in the case of an if-statement within an instance of a generic where the
value of the condition is known statically. Generalize this approach to
also handle case statements.
Tested on x86_64-pc-linux-gnu, committed on trunk
When performing a bootstrap with Ada, we are currently using the runtime
files from the repository during stage1, causing some subtle
inconsistencies during stage1 of the bootstrap, sometimes hard to
workaround. This change now uses the runtime from the base compiler
during stage1 only. We still re
This removes obsolete stuff.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-except.ads (ZCX_By_Default): Delete.
(Require_Body): Likewise.
* libgnat/s-except.adb: Replace body with pragma No_Body.diff --git a/gcc/ada/libgnat/s-except.adb b/gcc/ada/
1301 - 1400 of 3386 matches
Mail list logo