This patch changes Declaration_Node to avoid returning certain strange
node kinds. We don't avoid them all (in particular N_Null_Statement),
but we document what it's returning with a pragma Assert.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.adb (Declaration
The GMP variant of Ada.Numerics.Big_Numbers.Big_Integers is currently
not used, but since we keep it, it seems worth to keep it up-to-date
with respect to the corresponding spec.
Part of providing a gdb pretty-printer for Big_Integer objects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
When casing on a composite value, certain component types/subtypes were
previously disallowed. These included access types, real types,
nonstatic discrete subtypes, and others. This restriction is relaxed so
that such components are now allowed, but no non-box value may be
specified for such a comp
Replace a confusing loop with two exit staments by a straightforward
while loop with an explicit condition. Also, explicitly iterate over
discriminants and components, not over entities.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Composite_Equality):
If a field has Type_Only set to something other than No_Type_Only, then
we need to fetch the field from a possibly different node. For example,
the Modulus field has Type_Only = Base_Type_Only (and is documented as a
"[base type only]" field in Einfo). Therefore if we try to get Modulus
from node N
Update all ?X? to ?.x? (likewise for [-gnatwx]
* ?_x? -> [-gnatw_x]
* ?.x? -> [-gnatw.x]
With the support of the ?_x? insertion sequences, messages that related
to -gnatw_a, -gnatw_c, -gnatw_p, -gnatw_r are now correctly advertised as
relating to these.
Tested on x86_64-pc-linux-gnu, committed o
Subsequent to prior major cleanups of Uint fields, this patch includes a
few more, fairly minor, cleanups.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Fixed_Point_Type): Remove
previously-inserted test for Uint_0; no longer needed.
* ge
This patch improves the handling of the Ada_2022 aspect involving
user-defined literals on integers, reals, and strings, when the literal
that must be converted to a type (for which the aspect is defined)
appears as an operand of a predefined operator. The target type may be
given by the type of th
These tools are no longer maintained and have never supported project
files. They are replaced by the Ada Language Server which implements the
Language Server Protocol.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Rem
Removal of the previous kernel registration scheme unearthed mistakes in
the new one, which were:
- The new kernel registration code relied on the binder expansion phase,
which didn't happen because the registration code was already
generated by the binder.
- The kernel handle passed to CUDA_Re
This patch adds empty constructors to the functional containers so that
we can use them in expression functions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cofuma.ads, libgnat/a-cofuma.adb,
libgnat/a-cofuse.ads, libgnat/a-cofuse.adb,
libgnat/a-
As a result of other recent changes, the Convert_To_Return_False flag
is never set. The flag can be therefore be deleted.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch11.adb (Expand_N_Raise_Expression): Remove
Convert_To_Return_False test.
* gen_il-f
The internal unit System.Generic_Array_Operations defines only generic
subprograms. Thus, pragma Assertion_Policy inside the spec has no
effect, as each instantiation is only subject to the assertion policy at
the program point of the instantiation. Remove this confusing pragma,
and add the pragma
After changes in GNATprove, adapt proof. Simply move an assertion up
before it is first needed here.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-arit32.adb (Scaled_Divide32): Move assertion up.diff --git a/gcc/ada/libgnat/s-arit32.adb b/gcc/ada/libgnat/s-arit32
The previous change introduced a backward incompatibility in the handling
of a user-defined "=" operator for a class-wide type of a tagged type: it
would previously hide the predefined "=" operator of the tagged type in
the private case, but it no longer does in this case, while it still does
in th
When static dispatch tables are built for library-level tagged types, the
primitives (the subprogram themselves) are frozen; that's necessary because
their address is taken. However, their profile, i.e. all the types present
therein, is also frozen, which is not necessary after AI05-019 and is als
Minor fix in a recently added comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cofuse.ads (Empty_Set): Fix typo in comment.diff --git a/gcc/ada/libgnat/a-cofuse.ads b/gcc/ada/libgnat/a-cofuse.ads
--- a/gcc/ada/libgnat/a-cofuse.ads
+++ b/gcc/ada/libgnat/a-co
Mention when security hardening features are available in other
languages.
Expand the strub documentation a little, for clarity and completeness.
Add missing 'aliased' and attribute to variables in strub example.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/
Changes in GNATprove (translation to Why3 and provers) result in proofs
being much less automatic, and requiring ghost code to detail
intermediate steps. In some cases, it is better to use the new By
mechanism to prove assertions in steps, as this avoids polluting the
proof context for other proofs
To handle code common to the old and the new CCG code generator.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnat1drv.adb, opt.ads, sem_ch7.adb: Introduce CCG_Mode.diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.
There is no need to analyze expression functions that are primitives of a
tagged type for its dispatch table because they will be analyzed at the end
of the current scope.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Resolve_Attribute) : Don't analyze
The left-overs of the old freezing code in Make_DT are now redundant since
the semantic analyzer performs the same task for the 'Access attribute.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Make_DT): Remove remaining freezing code.diff --git a/gcc/ada/exp_
The presence of the discriminants prevents the values associated with the
components of the parent type from being put into the sub-aggregate built
for the _Parent component.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Expand_Record_Aggregate.Build_Back_End
The expression given in a Static_Predicate aspect specification is
required to be predicate-static. The implementation of this compile-time
check was incorrect in some cases. There were problems in both
directions: expressions that are not predicate-static were incorrectly
treated as though they we
Both the `System.Mmap` and `System.Object_Reader` packages are defining
entities named `Offset` and they are both `use`d at the top of
s-dwalin.adb.
Therefore, the references to `Offset` throughout this file are
ambiguous, and GNAT is supposed to complain. Since it does not for the
moment, we fix
This patch corrects an error in the compiler whereby spurious
unreferenced warnings are generated on formal parameters of null generic
subprograms.
These changes also fix the parsing of aspects on formal parameters such
that the aspects now get properly set for all formal parameters in a
parameter
This patch fixes a bug whereby if a function body has local objects that
are finalizable, and has a return statement that requires generation of
transient finalizable temps, and there are dynamic-sized objects
requiring pushing/popping the (primary) stack at run time, and the
function body has exce
This caused these warnings not to be tagged with the switch causing
them, which is an issue for tools ingesting GNAT's output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_elab.adb (Process_Conditional_ABE_Access_Taken): Add '.f'
insertion characters.diff --gi
While cleaning up and modifying code for unreferenced warnings we
removed all calls to Defer_Reference, which was the only routine that
populated the Deferred_References table. Consequently, all the code
related to this table became dead.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This caused tools ingesting GNAT's output to mislabel these messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
Fix insertion character.diff --git a/gcc/ada/sem_disp.adb b/gcc/ada/sem_disp.adb
--- a
This caused tools ingesting GNAT's output to mislabel these messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Warn_On_Useless_Assignment): Fix insertion
character.diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
--- a/gcc/ada/sem_warn.ad
This enables tools that ingest GNAT's output to properly classify these
messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Warn_Overlay): Add 'o' insertion character.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Likewise.
* sem_uti
This enables tools that ingest GNAT's output to properly classify these
messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* inline.adb (Check_Package_Body_For_Inlining): Add insertion
character.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
--- a/gcc/ada/
The GNAT behaviour regarding the Ada RM requirement to support Address
clauses for imported subprograms was documented twice: in section about
packed types (which was a mistake) and in section about address clauses
(where it belongs).
Cleanup related to the use of packed arrays for bitset operatio
When implementing structural subprogram variants we ignored them in
expansion of the pragma itself, but not in expansion of a recursive
subprogram call. Now fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Check_Subprogram_Variant): Ignore structural
Remove a minor duplication in Post of a function of formal doubly linked
lists.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfdlli.ads (Insert): Remove the duplication.diff --git a/gcc/ada/libgnat/a-cfdlli.ads b/gcc/ada/libgnat/a-cfdlli.ads
--- a/gcc/ada/libgna
This enables better integration with tools that handle GNAT's output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* erroutc.ads (Get_Warning_Option): New function returning the
option responsible for a warning if it exists.
* erroutc.adb (Get_Warning_Option
Without this patch, gnat would use `-gnatw?` as the default option for
some of the default warnings.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* erroutc.adb (Get_Warning_Option): Don't consider `?` as a
valid option switch.diff --git a/gcc/ada/erroutc.adb b/gcc/a
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.adb (Locate_File): Change variable to constant and
initialize it by concatenation of directory, file name and NUL.diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
--- a/gcc
For a membership test "X in A .. B", the compiler used to warn if it
could prove that X is within one of the bounds. For example, if we know
at compile time that X >= A, then the above could be replaced by "X <=
B".
This patch suppresses that warning, because there is really
nothing wrong with th
This patch fixes a bug where the compiler generates incorrect code for a
call via an object with convention C, whose type is an anonymous
access-to-function type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.adb (Set_Convention): Call Set_Convention
re
Both flags were added when square brackets for array/container
aggregates have been enabled with -gnat2022 without their corresponding
inline documentation. This change adds the missing documention.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sinfo.ads: Add inline docume
This case was missed in the previous change.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Freeze_Subprogram.Register_Predefined_DT_Entry): Put
the actions into the Actions field of the freeze node instead of
inserting them after it.diff --git
Various cases of out-of-order keywords in the definition of a record
were already detected. This adds a similar detection after NULL and
RECORD keywords.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch3.adb (P_Known_Discriminant_Part_Opt): Reword error
message
Augment the warnings issued with switch -gnatwh, so that a warning is
also issued when an entity from the package of a use_clause ends up
hidden due to an existing visible homonym.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (Use_One_Package): Possibly warn.
The usual increment of the pc to pc+2 for ARM is needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* init.c (QNX): __gnat_adjust_context_for_raise: New
implementation for arm-qnx.diff --git a/gcc/ada/init.c b/gcc/ada/init.c
--- a/gcc/ada/init.c
+++ b/gcc/ada/init
This patch adds reference counting to dynamically allocated pointers
on arrays and elements used by the functional container. This is done
by making both the arrays and the elements controlled.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cofuba.ads, libgnat/a-c
This patch makes the search for Get_Element_Access, Step (Next/Prev),
Reference_Control_Type, and Pseudo_Reference (for optimized "for ... of"
loops) more robust. In particular, we have a new Next procedure in Ada
2022, and we need to pick the right one.
We have not yet added the new Next and oth
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.ads (Expand_Interface_Thunk): Change type of Prim.
* exp_disp.adb (Expand_Interface_Thunk): Declare Is_Predef_Op
earlier, do not initialize Iface_Formal, use No idiom and tweaks
In some cases, the compiler would incorrectly fail to generate
discriminant checks when accessing fields declared in a variant part.
Correct some such cases; detect the remaining cases and flag them as
unsupported. The formerly-problematic cases that are now handled
correctly involve component refe
This makes tagging more accurate.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Check_References): Adjust conditions under which
warning messages should be emitted and their tags as well.diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
--- a/g
Having components that need to be returned on the secondary stack would
not always force a record type to be returned on the secondary stack
itself.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb
(Returns_On_Secondary_Stack.Caller_Known_Size_Record): Di
Shared libraries now fully supported on arm-qnx.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (GNATLIB_SHARED): Revert disablement for arm-qnx.diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -1
This is needed after the creation of Returns_On_Secondary_Stack from the
original Requires_Transient_Scope.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Indirect_Temp_Needed): Adjust reference in comment.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.a
Avoid improperly suppressing checks for the wrapper subprogram that is
built when a null type extension inherits (and does not override) a
function with a controlling result. This is a follow-up to other changes
already made on this ticket.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ad
Some features haven't got customer feedback or made upstream yet.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/security_hardening_features.rst: Note that hardening
features are experimental.
* gnat_rm.texi: Regenerate.diff --git a/gcc/ada/doc/g
The initial work didn't change anything for limited types because they use
a specific return mechanism for functions called build-in-place where there
is no anonymous return object, so the secondary stack was used only for the
sake of consistency with the nonlimited case.
This change aligns the li
When analyzing an array or record type declaration whose component has a
constrained access type, e.g.:
type Buffer_Acc is not null access all String;
type Buffer_Rec is record
Data : Buffer_Acc (1 .. 10);
end record;
type Buffer_Arr is array (Boolean) of Buffer_Acc (1 .. 10);
The combination of pragma/aspect Inline_Always and -gnateV -gnata runs
afoul of the handling of inlining across units by gigi, which does not
inline a subprogram that calls nested subprograms if these subprograms
are not themselves inlined.
This condition does not apply to internally generated sub
This commit makes GNAT use absolute paths in -fdiagnostics-format=json's
output when -gnatef is present on the command line. This makes life
easier for tools that ingest GNAT's output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_
Bump the pc +3 total for Thumb mode, the same calculation that as is
done for arm-linux.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* init.c (__gnat_adjust_context_for_raise) [QNX][__thumb2__]: Bump
the pc an extra byte.diff --git a/gcc/ada/init.c b/gcc/ada/init.c
When subtype predicate checks are added for object declarations, it
could lead to a compiler crash or to an incorrect check.
When the subtype for the object being declared is built later by
Analyze_Object_Declaration, the predicate check can't be applied on the
object instead of a copy as the call
Correction of a typo regarding indexes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfdlli.adb ("="): Make the function properly loop
over the right list.diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb
--- a/gcc/ada/libgnat/a-cf
This fixes a small oddity whereby a subprogram body declared without a spec
would be frozen before its entity is fully processed as an overloaded name.
Now the latter step computes useful information, for example whether the
body is a (late) primitive of a tagged type, which can be required during
This pragma was wrongly not recognized as an assertion pragma. Now
fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.ads (Assertion_Expression_Pragmas): Fix value for
pragma Subprogram_Variant.diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads
--
The Returns_On_Secondary_Stack predicate is a misnomer because it must be
invoked on a type and types do not return; as a matter of fact, the other
Returns_XXX predicates apply to functions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Caller_Known_Size): Inv
On illegal code like:
type T is new Positive in range 1..5;
the compiler was emitting message:
error: extra "in"ignored
^^
which lacked a space character.
A tiny diagnostic improvement; spotted while mistakenly typing an
illegal test.
Tested on x86_64-pc-linux-gnu, comm
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-qnx-arm.ads (Memory_Size): Compute based on
Word_Size.diff --git a/gcc/ada/
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-aarch64.ads (Word_Size): Compute
based on Standard'Word_Size. (Mem
Volatile variables marked with the No_Caching aspect can now have
confirming aspects for other volatile properties, with a value of
False.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb (Check_Type_Or_Object_External_Properties): Check
the validity of
This patch adds Global contracts and preconditions to subprograms of
Interfaces.C.Strings. Effects on allocated memory are modelled
through an abstract state, C_Memory. The preconditions protect against
Dereference_Error, but not Storage_Error (which is not handled by
SPARK). This patch also disabl
This patch adds SPARK annotations to subprograms from
System.Address_To_Access_Conversions. To_Pointer is considered to have
no global items, if the returned value has no aliases. To_Address is
forbidden in SPARK because addresses are not handled.
Tested on x86_64-pc-linux-gnu, committed on trunk
We need to use Extended_Index for the Position parameter of the Element
function in formal vectors so it is compatible with other primitives of
the Iterable aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfinve.ads (Element): Change the type of the
This patch corrects an error in the compiler whereby gnatbind may crash
during calculation of file checksums in certain corner cases due to
uninitialized lookup tables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatbind.adb (Gnatbind): Add initialize call for Uintp
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-aarch64-rtp-smp.ads (Word_Size):
Compute based on Standard'Word_Si
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-linux-arm.ads (Memory_Size): Compute based on
Word_Size.diff --git a/gcc/ad
The two flags apply to base types only like Has_Own_Invariants.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Propagate_DIC_Attributes): Add ??? comment.
(Propagate_Invariant_Attributes): Likewise. Propagate the
Has_Inheritable_Invariants and
This patch adds preconditions to Update procedures, to protect from
Update_Error propagations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-cstrin.ads (Update): Add precondition.diff --git a/gcc/ada/libgnat/i-cstrin.ads b/gcc/ada/libgnat/i-cstrin.ads
--- a/gcc/a
References to ghost entities should only occur in ghost context. This
was not checked systematically on all references.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch2.adb (Analyze_Identifier): Add checking for ghost
context.
* sem_ch5.adb (Analyze_I
Preconditions of Update procedures were always true when Offset was 0.
The changes enable to protect from Update_Error when Offset is 0.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-cstrin.ads (Update): Update precondition.diff --git a/gcc/ada/libgnat/i-cstrin.a
Testing Is_Frozen is not robust enough, so instead test that the full view
has been seen and that the Has_Completion flag is set on it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Check_Expression_Function.Find_Constant): Make test
for deferred consta
Document that dynamic tables are defined aliased for backward
compatibility.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-dyntab.ads (Table_Type): Update documentation.diff --git a/gcc/ada/libgnat/g-dyntab.ads b/gcc/ada/libgnat/g-dyntab.ads
--- a/gcc/ada/libgnat
This feature is an architecture feature, not an OS feature, so enable
on vx7r2 for arm and aarch64 to coincide with what is done on similarly
capable targets.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-arm.ads (Support_Atomic_Primitives):
The static dispatch tables of library-level tagged types are either built
on the first object declaration or at the end of the declarative part of
the package spec or body. There is no real need for the former case, and
the tables are not built for other constructs that freeze (tagged) types.
Ther
This avoids making Expand_Interface_Thunk visible from the outside.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Freeze_Subprogram.Register_Predefined_DT_Entry): Move
procedure to...
* exp_disp.ads (Expand_Interface_Thu
After the recent fix for detecting illegal use of ghost entities in
code, spurious errors could be raised on generic code with ghost, due to
wrong setting of the ghost flags on copied entities from the generic to
the instantiation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Inline_Always procedures should be kept public for proper inter unit
inlining.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch7.adb (Set_Referencer_Of_Non_Subprograms): New local
procedure, used for code refactoring. Also take into account
Inline_Alway
This commit adds information allowing identification of the subprogram
surrounding the message emitted by gnat when using -gnatdJ along with
-fdiagnostics-format=json.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Write_JSON_Span): Add subprogram name to emitte
Function pointers must always be built with '[Unrestricted_]Access.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Init_Secondary_Tags.Initialize_Tag): Initialize the
Offset_Func component by means of 'Unrestricted_Access.diff --git a/gcc/ada/exp_ch3.ad
GNATprove changed the name of the pragma Annotate used to verify that
a subprogram always returns normally. It is now called Always_Return
instead of Terminating.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb: Use Always_Return instead of Terminating
Before this patch, the Functional Sets ans Maps were bounded both from
the user and the implementation points of view. To make them closer to
mathematical Sets ans Maps, this patch removes the bounds from the
contracts. Note that, in practice, they are still bounded by
Count_Type'Last, even if the
Local_Entity_Suppress and Global_Entity_Suppress variables referencing
tables were refactored to Local_Suppress_Stack_Top and
Global_Suppress_Stack_Top stacks back in 2007. Fix remaining references
to these variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ad
When iterating over list elements with First/Next there is no need to
check if the list is present, because First intentionally returns Empty
if list is not present and the condition of subsequent loop will not be
satisfied.
Code cleanup; semantics is unaffected.
Occurrences of the redundant patt
This eliminates the use of the secondary stack to return specific tagged
types from functions in calls that are not dispatching on result, which
comprises returning controlled types, by introducing thunks whose only
purpose is to move the result from the primary to the secondary stack
for primitive
Thunks are only referenced locally by dispatch tables and never inlined.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Clear the Is_Public
flag on thunks.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/
The -gnatzr switch triggers the creation of distribution stubs for use
by the implementation of PolyORB. Now these stubs declare tagged types
and are generated at the very end of the analysis of compilation units,
after the static dispatch tables have been built, so these tables are
missing for th
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity): Do not check the
scope of anonymous access Itypes.
* gcc-interface/trans.cc (Identifier_to_gnu): Do not translate
the return type of a s
This setting isn't useful in this context.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Makefile.in (gnatlib-shared-default): Add
-fno-lto.diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/
This allows tools ingesting GNAT's output to properly classify these
messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (warn_on_field_placement): Add insertion
character '.q' to warning string.diff --git a/gcc/ada/gcc-interface/decl.cc b
To simplify the bootstrap constraints, duplicate a few definitions in
order to remove dependencies on a recent version of System.Case_Util,
System.Crtl, System.OS_Lib.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.adb (File_Names_Equal): Declare To_Lower locally.
3201 - 3300 of 3426 matches
Mail list logo