This patch documents that switch -gnatd_K is reserved to enable
machinery that detects known problem issues of previous releases.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-12-18 Javier Miranda
gcc/ada/
* debug.adb: Document -gnatd_K as a reserved switch for the
d
This patch fixes a bug in which if a parent package has a use clause in
its private part, and a child of that parent has a use clause for the
same thing in its context clause, the compiler incorrectly warns that
the one in the child is redundant.
Tested on x86_64-pc-linux-gnu, committed on trunk
This gets rid of an old bypass used in the compiler, which would copy
the value set in an Object_Size clause for record types onto Size.
This means that a confirming Object_Size clause can prevent packing,
which is counter-intuitive given that Object_Size is not supposed to
pertain to packing at a
The compiler gave a wrong error about "must override" in the following
case. A private type is completed with a derived type that inherits a
must-override function. Outside that package, a type extension of the
private type is declared. The function on that type extension is not
visible, and is n
Ada202X allows some aspects related to shared variable control to appear
on formal type declarations. These aspects represent new enforceable
parts of the contract between generic units and instantiations.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-12-18 Ed Schonberg
gcc/ada/
In certain cases of conversions to interface types, the compiler
generates a special function to handle the conversion. In cases where
such a function has an extra accessibility-level formal and the target
type of the conversion has a designated type that comes from a limited
view (via limited_with
This adds references to Ada 2020 in the section documenting the two size
attributes used by GNAT, namely Object_Size and Value_Size, as well as
in the head comment of Subtypes_Statically_Match.
Tested on x86_64-pc-linux-gnu, committed on trunk
2019-12-18 Eric Botcazou
gcc/ada/
* einf
Fix three-letter typos like "alllowed" or "corrresponding". They can be
detected with this command:
$ grep "[[:alpha:]]\([[:lower:]]\+\)\1\1" ...
but need to be manually filtered for things like "ieee", "dd-mm-" or
hexadecimal literals.
Tested on x86_64-pc-linux-gnu, committed on trunk
20
This patch fixes an issue whereby compile-time checks on return
aggregates with anonymous access discriminants were not performed when
multiple of such discriminants were present, the aggregate was within an
extended return statement, or the aggregate was within a qualified
expression.
Tested on x
Before this commit, GNAT failed to notice that subprograms overriding
non-returning subprograms could be renamings of non-returning
subprograms and thus wrongfully emitted an error.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Check_Abstract_Overriding): Chec
The special case used for catching the 'rem -1' operation is not useful
to CodePeer, and in fact may be detrimental to its precision. Remove
it in CodePeer_Mode.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Op_Rem): Remove special case for rem -1
Split out the computation of Returns_By_Ref, to make subsequent changes
easier. General cleanups.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads, sem_util.adb (Compute_Returns_By_Ref): New
procedure to compute Returns_By_Ref, to avoid some code
Printing continuation messages as a single JSON message was an error as
consumers of the JSON output can take advantage of different locations
of the continuation message.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Output_JSON_Message): Recursively call
Missing Chars on N were causing a crash - the solution is to set the
Sloc from N and to use F_type's chars.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Profile): Use N's Sloc, F_type's chars.diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
--- a/gc
Compiler rejects an instantiation but accepts the corresponding generic
unit, when it includes a declaration for a private type whose full view
is a record type with a controlled component, and the full view of an
object of the type is given by an aggregate with default-initialized
components.
Tes
Code cleanup only related to handling of Address clauses in GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Has_Compatible_Alignment_Internal): Fix
indentation of ELSIF comments; remove explicit calls to
UI_To
GNAT_Annotate being an alias of Annotate rather than its own pragma
results in issues for tools that rely on snames to get a list of
available pragmas.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* aspects.ads: Add GNAT_Annotate aspect.
* gnat1drv.adb (Adjust_Globa
Posting the error message on the declaration of the renamed subprogram
is more confusing than posting the message on the name of the renamed
subprogram in the renaming.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Check_Abstract_Overriding): Post error messag
Rules in SPARK RM section 3.10 regarding modeling of heap through
dynamic (de)allocation has changed. As a result, the dependency contract
of Ada.Unchecked_Deallocation can be added directly in the sources,
and placement of allocators is not checked in the frontend anymore.
Tested on x86_64-pc-lin
The "strict alignment" compilation mode is controlled by -gnatd.a,
as described in Adjust_Global_Switches.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ttypes.ads (Target_Strict_Alignment): Fix comment.diff --git a/gcc/ada/ttypes.ads b/gcc/ada/ttypes.ads
--- a/gcc/ada/tty
OS_Time is use mainly in the interface to the "C" part of the GNAT RTL.
Change it to a 64-bit signed type on all targets.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.h (OS_Time): typedef as long long.
* osint.adb (Underlying_OS_Time): Declare as 64-bit sig
__gnat_set_file_time_name is called from Ada with OS_Time, but the C
function argument is time_t. This is a violation of the interface rule
that calls to the C parts use OS_Time. It currently works by accident.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.h (__gn
Revert to having support for Ada 2022's Image and Put_Image attributes
of tagged types conditional on the -gnatd_z switch (as opposed
to being enabled unconditionally). This is a temporary change, so the
comments in debug.adb about the -gnatd_z switch have not been restored.
Tested on x86_64-pc-li
When translating literals to big reals, the compiler would forget about
the minus sign and turn a negative number into a positive one.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve): Insert minus sign if needed.diff --git a/gcc/ada/sem_res.adb b/gcc/ad
The comment in the public section of the spec says the comparison ops
are intrinsic, but that doesn't match the private part implementation
and comment. Fix this.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-os_lib.ads: Import OS_Time comparison ops as
i
Add some comments to warn about the use of time_t in the host based
tools since it's not practical to remove the declaration itself.
Rename some formal parameters in internal subprograms to reflect the
fact that OS_Time is the preferred interface type.
Tested on x86_64-pc-linux-gnu, committed on t
When generating alignment checks for Address representation clauses we
optimized them away for clauses like:
for X'Address use Arr (1)'Address;
for X'Address use Rec.C'Address;
but not:
for X'Address use Obj'Address;
even though the alignment of Obj is known.
Tested on x86_64-pc-linux-gn
Check_Limited_Return originally used Comes_From_Source (N) in order to
decide whether N was a return statement created from an extended return
statement or not.
This was a problem because the return statement from expression
functions also have their Comes_From_Source flag set to false.
The soluti
This started out as an Ada2022 ticket, but work on Ada 2022 constructs
uncovered bugs that could affect pre-Ada2022 code. Fix those bugs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Record_Init_Proc.Build_Assignment): When
building the assignme
SPARK RM 7.1.3(8) has been updated to reflect the fact that abstract
states which do have Async_Writers or Effective_Reads cannot have as
constituents objects which are effectively volatile for reading,
hence need not require that a function reading such an abstract state
be marked as a volatile fu
Object overlays, i.e. objects with an Address clause that specify the
address of an overlaid object, are no longer allowed to appear in SPARK
data and dependency flow contracts. Also, they do not contribute to the
package state and so don't need to appear in Refined_State contracts.
Tested on x86_
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Stream_Operation_OK): Reuse
Is_Concurrent_Interface.
* sem_ch3.adb (Analyze_Interface_Declaration,
Build_Derived_Record_Type): Likewise.
* sem_
Replace some calls to procedure Get_Index_Bounds with calls
to the function with the same name. Not all calls are replaced
(some seem clearer as procedure calls).
Change names to be more consistent with the RM.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb, exp
GNAT's initial implementation of Ada 2022's Image and Put_Image
attributes did not include full support for tagged types. Improve that
level of support. This support is still disabled by default and is
enabled via the -gnatd_z switch because it generates additional
dispatching routines even for Ada
This patch implements an experimental restriction
No_Dynamic_Accessibility_Checks which presents the two alternative
accessibility models.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Accessibility_Checks_Suppressed): Add check
against restriction No_D
The GNAT-defined package Ada.Strings.Text_Output has been replaced by
the Ada-defined package Ada.Strings.Text_Buffers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-stobbu.adb, libgnat/a-stobbu.ads,
libgnat/a-stobfi.adb, libgnat/a-stobfi.ads,
lib
Reference and Constant_Reference functions are added to all formal
containers types, returning an access to an element in the container.
This takes avantage of pointer support in SPARK.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfdlli.ads, libgnat/a-cfdlli.ad
Compiler rejects an expression function whose signature includes an
access parameter with a null_exclusion indicator.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
conformance check when the subprogram bo
Add GNAT RM text indicating that users should not rely on the details
of the text generated by the default implementation of T'Put_Image for
any nonscalar type T. The compiler is free to change the details of such
text, subject to the general guidance on this topic given in the Ada RM.
Tested on x
This is a prototype implementation of a language extension that allows
calls to primitives of untagged types to be written using prefixed
notation. That is, the first actual parameter of the call is given as a
prefix using selected_component syntax, and the selector is a primitive
operation of the
To be used in GNAT LLVM as declarations for parameters and variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-types.ads (Void_Or_Type_Kind,
Exception_Or_Object_Kind): Declare.
* gen_il-gen-gen_entities.adb: Likewise.diff --git a/gcc/ada/gen_il-
System.OS_Primitives in libgnat for VxWorks imports Ssystem.OS_Interface
in libgnarl, creating a dependency on libgnarl by libgnat. This works as
long as the functions being referenced in OS_Primitives were pragma
imported functions from the kernel, but this is no longer the case with
a selectable
This patch removes an incorrect predicate check applied to a view
conversion of a tagged object. Such a view conversion is an object
and can appear as the target of an assignment statement, in which
case no predicate check applies to the now-dead value.
Tested on x86_64-pc-linux-gnu, committed on
The parent was Node_Kind before. This is a minor cleanup, and has no
effect on the operation of the compiler. However, if we start declaring
more objects of the various predicated subtypes, such as
N_Declaration_Id, it would be good to get them right.
Tested on x86_64-pc-linux-gnu, committed on t
This patch fixes a bug in the compiler whereby the experimental "return
when" feature was not supported in procedures.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch6.adb (Get_Return_Kind): Properly handle the case of a
"return when" statement in the procedur
This patch removes some unnecessary unchecked conversions from the
generated code. This makes the .dg output more readable in some
cases, especially those involving finalization.
Also misc cleanups.
This patch does not change calls to Make_Unchecked_Type_Conversion to
Unchecked_Convert_To, but we
Some error messages issued regarding limitations of the current
implementation of the GNAT extension for pattern matching are
missing space characters.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_case.adb: Fix error message.diff --git a/gcc/ada/sem_case.adb b/gcc/ada
Compiler aborts on a use of attribute 'Img on an object of a record
type, when the attribute reference occurs within a larger expression,
such as a string comparison.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Process_Transient_In_Expression): Ensure that
This patch corrects an issue in the compiler whereby initialization gets
incorrectly performed on element iterators in "for of" loops.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove
legacy expansion of eleme
The recently added extension of allowing prefixed-call notation for
primitives of untagged types doesn't handle certain cases of prefixed
calls where the prefix of the call is an overloaded function call.
Specifically, this can occur when the result of some overloadings of the
function have results
This patch fixes a bug in the compiler whereby the experimental "return
when" feature was not supported for return values which were not
identifiers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch6.adb (Get_Return_Kind): Removed.
(Is_Extended): Created to ide
Fix a bug (which shows up as an assertion failure in gigi) having to
do with the tree generated by the FE for a record-valued case-statement
choice that has a subcomponent of an enumeration type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb
(Expand_N_C
Code cleanup related to loading of compilation units; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.adb (Ensure_System_Dependency): Simplify by reusing a
constant name.diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
--- a/
Cleanup excessive whitespace and use membership tests in code related to
loading of compilation units; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-load.adb (Load_Unit): Remove excessive whitespace.
* lib.adb (Is_Internal_Unit, Is_Pred
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Enclosing_Comp_Unit_Node): When the loop exits
the Current_Node is either an N_Compilation_Unit node or Empty,
so simply return it without redundant checks.di
Cleanup related to loading of compilation units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib.adb (Remove_Unit): Replace defensive code with an
assertion.
* par-load.adb (Load): Address a question mark in the comment.diff --git a/gcc/ada/lib.adb b/gcc/
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* uname.adb (Add_Node_Name): Replace local constant whose
initial expression was evaluated even when unnecessary with just
that expression that is evaluated at most once and
In shells such as Win32 Cmd, malformed command line can be used to spawn
processes. As a consequence when parsing a quoted argument, the closing
double quote can be missing and a null character found instead. In that
case, behave as if the closing double quote is found with the exception
that trail
Before this commit, GNAT would not warn about empty loops caused by
constraints like in the following piece of code:
procedure tmp is
type T is mod 3;
begin
for I in T range -1..1 loop
null;
end loop;
end;
When the constrained type is modular, additional information about
computed
For a default (as opposed to user-defined) Read operation of a composite
type with a scalar component, the RM says that in some cases the
constraint check that is normally performed upon return from a
procedure with an out-mode scalar parameter (in particular, the call
to the procedure Scalar_Compo
Enable support for Ada 2020's Put_Image and Image attributes for
tagged types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_put_image.adb: Eliminate references to
Debug_Flag_Underscore_Z. Change the meaning of the function
Enable_Put_Image. Previously
... because in case of compiler bugs, it can be accessed early, so it
needs to be initialized.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.ads (Current_Error_Node): Initialize to Empty.diff --git a/gcc/ada/atree.ads b/gcc/ada/atree.ads
--- a/gcc/ada/atree.ads
+++ b
The Terminated flag for a task was being queried without first aquiring
the task lock. It is not clear that this unsychronized access has ever
caused a problem in practice, but the thread-sanitizer tool flags it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-tas
Use Tbuild.Unchecked_Convert_To instead of
Nmake.Make_Unchecked_Type_Conversion. This leads to more readable source
code in the compiler, and also more readable .dg code, because it
removes redundant unchecked conversions.
There is only one remaining call to Make_Unchecked_Type_Conversion,
which i
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* inline.adb (Instantiate_Bodies): Fix white in declaration.
(Remove_Dead_Instance): Change iteration from WHILE to FOR.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
--- a/gcc
When discovering violation of the No_Elaboration_Code restriction it is
enough to find one unit that violates it; we don't need to examine all
units.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.adb (Write_ALI): Exit from l
This adds socket options that are needed to control the keepalive status
of TCP connections. The new options are Keep_Alive_Count,
Keep_Alive_Idle, and Keep_Alive_Interval.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-socket.ads (Option_Name): Add Keep_Alive_Cou
There are three kinds of units that require code generation: the main
unit, its corresponding spec and generic instances needed by the main
unit.
Previously the main unit and its corresponding spec were flagged as
requiring code generation just before calling the backend, while
instance units were
Avoid local string copy with renaming, which both make the code shorter
to read and should be marginally faster to execute. Code cleanup only
related to loading of compilation units; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par.adb (Par): A lo
The precondition of Cot in Ada.Numerics.Generic_Elementary_Functions is
not meant for execution (as enforced by the Assertion_Policy at the top
of the file) but for analysis only. A conjunct in the precondition of
Cot applied to two arguments (with a Cycle value) was incorrect, now
fixed.
Tested o
Remove Linker_Section_Pragma field from Record_Field_Kind.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen-gen_entities.adb: Remove Linker_Section_Pragma
field from Record_Field_Kind. Minor comment improvement.diff --git a/gcc/ada/gen_il-gen-gen_entities.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb, exp_ch6.adb, sem_ch6.adb: Replace Ekind
membership test in Private_Kind with a call to Is_Private_Type.diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
--- a/gcc
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (CPP_Num_Prims): Reuse List_Length.diff --git a/gcc/ada/exp_disp.adb b/gcc/ada/exp_disp.adb
--- a/gcc/ada/exp_disp.adb
+++ b/gcc/ada/exp_disp.adb
@@ -588,19 +588,7 @@ package
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Check_For_Primitive_Subprogram): Move
declarations of local variables after nested subprogram bodies.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/a
In cases where it is known statically that an exception will be raised,
the frontend inserts a node of kind N_Raise_xxx_Error. This node kind
was previously not supported in GNATprove, which required special
handling for these cases in GNATprove mode. This is not needed anymore.
Tested on x86_64-p
A previous change to Unchecked_Convert_To removed the setting of the
Parent of the new node, because it was thought to be unnecessary.
However, in rare cases, it is necessary because for example
Remove_Side_Effects is called on the new node before attaching it
to the tree.
Tested on x86_64-pc-linu
The Set_Socket_Option shifts timeout for -500ms on old Windows versions,
but Get_Socket_Option did +500ms for timeouts on all Windows versions.
This commit fixes it and +500ms on Get_Socket_Option only for old
Windows versions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
Back out of an overly aggressive workaround for compilation problems
associated with a Put_Image routine for a tagged type in a Remote_Types
package and try a different (hopefully better) approach that is more
consistent with how other predefined primitives are treated.
Tested on x86_64-pc-linux-g
Size and Value_Size clauses are documented to be the same, except that
Value_Size is allowed for nonfirst subtypes, and Size is allowed for
objects. This was far from true, which caused bugs such as ignoring
Value_Size for access types, in cases where a Size clause would trigger
the use of thin poi
Code cleanup related to loading of compilation units; behaviour is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* uname.adb (Get_Body_Name, Get_Parent_Body_Name,
Get_Parent_Spec_Name, Get_Spec_Name, Is_Child_Name,
Is_Body_Name, Is_Spec_Name, Name
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* uname.adb (Get_Unit_Name): Simplify with a bounded string
buffer; also, this addresses a ??? comment about the max length
being exceeded.diff --git a/gcc/ada/uname.adb b/gc
Ada 2022 errors about volatile compatibility between generic actual and
formal types were emitted on type declaration; now they are emitted at
the actual type within the generic instance.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Check_Shared_Variable_Con
Ada 2022, in AI12-0412, specifies that certain uses of primitives of an
abstract type that have Pre'Class or Post'Class aspect are illegal when
an aspect is given with a nonstatic expression. Specifically, if the
primitive is nonabstract and has such aspects, it's illegal to make a
nondispatching c
In particular, now that we are using Atomic_Unsigned which is marked
Atomic, we no longer need to mark Atomic_Counter.Value explicitly
atomic.
We can also get rid of all uses of 'Unrestricted_Access
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-atocou.ads, libgn
To help codepeer analysis.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-debpoo.adb (Code_Address_For_Allocate_End): Default
Initialize.diff --git a/gcc/ada/libgnat/g-debpoo.adb b/gcc/ada/libgnat/g-debpoo.adb
--- a/gcc/ada/libgnat/g-debpoo.adb
+++ b/gcc/a
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Simplify processing of pragma
CPP_Constructor.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_p
The body of every primitive subprogram contains an elaboration check, in
case a dispatching call is made. These checks happen even in the static
model. This patch removes the checks if pragma Pure or Preelaborate is
present, because they cannot fail in that case.
Tested on x86_64-pc-linux-gnu, com
Windows headers in GCC could miss some available constants. Hardcode
TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL constants for such case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* s-oscons-tmplt.c (TCP_KEEPCNT TCP_KEEPIDLE, TCP_KEEPINTVL):
Hardcode on Windows
A recent change exposed a latent bug where the Is_Intrinsic_Subprogram
flag was not propagated properly, leading to errors from the front-end
inlining of the form:
cannot inline "xxx" (nested function instantiation)
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch1
Ensure that Checking_For_Potentially_Static_Expression flag is
manipulated in a stack-like manner (with stack depth 1 at the most). The
previous assertion didn't prevent us from setting the flag to True or to
False twice in a row.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
When expansion is disabled (such as with -gnatc), there are cases where
uses of concurrent types can lead to an Assertion_Failure when
extensions are enabled (by use of -gnatX, or due to instantiation of a
predefined library generic, such as Unchecked_Conversion), because
Primitive_Operations can r
__MINWGW32__ is typo and was not working, but anyway the MSG_WAITALL
is defined on Windows.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* s-oscons-tmplt.c (MSG_WAITALL): Remove wrong #ifdef
__MINWGW32__.diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sinput-l.adb (Load_File): Simplify foreword manipulation with
concatenation; similar for filename with preprocessed output.diff --git a/gcc/ada/sinput-l.adb b/gcc/ada/sinput-l.adb
Replace a linear search with a hash table query.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.adb (Ensure_System_Dependency): Replace search in
Lib.Units with a search in Lib.Unit_Names.diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
--- a/gcc/ad
To help experiment with this new model.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* make.adb, osint.adb: Make code compatible with
No_Dynamic_Accessibility_Checks restriction.diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
--- a/gcc/ada/make.adb
+++ b/gcc/ada/ma
As part of experimenting with No_Dynamic_Accessibility_Checks, it seems
that reverting the meaning of -gnatd_b is a better default for this
experiment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb, sem_util.adb: Revert meaning of -gnatd_b.
* sem_res.adb:
Cursors for Hashed maps and hashed sets include a component that speeds
up iteration over these containers. However, in the presence of multiple
insertions into the corresponding hash-tables, this component may become
unreliable when a cursor obtained before an iteration is compared with a
cursor d
Make it explicit that tasking is not used in the compiler, which also
allows generating simpler and more efficient code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/system.ads: Add No_Tasking restriction.diff --git a/gcc/ada/gcc-interface/system.ads b/gcc/a
If an exception declaration occurs in a nonstatic scope (for example,
within the body of a task type),
System.Exception_Table.Register_Exception is to be called the first (and
*only* the first) time the declaration is elaborated. A library-level
"this exception has been registered" Boolean flag wa
For a packed constrained array type with a Component_Size clause, it
may be possible to compute both its RM_Size and Esize. Do this as it
benefits GNATprove for checking validity of overlays.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* layout.adb (Layout_Type): Special c
201 - 300 of 3273 matches
Mail list logo