Getter function Predicated_Parent expects to be called on subtypes only,
which was not enforced always, possibly leading to assertion failures on
compiler built with assertions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Build_Predicate_Functions): Access
When a function renaming has a contract, it is important for GNATprove
that it is not treated as a simple wrapper, otherwise the link between
the renamed function and its renaming is lost for proof. Instead, it
should be treated as an expression function.
There is no impact on compilation.
Tested
This is an iterative patch as part of a greater project to reduce the
amount of technical debt present in the frontend of the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ali.adb, ali.ads (Scan_ALI): Remove use of deprecated
parameter Ignore_ED, and all
When rewriting a derived type declaration into a subtype declaration,
the aspect specifications were shared in a way that made the aspect
point to a node outside of the tree as parent node. This could lead to
an infinite loop on illegal code using a non-static value for attribute
Object_Size of the
We already had Subprogram_[Body|Spec|Specification] family of routines;
now we also have a symmetrical Package_[Body|Spec|Specification] family.
The added Package_Body routine is essentially moved from GNATprove, but
for simplicity it doesn't support package body entities.
Tested on x86_64-pc-lin
Type BOOL is made a new int to be consistent with the typedef used in
the C header files.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-vxwext.ads (BOOL): New int type.
(Interrupt_Context): Change return type to BOOL.
* libgnarl/s-vxwext__kernel.
New contracts on Ada.Strings.Bounded revealed an unprotected call to
First_Rep_Item on a possibly empty node.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Build_Predicate_Functions): Add guard.diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
--- a/gc
Written SPARK contracts describing the behaviours of all functions of
the Ada.Strings.Bounded library. All contracts are replicated in
Ada.Strings.Superbounded, the package that provides the explicit
implementation of bounded strings. The contracts (with the exception of
Trim, which uses search fun
When using -gnatd.M (or in codepeer mode), we want to be more flexible
in the preprocessor syntax, to accomodate better legacy toolchains.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* prep.adb (Preprocess): Allow for more flexibility when
Relaxed_RM_Semantics is s
Type STATUS is made a new int with constants OK and ERROR declared.
In code where ERROR clashes with an already defined integer value,
the clashing variable is renamed to IERR. In other clashes where
STATUS is a variable that variable is renamed.
Tested on x86_64-pc-linux-gnu, committed on trunk
These attributes are no longer GNAT specific.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* snames.ads-tmpl: Update status of some attributes.diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl
--- a/gcc/ada/snames.ads-tmpl
+++ b/gcc/ada/snames.ads-tmpl
@@ -963,
Except for the Free procedure which should not be called in SPARK code
(as it could be called on pointers to the stack), the rest of the public
API of Ada.Strings.Unbounded is valid in SPARK. Mark the private part
not in SPARK as it uses controlled types.
Tested on x86_64-pc-linux-gnu, committed o
This patch fixes many cases where a formal parameter is declared as
Node_Id on the spec, and Entity_Id on the body (and similar), which is
illegal according to the conformance rules.
It also removes some erroneous pragmas Suppress, and initializes the
uninitialized variables that were being read.
Do not insert a predicate check after a deferred constant declaration,
as the constant is not elaborated at this point, but only at the point
of its completion.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Object_Declaration): Do not insert a
Code cleanup related to handling of attribute 'Old in Contract_Cases;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Op_Eq): Reuse Is_Attribute_Result.
* exp_prag.adb (Expand_Attributes): Reuse Is_Attribute_Old.diff --g
Use of two nested existential quantications makes proof brittle. Use
instead explicit values for the bounds given by Index_Non_Blank, like
done in Ada.Strings.Bounded.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strfix.ads (Trim): Simplify contracts.
*
The predefined Ada.Strings.Bounded unit has been annotated SPARK
contracts that reference a local constant:
generic
Max : Positive;
package Generic_Bounded_Length
Max_Length : constant Positive := Max;
function XXX return YYY with Global => Max_Length;
...
When this
Ada RM M.2 gives a list of implementation-defined characteristics, each
of which is required to be documented. This requirement is addressed in
the "Implementation Defined Characteristics" section of the GNAT RM.
This section needs to be updated to reflect changes to the Ada RM M.2
over the last fe
Replace use of SPARK_Mode Off on callers of procedure Move by stronger
preconditions, as mandated by Ada RM A.4.3, so that calls to the
corresponding functions inside the procedure bodies are provably
correct.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strfix.
SPARK rules regarding constants with variable inputs and generic actual
parameters are currently not flexible enough to allow an explicit
Initializes contract on Ada.Strings.Bounded.Generic_Bounded_Length.
This patch removes the explicit contract, so that GNATprove generates an
implicit one with o
This patch implements some efficiency improvements related to field
getters and setters, and implements some cleanups that make the
efficiency improvements easier.
Instead of just storing the Offset with each node, we store a node
header, which contains the Offset plus a small number of slots. Fie
When unnesting, we may add static links to the actual parameters. This
will cause duplication if a the Parameter_Associations list is shared,
so ensure that we make a new one in this situation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.adb (Relocate_Node): If rel
This patch improves compiler efficiency by placing the Homonym attribute
at offset zero. Homonym is a heavily used field.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen.adb: Set the number of concrete nodes that have the
Homonym field to a higher number t
In Resolve_Array_Aggregate we typically compute and set Aggregate_Bounds
based on the aggregate itself. We only need to keep the already computed
bounds for aggregates that have been optimized into positional ones.
However, we kept the already computed bounds for other aggregates too.
In particula
This patch implements the two-pass algorithm described in RM 4.3.3
(20.2/5), for the construction of an array aggregate all of whose
component associations are iterated component associations with iterator
specifications. Each iterator specification is executed twice: once to
compute the number of
This documents the new --load option and makes a few minor tweaks.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/gnat_utility_programs.rst (gnatsymbolize):
Document new --load option and -g1 as minimal compilation
requirement.diff --git a/gcc/a
This patch fixes decoration of wrappers of access to subprograms with
pre/post conditions (that is, wrappers internally built by the compiler
to support AI12-0220). This patch also adds assertions, fixes node
decorations, and avoids cascade errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
Change to 64bit time to avoid Unix Epochalypse.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-parame__vxworks.ads (time_t_bits): Change to
Long_Long_Integer'Size.diff --git a/gcc/ada/libgnat/s-parame__vxworks.ads b/gcc/ada/libgnat/s-parame__vxworks.ads
--
This commit fixes warnings emitted by the CodePeer static analyzer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Iterated_Component_Association):
Initialize Id_Typ to Any_Type by default.diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.ad
If -gnatE is specified, then in some cases a call to a subprogram
includes a check that the body of the subprogram has been elaborated. No
such check is needed in the case of an expression function that is not a
completion; the function has no prior declaration. However, in some
cases the compiler
When the binder detects a mismatch between the versions of two .ali
files, include the version information in the resulting message.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* bcheck.adb (Check_Versions): In the case of an ali file
version mismatch, if distinct
Refine predicate Must_Slide to ensure that no spurious range checks are
generated when context subtype and aggregate subtype are non-static.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Must_Slide): If the aggregate only contains an
others_clause no
C stream fopen function opens file for size no more than 2G by default
on 32 bit platforms. Use fopen and other stream functions from
System.CRTL to overcome this limit.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/memtrack.adb (Putc): New routine wrapped around f
Information gathering in preparation for more efficiency improvements.
We gather statistics from the running compiler, and we also have gen_il
generate information in the form of comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.adb: Gather and print statistics
In some cases, an integer literal of a tagged type whose Integer_Literal
aspect is inherited from an ancestor type was not handled correctly by
the compiler. In particular, Ada RM 13.1(15.5) was not correctly
implemented, resulting in the incorrect rejection of legal uses of
integer literals with (
When the binder detects a mismatch between the versions of two .ali
files, include the version information in the resulting message.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* bcheck.adb (Check_Versions): Add support for the case where
the .ali file contains bot
A routine for deleting SCIL files generated by previous CodePeer runs
didn't expect compilation units that are subprogram renamings, generic
renamings and generic subprogram declarations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* comperr.adb (Delete_SCIL_Files): Handle
This patch adds a guard to the code generated in the second pass of the
two-pass expansion for array aggregates described in AI12-0212. The
guard is needed to prevent a spurious constraint error when incrementing
the index used for aggregate insertion, before exiting the loop.
Tested on x86_64-pc
New implementation of class-wide pre/postconditions that relies on
helpers to move the corresponding runtime checks to the caller side.
This implementation also adds indirect call wrappers and dispatch table
wrappers that facilitate combining class-wide conditions with
access-to-subprogram types wi
A type derived from a private type that specifies
Default_Initial_Condition can lead to an assertion failure when the
compiler builds the body of the derived type's DIC procedure. Some code
inherited from type invariants doesn't apply in the DIC case, and
performed an incorrect assertion testing fo
This patch corrects an issue in the compiler whereby a renaming within a
declare expression may result in a crash in some systems.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.adb (Debug_Renaming_Declaration): Add check for
Entity present for Ren to preve
Also fix [se]info.h output to include both declarations and definitions
of the functions for unions so that unions can refer to other unions
without being order-dependent.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen-gen_nodes.adb (N_Alternative, N_Is_Case_Choi
The CUDA_Device aspect allows specifying an entity as being device
(GPU)-only. This commit implements the basic machinery to detect the
aspect/pragma, but does not implement any functionality (a warning is
issued instead).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* aspe
Warnings about declarations being hidden can be issued in some cases
when compiling a generic instantiation, but such warnings aren't correct
(hiding can be flagged in a generic, but shouldn't be in an instance).
The warning is now suppressed within instances.
Tested on x86_64-pc-linux-gnu, commit
It will be used to tame the inlining of expression functions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb (d.8): Document usage.
* fe.h (Debug_Flag_Dot_8): Declare.diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/
Calling the function on an unspecified type may trigger the failure of
the precondition of the Interfaces accessor.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_type.adb (Specific_Type): Check that the type is tagged
before calling Interface_Present_In_Ancesto
This patch fixes a crash on a case statement whose expression is an
attribute reference Type_Key, which yields a String. The attribute
reference may have been fully analyzed, and the resolution against
Any_Discrete fails to detect the error.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/a
It is only documented for static computations currently.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_characteristics.rst: Document
the rounding mode assumed for dynamic computations as per 3.5.7(16).
* gnat_rm.texi: Rege
Gather more statistics, and make some minor efficiency improvements.
Adjust the heuristic for the order in which we choose field offsets.
This reduces the maximum size of a node from 10 slots to 9 slots, and
makes the compiler a little bit faster.
Add more special cases for fields whose offsets s
Ensure that the consequences of indexing into an array with the value of
an uninitialized variable are consistent with Ada RM 13.9.1(11) by
generating additional validity checks in some array indexing cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.ads: Define
This commit makes GNAT empty CUDA_Global procedures when compiling for
the host. This is required because CUDA_Global procedures could be
referencing entities that only exist on the GPU, which would result in
errors from the linker at link time.
We empty the procedures rather than completely delet
If a Subprogram_Variant aspect is given in ghost code, and the assertion
policy is set to Ghost => Ignore, and the -gnata switch is used, the
compiler gives spurious error messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_Call_Helper): Do not call
In some cases, BIP references tasking while it is not needed. Check if
this is needed before adding this reference.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_Actuals): Add a condition to check for the
possibility of task.diff --git a/gcc/ad
An illegal item appearing in the Global contract but missing from the
Depends contract was crashing the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Check_Usage): Guard against calling Usage_Error
with illegal Item_Id. The intention to do t
GNAT crashes when using -gnatX on code with an incomplete type
declaration, due to a missing initialization of the list meant to store
primitive operations. Now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Incomplete_Type_Decl): Add the missing
Detection of array aggregates of the form "(others => ...)" needs to be
adapted to iterated_component_association, which was added by Ada 2022.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Constraint_Check): Guard against calling
Choices when the
Definition of subtypes and derived types needs to possibly initialize
the list meant to store primitive operations when -gnatX is used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Subtype_Declaration,
Derived_Type_Declaration): Initialize lis
The procedure System.Regexp.Compile.Check_Well_Formed_Pattern is
intended to verify the syntactic correctness of a regular expression
pattern. It was failing to detect the (incorrect) case of a pattern that
ends in a "|". Subsequent code depends on the pattern being correct, so
failing to detect t
Cleanup related to expansion of dispatching equality for GNATprove.
Semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Arr_Attr): Refine type of the parameter from Int
to Pos; refine name of the parameter from Num to Dim; fix
When a predicate aspect is given on a declaration inside of a generic
body and the expression of the aspect references entities declared
outside of the generic, errors about those entities not being defined
can be issued in instantiations of the generic. This happens because the
expression of the P
We found a SuSE kernel bug that affects 32-bit debugging on 64-bit
machines. We agreed to document the problem in gnat_ugn.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/platform_specific_information.rst: Document the
SuSE kernel bug.
* gnat_u
The underlying reference in Unbounded_String is almost never null, so
recently it was changed to a non-excluding type (to avoid runtime checks
that are almost never needed).
The low-level routines that modify that reference had to be adapted, but
only the Deallocate routine was adapted. This patch
Cleanup related to expansion of dispatching equality for GNATprove.
Semantics is unaffected
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Test_Empty_Arrays): Simplify with Evolve_Or_Else;
remove unnecessary call to Relocate_Node.
(Test_Lengths_
We hit the Constraint_Error because Start_Column is outside bounds. So
it should not be returned because that will again raise a
Constraint_Error. Instead return its type'Last which is then properly
handled.
Also reformat the Blanks_Loop to be a simple loop. It seems, the nested
if's were writte
Code cleanup related to expansion of predefined equality for GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* tbuild.adb (New_Occurrence_Of): Simplify by reusing
Make_Identifier.diff --git a/gcc/ada/tbuild.adb b/gcc/ada/tbuild.adb
-
Code cleanup related to expansion of predefined equality for GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Handle_One_Dimension): Parameter N must be always
positive, because it is translated into expression of 'Firs
Cleanup related to expansion of predefined equality for GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch8.adb (Build_Body_For_Renaming): Remove unnecessary
calls to Sloc; set Handled_Statement_Sequence when building
s
Cleanup related to expansion of predefined equality for GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Copy_Parameter_List): Refactor to remove
repeated calls to First_Formal.diff --git a/gcc/ada/sem_util.adb b/gcc/a
This commit fixes an issue where when creating initialization
procedures, GNAT would generate failing accessibility checks because it
would use the scope depth of the parameter of the initialization
procedure instead of using the scope depth passed as parameter.
Tested on x86_64-pc-linux-gnu, comm
For ARM and Aarch64 architectures we use runtime units that rely on
atomic builtins instructions on all OSes except VxWorks (e.g. QNX,
Linux, FreeBSD). This looks like an oversight, because the builtins
depend on the architecture, not on the OS.
Part of improving efficiency of the Ada.Strings.Unbo
Preprocessing may call Error_Msg though Current_Source_Unit is not
initialized. When gnat1 is compiled with gnatVa, this leads to a
Constraint_Error.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sinput.ads: Initialize Current_Source_Unit to No_Unit.diff --git a/gcc/ada/si
This patch brings various improvements to the integration of strub
modes into the Ada type system. Strub modes for subprograms are
promoted to subprogram types when applied to access-to-subprogram
objects and types, and promoted from subprograms to access types'
designated types. Matching strub m
This patch corrects an issue in the compiler whereby the expansion of a
tagged membership test when one of the types involved is a protected
type can cause a crash a compile-time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Tagged_Membership): Use correspond
This patch corrects an issue in the compiler whereby the expansion of
a type extension declared in the body of a package with an overriding
primitive causes an infinite loop during compilation when the type
being extended is both declared in the package spec and has a function
and a procedure primi
Check_Abort_Status would return the equivalent of True while a task was
in the process of aborting causing another Abort exception to be raised
and not to terminate cleanly. This only affects targets that use stack
check emulation, which is currently limited to RTEMS.
Tested on x86_64-pc-linux-gnu
This makes Sprint output the Storage_Pool and Procedure_To_Call fields
of the nodes for which they are defined (allocator, free and returns).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sprint.adb (Sprint_Node_Actual) : Also print the
Procedure_To_Call field if i
This patch corrects an issue within gnatls whereby having an invalid
GPR_PROJECT_PATH_FILE causes an early abort when initializing the
default project path, leading to GPR_PROJECT_PATH being
ignored.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatls.adb (Initialize_Defa
Has_Compatible_Type is essentially a wrapper around Covers in Sem_Type that
handles overloading and a few other details, i.e. calling:
Has_Compatible_Type (N, Typ)
is morally equivalent to calling:
Covers (Typ, Etype (N)) or Covers (Typ, Interp (N))
Except that the implementation also perfo
Codepeer was emitting a warning about Ifaces_List not being initialized.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Check_Inherited_Conditions): Initialize
Ifaces_List.diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
--- a/gcc/ada/freeze.adb
+++
Adapt the test to issue a different error message when it is likely that
an if-expression is suspected, but parentheses are missing. This makes
the test more in line with its comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch4.adb (P_Primary): Adapt test for get
So far, only one light runtime units was using the standard unit for
big integers. A special ghost mirror had been created for the reduced
runtimes. In order to use more liberally big integers for proof of the
runtime, rename this ghost mirror into Big_Integers_Ghost at the same
level in the hierar
The following package declaration is legal but the declaration of D
leads to performing a tree transformation. Defining D as `type D is new
B and A with null record` would be consistent with the partial view and
thus does not require any transformation.
This is helpful in the case of generic pack
Array equality is typically expanded into a loop, but for small arrays
such loops are inefficient (and the code generator might fail to turn
them into linear code, especially when the array contains records).
We optimize equality of 2-element arrays into an AND THEN expression,
but only for array
In pattern syntax checking, make a procedure out of the algorithm to
find the close bracket matching an open bracket. Fix cases where the
close bracket is missing in the special cases '-' and '\', e.g.:
- "[a-b"
- "[\b"
- "[\]" misses either a backslash or a close bracket
These three cases would
Adding manual calls to Covers in the callers overlooks the overloaded case,
so this follow-up change adds back the reversed calls to Has_Compatible_Type
but guard them with a boolean flag set to true for comparison operators.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* s
The equality of arrays inside records always applies the predefined
equality, just like for elementary types. In Expand_Composite_Equality
we had some dedicated code for arrays inside records which was failing
to duplicate a similar code in Expand_N_Op_Eq, e.g. it was failing to
apply validity chec
Expansion of array equality creates a function, which needs to be
inserted into the AST. The insertion point was carried from
Expand_N_Op_Eq to Expand_Record_Equality and Expand_Array_Equality,
which were mutually recursive (via Expand_Composite_Equality). Now these
routines are no longer recursive
This unit is used to implement the rutime support for fixed-point
operations (conversions, multiplication, division and I/O). Its
correctness is proved with GNATprove.
Proof is performed with GNATprove options --level=4 --prover=all
Proof requires use of the special Big_Integers_Ghost unit for s
While a priority value of zero is typically valid on most systems, there
are some targets where zero may be reserved for OS purposes (for
example: RTEMS where zero is reserved for use by the idle thread and
should not be used by applications). This patch removes one occurrence
in GNARL where a Prio
When giving an arbitrary
pragma Restrictions (No_Specification_of_Aspect => Future_Aspect);
Future_Aspect shall not be rejected. Nevertheless a warning shall be
emitted. In case the unknown aspect might be a misspelling, a hint
should be emitted accordingly.
To ease this spell-checking, Aspe
Representation-related node fields are not set for types in generic
units, so we should not warn based on the values of such fields. Also
avoid printing the values of such fields for -gnatR.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* repinfo.adb (List_Common_Type_Info,
Expansion of array equality involves two index variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Array_Equality): Fix inconsistent casing
in comment about the template for expansion of array equality;
now we use lower case for tru
Codepeer is complaining about uninitialized variables. This fixes it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* repinfo.adb (List_Component_Layout): Initialize Sbit.diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb
--- a/gcc/ada/repinfo.adb
+++ b/gcc/ada/repinfo.
Bidirectional characters can cause security vulnerabilities, as
explained in the paper mentioned in a comment in this patch.
Therefore, we warn if such characters appear in string_literals,
character_literals, or comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* scng
This gets rid of the DECL_STUBBED_P macro and adjusts Call_to_gnu.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/ada-tree.h (DECL_STUBBED_P): Delete.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not set it.
* gcc-interface/trans.c (Call_to_
Two improvements to the previous change on this topic:
1) Add a guard to prevent a call to Number_Of_Dimensions that would pass
in a non-array type. This is needed in error cases (see ACATS test
B95094C).
2) Do not generate the new validity checks in the case where the
index type in ques
In some cases with -gnat2022 enabled, an enabled postcondition
containing a quantified expression containing an Old attribute reference
could result in an internal error during compilation. Fix this.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Repeatedly
This makes the compiler emit debugging information for the Type-Specific
Data object generated for tagged types, so as to make sure that debugging
information is emitted for its type in ell circumstances.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Make_DT)
Fix STATUS and int return types for Vxworks6 in legacy.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-osinte__vxworks.ads (tlsKeyCreate): Return int.
* libgnarl/s-tpopsp__vxworks-rtp.adb (ERROR): Declare from
System.VxWorks.Ext.ERROR.
(In
This patch corrects an issue in the compiler whereby a renaming of a
subprogram (as opposed to an object) may cause accessibility levels to
be incorrectly calculated on such renamings -- leading to spurious
accessibility errors at run time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ad
3001 - 3100 of 3426 matches
Mail list logo