This system unit is instanciated with values of Single_Size either 32
or 64 currently. A lemma was only valid for value of 32, which became
visible when proving the instance with value of 64.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb (Lemma_Word_Co
Updated base requirement on GNAT version and the fact that stage1 of the
bootstrap now uses the base compiler's libgnat allows for more Ada
features in the runtime and makes these pragma obsolete.
Added comments in files that are still built during stage1 and that need
to be modified with care now
Constant names of Big2xx32, Big2xx63 and Big2xx64 were misleading, as
SIngle_Size and Double_Size need not be 32 and 64. Replace by names that
don't refer to an explicit size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb: Apply replacement.
patch.dif
Support for external axiomatization in GNATprove has been deconstructed
few years ago, so the related frontend code can be deconstructed too.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wrapper):
Remove unrefer
This patch is minor cleanup. The Renamed_Entity and Alias synthesized
attributes are of type Entity_Id. No change in behavior.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.ads, einfo-utils.adb (Renamed_Entity Alias):
Change Node_Id to Entity_Id.diff -
When creating wrappers for dispatching functions with controlling
results, we first created the wrapper spec. Then we created a shallow
copy of its specification for the wrapper body using New_Copy_Tree.
However, formal parameters in spec and body must have distinct entities
and New_Copy_Tree does
Cleanup related to expansion of dispatching wrappers for GNATprove,
which just like instantiation involves copying of a specification from
an existing subprogram.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Instantiate_Formal_Subprogram): Remove redundant
This proves the generic unit System.Exponn instanciated for Integer,
Long_Long_Integer and Long_Long_Long_Integer. In order to be able to add
a suitable contract to the generic function, it is changed into a
generic package which contains the function. Instantiations are adapted.
GNATprove is call
Yet another cleanup related to expansion of dispatching primitives for
GNATprove. To keep this change semantically neutral, one parameter is
added to the Copy_Subprogram_Spec utility routine.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Make_Null_Procedure_Sp
Get_Current_Value_Condition should never return Val = Var, because that
could cause infinite recursion in Known_Null.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.ads (Get_Current_Value_Condition): Belt: Add a
postcondition that Val /= Var.
* sem_
Introduce expression functions to make the contract of Scan_Exponent
more readable. They can be reused in the contracts of scan functions for
scalar types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuti.ads (Starts_As_Exponent_Format_Ghost): Ghost
f
List iteration with First/Present/Next is safe even for No_List. This
safety is intentional and we rely on it in many places.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Gen_Parameters_Profile): Remove redundant guard
This proves the generic unit System.Expont instantiated for Integer,
Long_Long_Integer and Long_Long_Long_Integer. The proof is similar to
the one done for the same units with checks off. In this case too, the
generic function is changed into a generic package.
GNATprove is called with switch --le
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (String_From_Numeric_Literal): Simplify using
membership tests and ranges; fix whitespace.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem_ut
Similar to the contracts added for the 32bits and 64bits versions, add
corresponding contracts for the 128bits version. Proof is currently too
difficult for this instance of generic System.Arith_Double, as even with
a huge prover timeout of 15 minutes, 2 checks remain unproved.
Tested on x86_64-pc
We should build subtype for discriminated types in several situations
where we know a priori that we never need to allocate the max possible
size.
To factorize these conditions between `Analyze_Component_Declaration`
and `Analyze_Object_Declaration`, the function `Should_Build_Subtypes`
is introdu
Code cleanup related to expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Make_Eq_Body, Make_Neq_Body,
Make_Predefined_Primitive_Eq_Spec,
Make_Predefined_Primitive_Specs): Fix whitespace.diff --git a
Whitespace cleanup related to cleanup of creating copies of subprogram
specifications, which was needed for expanding dispatching wrappers for
GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Two_Pass_Aggregate_Expansion): Fix whitespace.
* li
Whitespace cleanup; wrong layout found with grep.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Op_Ne): Fix whitespace.
* sem_dim.adb (Expand_Put_Call_With_Symbol): Likewise.
(Reduce): Likewise.diff --git a/gcc/ada/exp_ch4.adb b/gcc/ad
Code cleanup related to expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_attr.adb (Build_Array_VS_Func): Remove explicit "IN" in
spec of the generated array validation function; it was
redundant, just like i
Remove extra whitespace spotted while doing other cleanups related to
expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Dcheck_Function): Remove extra whitespace.
* libgnarl/s-taskin.adb (Initialize_AT
These units are not required anymore as oldest compiler version allowed
for bootstrap does not need them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-sopco3.ads, libgnat/s-sopco3.adb: Remove.
* libgnat/s-sopco4.ads, libgnat/s-sopco4.adb: Remove.
This patch fixes a bug where if a parent library package contains a with
clause that mentions a child of that same parent package, then gnat can
crash if the parent package is compiled with the -gnatR2 switch.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* repinfo.adb (List
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatls.adb (Gnatls): Use Name_Find function.
* targparm.adb (Get_Target_Parameters): Likewise.diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
--- a/gcc/ada/gnatls.adb
+++ b/gc
Adding a single character to name buffer should be (marginally) more
efficient with Add_Char_To_Name_Buffer and not Add_Str_To_Name_Buffer.
Even if not more efficient, it should be still more readable.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.adb, sem_dim.adb
Enable expansion of wrappers for dispatching functions with controlling
results in GNATprove mode. Without those wrappers the AST for calls to
dispatching functions on parent and child objects is exactly the same
and the GNATprove backend can't determine what function is actually
called.
Tested on
GNATprove prefers various internally generated functions to be
expression functions, because then it will use the expression itself as
an implicit postcondition. The same applies to wrappers for dispatching
functions with controlling results.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/
Cleanup originating from enabling expansion of dispatching wrappers for
GNATprove; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Adjust_External_Name_Case): Use membership test.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
INOX allows casing on composite values. In some cases of bindings for
subcomponents, the compiler introduced copying which led to compiler
failures associated with finalizing those copies. In such cases a bound
object now provides a constant view of the appropriate subcomponent of
the selector obje
This proves the generic unit System.Exponu instantiated for Unsigned,
Long_Long_Unsigned and Long_Long_Long_Unsigned. The proof is simpler
than the one for signed integers, as there are no possible overflows
here.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exp
This proof combines the difficulties of proving signed exponentiation,
as we need to compare the result to the mathematical one using big
integers, with pervasive use of modulo operation. This requires
lemmas which should later be isolated in a shared library, for possible
reuse in other runtime un
For pretty-printing of GNAT AST we had a custom hash table which stored
visited nodes. Now this custom hash table is replaced with an instance
of GNAT.Dynamic_Tables.Dynamic_Hash_Tables. Expansion and compression
factors for this table are the same as for all other instances of
Dynamic_Hash_Tables
Code cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Visit_Node): Simplify repeated call to
Next_Entity.diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -2305,8 +23
The compiler may crash processing a class-wide pre/postcondition
that has dispatching calls using the Object.Operation notation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb (Restore_Original_Selected_Component): New
subprogram that traverses a prean
Analysis of loop variant is known to lead to false alarms with CodePeer.
Add pragma Annotate in such a case which can be justified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exponu.adb (Exponu): Add annotation.diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/a
This patch removes various technical debt in the form of "???" comments
throughout the GNAT sources.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add comments
regarding special handling of components which depend on
Procedure Destroy is intentionally doing nothing and needs an IN OUT
parameter, because to match the profile of a generic formal subprogram.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Destroy): Prevent spurious check from CodePeer.diff --git a/gcc/ada/treepr
The front-end defines an Any_Access entity which is only used as the type
of the literal null. Now, since AI95-0230, the RM 4.2(8/2) clause reads:
"An integer literal is of type universal_integer. A real literal is of type
universal_real. The literal null is of type universal_access." and e.g.
Fin
In package Stringt we already have a Null_String_Id, which represents a
null string with length zero. There is no need to duplicate it in other
packages.
Cleanup originating from enabling expansion of dispatching wrappers for
GNATprove; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, comm
This patch implements the No_Tagged_Type_Registration restriction,
analogous to No_Exception_Registration, but for tagged types.
Fix several violations of the RTE_Available protocol, as documented in
rtsfind.ads:
-- If we call this and it returns True, we should generate a reference to
--
This patch fixes an issue in the compiler whereby it fails to recognize
the presence of a current instance of an incomplete type when the
instance is used within a default expression for a record component.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_A
Given a discriminated type T1 with discriminant D1 having a component C1
of another discriminated type T2 with discriminant D2 and a propagated
discriminant constraint (that is, "C1 : T2 (D2 => D1);" and, for
example, a parameter of type T1, the compiler will sometimes build an
anonymous subtype to
The previous fix introduced a not-yet-understood regression in compiling
CodePeer. For now, we attempt a quick workaround for the problem.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Build_Discriminant_Reference): In the unexpected
case where we pre
This gets rid of a spurious error given by the compiler on the instantiation
of a generic package, when the instance happens to be an homonym of one of
the subpackages of Text_IO (Fixed_IO, Float_IO, etc) and when it is placed
in a context where Text_IO itself is also visible.
Tested on x86_64-pc-
Cleanup related to handling of -gnatwE (warnings-as-errors) in instances
of generic units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Null_Exclusion_Static_Checks,
Selected_Range_Checks): Fix style.diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
When resolving a string literal we examine each character against low
and high bounds of the expected type. We stored each character as an Int
and implicitly converted it to Uint twice: for "<" and ">" operators.
Now we store convert it to Uint explicitly and only once.
Cleanup related to handling
Code cleanup; semantics is unaffacted.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_String_Literal): Simplify pointer
arithmetic.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -117
Cleanup related to handling of messages for compile-time known
constraint errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Error_Msg_Internal): Reorder words.
* erroutc.ads (Is_Warning_Msg): Add closing paren.
* sem_util.adb (Compile_Time_C
Cleanup related to handling of -gnatwE (warnings-as-errors) in instances
of generic units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* err_vars.ads (Warn_On_Instance): Remove; it was a relic from
the previous handling of warning in instances that was removed
When going to the outer level for the placement of a freeze node in the
case where the current package has no body, the previous change would
overlook instantiations whose body has not materialized yet.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Insert_Fre
All node lists can be safely iterated with First/Present/Next. There is
no need for explicit guard against empty lists. Code cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Remove_Warning_Messages): Remove unnecessary guard.
* exp_util.adb (Kill_
All compile-time messages about division by zero are now located at the
right operand. Previously some of them were located at the division
operator, which was inconsistent.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (Eval_Arithmetic_Op): Add Loc parameter
Code cleanup related to handling of warnings-as-errors. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Concatenate): There is no reason for using
declaring, raising and catching an exception; a simple return
state
Cleanup related to handling of warnings-as-errors. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Remove_Warning_Messages): Use traversal procedure
instead of traversal function, since we discard status of each
step anywa
Proof of the generic unit to array operations (vector/matrix), only at
silver level, for runtime errors that come from the generic part of the
unit. This does not prove e.g. absence of overflows in an instantiation
related to arithmetic operations passed as formal generic subprogram
parameters.
Ju
Code cleanup related to handling of warnings-as-errors. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Adjust_Name_Case): Remove unnecessary declare
block.diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb
--- a/gcc/ada/errout.
This patch adds a warning on a subtype declaration with a
compile-time-known range constraint that is a null range.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Range): Warn on null range, unless we are
inside a generic unit or an instance the
We remove the "pragma Elaborate_All (Osint)", because it is no longer
needed. That allows us to remove the "with Osint" (i.e. with of our own
parent).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint-m.adb: Remove with_clause and pragma.diff --git a/gcc/ada/osint-m.adb
There is no need to say "with P;" in package P.Q. This patch adds a
warning for that case.
We also remove with clauses in our own code that trigger the warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch10.adb (Check_Redundant_Withs): Add a warning if a
This option is used by GNAT LLVM.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads, sem_util.adb (Get_Fullest_View): Add option to
not recurse and return the next-most-fullest view.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem
When printing a node, if it happens to be an integer-like expression
whose value is known, print that value. This makes debugging a little
easier.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Print_Node_Ref): Print the value if available.diff --git a/gcc/ada/t
If we have an Unchecked_Conversion between an access to subprogram and
System.Address, we want to try to use a thin subprogram pointer. Try to
do this automatically as much as possible and add one to the RTS.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-spipat.a
Follow-on to previous change "Print value of static expression".
Print only if the type is discrete.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Print_Node_Ref): Change "not Is_Array_Type" to
"Is_Discrete_Type".diff --git a/gcc/ada/treepr.adb b/gcc/ad
When concatenating scalars, we should check their range as in the
following example:
type uint8 is range 0 .. 255;
type Array_Type is array (Positive range <>) of uint8;
Array_1 : Array_Type := 42 & 256;
This commit leads to emitting:
- a warning if a constraint error is expected but
Calls to Append_List and Append_List_To applied with empty lists do
nothing, so there is no need to explicitly guard against such calls.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Init_Procedure): Remove unnecessary guard.
* exp_disp.adb (Make
Calls to Insert_List_After and Insert_List_Before applied to empty lists
do nothing, so there is no need to explicitly guard against such calls.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Expand_N_Object_Declaration):
Warnings for nodes inside null loops were suppressed if posted with
Error_Msg_NLE and emitted if posted with other error-reporting routines.
This was inconsistent and error-prone.
Part of removing quotes around exception names in messages, because
messages without quotes will be now emitted by Err
In some messages of the form "XXX_Error will be raised at run time" the
XXX_Error was enclosed in quotes, in other it was not. Now all messages
of this form are emitted without quotes.
Note: in messages emitted from routine Possible_Local_Raise we still
quote names of exceptions, but there indeed
The original code for subprogram unnesting used 'Access for
unconstrained arrays. This was recently changed to 'Unchecked_Access for
GNAT-to-LLVM, but a reference to 'Access still appears in the comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_unst.adb (Unnest_Su
This construct is now flagged with -gnatwr.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Update -gnatwr documentation.
* gnat_ugn.texi: Regenerate.diff --git a/gcc/ada/doc/gnat_ugn/building_executabl
When a general case statements is rewritten into a block, it is enough
to call Analyze on this block node, because analysis of non-expressions
automatically triggers expansion.
Cleanup originating from investigating many variants of routines for
(pre)analysis and resolution.
Tested on x86_64-pc-l
Fix exit status processing logic in __gnat_waitpid. Fix
GNAT.Expect.Interrupt on Windows. It was terminating the calling
process.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* expect.c (__gnat_waitpid): Use macros WIFEXITED, WEXITSTATUS,
WIFSIGNALED, WTERMSIG, WI
Style cleanup; semantics is unaffected.
Offending occurrences found with:
$ grep "[A-Za-z0-9\)]+ +then$" -C 3
and reviewed manually, because some of them were due to explicit layout.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb, exp_disp.adb, exp_util.ad
Subprogram calls can be detected with just Traverse_Func, we don't need
a separate global variable or a Traverse_Proc (which is a wrapper for
Traverse_Func with a yet another variable).
Cleanup related to handling of transient scopes in various routines for
(pre)analysis and resolution. Semantics
Code cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.adb (To_Lower): Clarify that only To_Lower function
causes bootstrap issues; fix style.
* treepr.adb (Print_Str_Mixed_Case): Reuse existing case
conversion ro
The first issue is that the pragma may require the address of the objects
subject to it to have their address taken, like Asm_Input and Asm_Output,
so these objects need to be specifically marked.
The second issue is that the detection of unfrozen objects was not robust
enough and would miss objec
Terminate process only on terminating signals.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.c (__gnat_kill): Terminate process only in case of
SIGKILL, SIGINT, SIGBREAK, SIGTERM, SIGABRT. Do not call
OpenProcess if not going to terminate process.di
The frontend reports a spurious error when the order of interfaces
differ between the full view and the partial view of a private type
defined in a generic unit.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Reorder_Interfaces): When the conflicting
in
This patch modifies the behavior of pragma Unreferenced to be consistent
in its behavior, by counting all variables specified as "Out" actual
parameters as being referenced instead of only the first "Out"
parameter. Additionally, much related duplicated has been removed.
Tested on x86_64-pc-linux-
Expansion of multi-dimensional array aggregates with boxes (e.g.
"(others => (others => <>))" only applied default initialization to
components of a scalar type with Default_Value aspect and of an access
type (which are initialized by default to null).
Now default initialization is applied to comp
The compiler may crash processing a class-wide pre/postcondition that
has dispatching calls using the Object.Operation notation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.ads (Traverse_Func_With_Parent): New generic subprogram.
(Traverse_Proc_With_Parent)
Cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Build_Array_Aggr_Code): Fix inconsistent style
in comments and code.diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_a
Make the generated nmake.ads unit look more like it was written with
GNAT style rules in mind; semantics is unaffected.
Cleanup related to fix of default initialization in multi-dimensional
arrays, which used to explicitly call the Nmake.Make_Null routine.
Tested on x86_64-pc-linux-gnu, committed
GNAT now emits more warnings about pragma Unreferenced.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-taprop__mingw.adb (Timed_Sleep): Remove "pragma
Unreferenced" for Result.
(Timed_Delay): Likewise.diff --git a/gcc/ada/libgnarl/s-taprop__mingw.
The check did miss the part of Ada 2022 RM 6.1.1 (27/5) that the use of
an entity declared within the postcondition expression is allowed if
it's declared within the prefix itself.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Check_Reference): Fix condition.
The Ada.Directories directory search function is changed so the contents
of the directory is now read in Start_Search instead of in
Get_Next_Entry. Start_Search now stores the result of the directory
search in the search object, with Get_Next_Entry returning results from
the search object. This di
This patch fixes an issue in the compiler whereby objects of task arrays
would trigger spurious unreferenced warnings.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Check_References): Handle arrays of tasks
similar to task objects.diff --git a/gcc/ada
The compiler should give again a warning instead of an error, which comes
from an improper Esize set on the bit-packed array type by Layout_Type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_pakd.adb (Install_PAT): Do not reset the alignment here.
* layout.adb
Unit System.Atomic_Counters was using deprecated __sync GCC builtins.
Now it uses __atomic builtins, which are recommended for new code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-atocou__builtin.adb (Decrement, Increment): Switch
from __sync to __atom
This fixes a fallout of the latest change, which removed a problematic
line resetting the alignment of the PAT type. It turns out that the
alignment must now be adjusted for modular PAT types, as done in other
contexts, to be consistent with the size.
Tested on x86_64-pc-linux-gnu, committed on t
Pragma Loop_Variant is expanded into code which is too complicated for
CodePeer to handle and results in messages with internal names. Disable
expansion.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_prag.adb (Expand_Pragma_Loop_Variant): Disable expansion
in C
Pragma Loop_Variant is now expanded into a null statement in CodePeer
mode. Remove annotations related to false positives in runtime units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exponn.adb, libgnat/s-expont.adb,
libgnat/s-exponu.adb, libgnat/s-wid
Routine Lock_Free_Try_Write was using deprecated __sync GCC builtins.
Now it uses __atomic builtins, which are recommended for new code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-atopri.ads (Atomic_Compare_Exchange): Replaces
deprecated Sync_Compare_A
This entails marking the pragma as requiring an lvalue and explicitly going
to the corresponding variable of the constants, which is always built since
the front-end marks the constants as having their address taken.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interf
The issue arises when the unchecked union contains nested variants, i.e.
variants containing themselves a variant part, and is subject to a full
representation clause covering all the components in all the variants,
when the component clauses do not align the variant boundaries with byte
boundaries
This fixes a bad interaction between the machinery used to build subprogram
types referencing incomplete types and the Copy-In/Copy-Out mechanism used
to implement In/Out and Out parameters of elementary types in subprograms.
The latter mechanism cannot be finalized until after incomplete types ar
Remove the x86-specific (32bit) variant of System.Atomic_Counters,
because the __atomic builtins work fine on all x86 CPUs except for i386,
where they can be provided by libatomic (when compiling with
-march=i386).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl
Add documentation for new -gnatd_u and old -gnatd_R flags used for GNAT
LLVM and its CCG.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb: Add documentation for new -gnatd_u and old -gnatd_R
flags used for GNAT LLVM and its CCG.diff --git a/gcc/ada/debug.ad
When a compile-time constraint error is inserted into the AST, we emit
a main message (e.g. "value not in range of ...") and its continuation
(e.g. "Constraint_Error will be raised at run time"). When the main
message is emitted as a warning and the continuation is escalated into
an error, the main
Use membership tests when possible
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch9.adb, gen_il-types.ads, make.adb, par-ch12.adb,
sem_ch13.adb: Use membership tests.diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb
--- a/gcc/ada/exp_ch9.adb
+++ b/gcc/ada
3301 - 3400 of 3426 matches
Mail list logo