This patch fixes an issue in the compiler whereby postconditions were
incorrectly checked prior to the execution of finalization.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb, contracts.ads (Build_Postconditions_Procedure):
Add declarations for Postc
This fixes an issue when setting the baud rate. The baud rate is set
using the cfsetospeed and cfsetispeed system calls. The code is using
speed_t for clarity. The non-blocking status is only reset when Block is
True. And serial blocking mode is now properly set according to termios
manual.
Add do
incremental builds. The actual correction is a few patches later in my
porting queue: I’m about to commit it. Sorry for the trouble!
--
Pierre-Marie de Rodat
This makes the code more explicit for the sake of static analyzers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuer.adb (Scan_Decimal_Digits): Tweak overflow test.
(Scan_Integral_Digits): Likewise.diff --git a/gcc/ada/libgnat/s-valuer.adb b/gcc/ada/l
This adds some OS constants that are needed to control the serial port
on GNU/Linux.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* s-oscons-tmplt.c: Add some OS constants.diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c
--- a/gcc/ada/s-oscons-tmplt.c
+++ b/
Unit Ada.Text_IO.Fixed_IO is now generic, which makes it necessary to
exclude the generic body from SPARK explicitly because it uses type
Long_Long_Float which is not supported in GNATprove. This ensures that
the unit can be instantiated from SPARK code.
Tested on x86_64-pc-linux-gnu, committed on
Reject contracts Contract_Cases, Test_Case and Subprogram_Variant whose
expression is either "null", "(null record)" or has extra parentheses.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specifications): Add a codefix
for extra parent
GNAT.Expect.Non_Blocking_Spawn executes memory allocation/deallocation
after calling fork on the child process side. The libgmem library could
write to the same gmem.out file in the parent and child processes
simultaneously before the child process would load and initialize the
new executable file.
There is a typo in the formula to compute Maxpow exposed in the comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-powtab.ads (Maxpow): Use explicit formula in comment.diff --git a/gcc/ada/libgnat/s-powtab.ads b/gcc/ada/libgnat/s-powtab.ads
--- a/gcc/ada/libg
The example for Test_Case pragma was rejected by the compiler; now
fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst
(Test_Case): Change integer to float literals.
* gnat_rm.texi: Regenerate.diff --git a/gcc
When System.Memory implementation is using Debug_Pools, Common ATCB's
uninitialized Global_Task_Lock_Nesting component may be used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-tporft.adb (Register_Foreign_Thread): Set
Global_Task_Lock_Nesting before us
Simplify membership test on N_Procedure_Call_Statement and
N_Function_Call using the collective N_Subprogram_Call subtype. Cleanup
only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb, exp_util.adb, sem_ch4.adb, sem_disp.adb,
sem
The final computation now needs to be protected against artificial
underflow when the value is very small.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valrea.adb (Maxexp32): New constant array.
(Maxexp64): Likewise.
(Maxexp80): Likewise.
Local variables in parsing of formal object declarations take only
positive values, so their types can be narrowed to Pos. Cleanup only;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch12.adb (P_Formal_Object_Declarations): Refine types to
It is not leaking on Linux because the memory heap is reinitialized when
the new executable is loaded into the child process after calling fork.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-expect.adb (Non_Blocking_Spawn): Deallocate elements
on Arg_List
Most of the errors of the form "(Ada 83) ..." don't have a colon; fix
inconsistencies.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch3.adb (P_Modular_Type_Definition): Remove colon from
error message.
* sem_ch11.adb (Check_Duplication): Likewise.
Fix mismatch in iterating over a range for Ada 2012 and referencing an
array for Ada 95. This didn't affect the behaviour, because the
referenced boolean flags in both arrays were the same for the iterated
subrange.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* impunit.adb
Simplify membership test on N_Delay_Relative_Statement and
N_Delay_Until_Statement using the collective N_Delay_Statement subtype.
Cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch9.adb, sem_warn.adb: Simplify membership test.diff
Rename it to IS_Scope so that calling scope (node) under gdb is
unambiguous, so ease debugging sessions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ali.ads, ali.adb, bindo-writers.adb, lib-writ.adb (Scope):
Renamed to IS_Scope.diff --git a/gcc/ada/ali.adb b/gcc/
This adds complete postconditions and contract cases to subprograms in
Ada.Strings.Fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strfix.ads: Add postconditions and contract cases to
subprograms.
patch.diff.gz
Description: application/gzip
A loop parameter specification over a container is rewrtten as an
iterator specification, so that expansion can use the Iterator
opwrations declared for the container type. If an Ada2020 interator
filter appears on the loop_parameter_specification it must be transfered
to the iterator, and preanaly
Implement symbolic tracebacks on armhf-linux. It's an ELF target so
just a matter of some bookkeeping changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-objrea.ads (Object_Arch): Add ARM enum
* libgnat/s-objrea.adb (Initialize): Add EM_ARM case.
On Wed, Dec 16, 2020 at 1:18 PM Pierre-Marie de Rodat
wrote:
> Thank you. I can reproduce the issue: at this point I suspect that my
> testing hasn’t detected this because of some inconsistency with my
> incremental builds. The actual correction is a few patches later in my
> portin
A cascaded error leads to some confusion in this case, fixed by making
Inherit_Predicate_Flags a no-op pre Ada 2012.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Inherit_Predicate_Flags): No-op before Ada 2012.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_
When mixing the <> in an aggregrate and the default initialization of
the Type involved by the box references Type'Access, GNAT may generate a
spurious error of the form:
"Access" attribute cannot be applied to type
Fixed by only considering nodes that come from source in this legality
check:
These fixes aim at making GNAT messages more readable and uniform, just
by following the current rules generally followed for messages:
- start with a lowercase character
- use ALL CAPITAL for keywords (so that they are properly quoted in the
final message), Capitalized attribute/pragma names
- u
When declaring a component of a protected type as part of a controlled
type, the compiler may crash trying to generate the finalize routine.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch7.adb (Make_Final_Call, Make_Init_Call): Take protected
types into accou
An improper run-time error is raised on a bounded synchronized queue
when the container element is a discriminated type that is itself a
bounded container.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cbsyqu.ads (Implementation): Provide a box
initializa
This flips the default for the generation of encodings for fixed-point
types in the debugging information generated by the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.adb (Get_Encoded_Name): Generate encodings for fixed
point types only if -fgn
This patch fixes an issue in the compiler whereby a reference to the
current instance of the type occurring within a subtype contraint causes
a crash during backend expansion of associated discriminant checks.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Build
This changes the implementation of the Value attribute for floating-point
types not to use exponentiation to compute the final value, at least for
the common bases 2, 4, 8, 10 and 16. The powers of two use the Scaling
attribute instead, while a precomputed table of powers is used for 10.
The first
Discrete values in unchecked conversions were only folded when
compiling. Now they are also folded in GNATprove and semantics checking
modes (-gnatc).
This is particularly important for calls to static functions, since
unchecked conversions are likely to appear for their actual parameters
or resu
Reuse Error_Msg_Ada_2020_Feature to complain about a missing -gnat2020
switch when code that would be legal in Ada 2020 is compiled in an
earlier language version.
Also, refer to language construct and not to syntactic category of the
missing feature, i.e. "declare expression" and not "declare_exp
...Append and container aggregates.
This patch implements the above AI, except we do not yet remove
the Append procedures that append vectors (for compatibility
reasons).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cbdlli.adb, libgnat/a-cbdlli.ads,
lib
Routines that examine the parent chain of a subexpression don't need to
cross the subprogram or package boundaries and go until the very root of
the compilation unit.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (In_Check_Node): Add guard and rename Node to
Complain about missing -gnat20xx switches when the code would be
accepted in a newer version of Ada rather than silently rejecting it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch12.adb (P_Formal_Derived_Type_Definition): Complain
about formal type with asp
In Analyze_Case_Statement we save the current value of
Unblocked_Exit_Count with the intention to restore it on exit. However,
when returning early due to errors we failed to restore the previous
value. It seems cleaner to only modify this variable after the possible
early exits.
Mainly just a cle
Spotted by running GNATcoverage on GNAT sources, some subprograms are
no longer used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb: Remove, not used.
* checks.ads: Likewise.
* exp_ch6.adb: Likewise.
* exp_ch7.adb: Likewise.
* ex
This temporary code kept 3+ years ago can now be removed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (New_Requires_Transient_Scope): Renamed
Requires_Transient_Scope.
(Requires_Transient_Scope, Old_Requires_Transient_Scope,
Results_D
Spotted by running GNATcoverage on GNAT sources, some files are no
longer used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* symbols.ads, symbols.adb: Removed no longer used.diff --git a/gcc/ada/symbols.adb /dev/null
deleted file mode 100644
--- a/gcc/ada/symbols.adb
+++
Combining an N_Expression_With_Actions within another
N_Expression_With_Actions is causing inconsistencies and leads to
dropping some actions on the floor. Fixed by creating a transient scope
for declare expressions when needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
There is a fallback code in gigi in case the front-end constructs
trees referencing non existing record fields. At this stage, it's
safer and cleaner to ensure that the front-end never generates such
references, and eventually replace the code in gigi by a gcc_unreachable().
We are not quite there
CM_Membership is used implicitly by some tagged related constructs, and
having it never inlined may cause performance issues, so move it to the
spec by taking advantage of the recently added declare expressions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-tags.
With multi unit naming scheme (e.g. "unit.1.ada" and "unit.2.ada"
instead of "unit.ads" and "unit.adb") the Multiple_Unit_Index global
variable keeps the current index number. It is only assigned by routines
that return non-negative numbers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/a
All Windows Servers till 2019 correcting the socket timeout for 500ms.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Dmitriy Anisimkov
gcc/ada/
* socket.c (__gnat_minus_500ms): Remove
IsWindowsVersionOrGreater from condition.--- gcc/ada/socket.c
+++ gcc/ada/soc
Add a Depends contract to Delete procedures of formal containers to
state that the output value of the Position cursor depends on no inputs
(it is No_Element). This now ensures that no warnings will be emitted
by GNATprove if this value is not used after a call to Delete.
Tested on x86_64-pc-linux
This patch fixes a bug in which the messages produced by
gnatbind could be nondeterministic. In particular, the message:
info: use pragma Restrictions (No_Entry_Calls_In_Elaboration_Code)
could be missing, depending on details that should be irrelevant.
Tested on x86_64-pc-linux-gnu, commit
Clean up Analyze_Object_Renaming and Is_Object_Reference while
implementing this new AI and recognize value conversion of objects as an
object reference.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Arnaud Charlet
gcc/ada/
* sem_ch8.adb (Analyze_Object_Renaming): Simp
Recognize (no-ops for now) new check names Program_Error_Check,
Tasking_Check.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Arnaud Charlet
gcc/ada/
* snames.ads-tmpl (Name_Program_Error_Check,
Name_Tasking_Check): New constants.
* types.ads (Program_Er
This completes the implementation of AI12-0282, which allows variable
control aspects to apply to formal types. This patch extends the
implementation to handle properly formal derived types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Ed Schonberg
gcc/ada/
* par-ch12
Expansion of attribute Enum_Rep applied to First and Last attributes,
both in the standard compilation mode and in the GNATprove mode, relies
on those First and Last attributes being already expanded. However, they
were only expanded in the standard compilation mode; now they are also
expanded in t
In the special expander that is only applied in GNATprove mode we had a
code that duplicated Get_Index_Subtype routine from the standard
expander. Now this routine is properly reused. Behaviour of both GNAT
and GNATprove remains unchanged.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06
For aggregate components that are aggregates the frontend has been
enhanced to evaluate if the inner aggregate depends on the variable
being assigned to. This enhancement allows the compiler to avoid the
generation of a temporary and thus generate better code for large nested
aggregates.
Tested on
This disables the warning given in the specific case of an atomic
composite object subject to an address clause accessed partially,
when the code is compiled in Ada 2020 mode, on the grounds that
the semantics of these accesses to components of atomic composite
objects is perfectly defined in Ada 2
If we're doing 'First or 'Last on a renamed variable, the backend may
look at either the Etype of the variable or that of what it was
renaming, so check both to see if we need to place it into the
activation record.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Richard Kenner
g
Predicate checks are required by AI12-0100 when evaluating qualified
expressions where the qualifying subtype has such checks. Errors rather
than warnings must be issued on static qualified expressions and type
conversions that violate a static predicate, so that's corrected here.
There were also c
Use pragma Warnings to silence a spurious warning that may occur in
instances of formal vectors.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Claire Dross
gcc/ada/
* libgnat/a-cofove.adb (Insert_Space): The computation of Index
generates a spurious compiler wa
The Name_SPARK constant is no longer used in GNAT to implement the
SPARK_05 restriction, but is still used in GNATprove to detect whether
the SPARK.Heap unit has been explicitly WITH-ed.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Piotr Trojanek
gcc/ada/
* snames.ads
This patch corrects an issue whereby calls to controlled primitives for
types which extend generic formals may be flagged at compile-time as
being non-visible.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Justin Squirek
gcc/ada/
* sem_ch4.adb (Analyze_One_Call): Add e
The Jorvik profile is a newly defined profile, similar to the Ravenscar
profile but less restrictive in some cases. It differs from the
Ravenscar profile only in the removal of six restrictions and the
relaxation of one (Ravenscar's Simple_Barriers restriction is replaced
with a Pure_Barriers restr
This change adds a missing check on setting aspects Storage_Size and
Storage_Pool on remote access-to-class-wide types.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Arnaud Charlet
gcc/ada/
* sem_cat.ads: Fix typo.
* sem_cat.adb (Validate_Remote_Access_To_Class
Most cases were actually handled fine thanks to some special handling in
exp_attr.adb, but cases of e.g. a renaming of renaming were not handled
properly. Taking this opportunity to simplify the code and remove
special cases by actually adding support for 'Enum_Rep directly in
Eval_Type_Conversion.
Change the existing implementation of the Simple_Barriers restriction to
conform to the rules given in AI12-0290. Note that the new rules are in
some cases more restrictive than the old rules (so that previously
accepted barriers might now be rejected). For example, references to
non-component subc
Expansion of Enum_Rep in GNATprove is meant to be a subset of the
expansion in GNAT, so it needs to be kept in sync with the frontend.
Semantics of the compiler is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Piotr Trojanek
gcc/ada/
* exp_spark.adb (Expa
AI12-0204 clarified that the prefix of a prefixed view that is renamed
or passed as a formal subprogram must be renamable as an object and
similarly (was already checked by GNAT), the prefix of a prefixed view
that has an implicit 'Access must be legal for 'Access and a
generalized_indexing is ille
The flag was made obsolete some time ago and no fallout has been
detected since then, so this change finally removes it.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-08 Eric Botcazou
gcc/ada/
* atree.adb (New_Copy): Do not clear Has_Dynamic_Range_Check.
* checks.
In Ada2020 the Ravenscar profile (but not the Jorvik profile) includes
a "No_Dependence => Ada.Synchronous_Barriers" restriction. This is a
binding interpretation so it applies also to earlier Ada versions, but
the unit Ada.Synchronous_Barriers did not exist before Ada 2012.
Tested on x86_64-pc-li
An access type whose designated type is an incomplete or class-wide type
may end up designating a task type or a type with a task component. It
is then necessary to associate the access type with the Master of the
tasks that may be generated on an allocator for that access type. This
is done by cre
This removes an obsolete bypass present for long in the predicate
Is_Visible_Component, which is responsible for determining whether
a component present in a private tagged record type is visible in
its extensions. This bypass would essentially always return true
in bodies of instances, but there
This AI clarifies that predicate checks apply at object declaration for
types that contain components with a Default_Value or
Default_Component_Value.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* sem_util.ads, sem_util.adb (Is_Partially_Initi
We were accepting conversion from anon-access-T'Class to access-all-T
which is incorrect.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* sem_type.adb (Covers): Fix implementation of AI05-0149.
* sem_res.adb: Fix typo.--- gcc/ada/sem_res
This patch refines the checks and the corresponding error messsages on
the legality of instantiations where some formal objects and their
corresponding actuals may carry Atomic, Atonic_Components, Volatile,
Volatile_Components, Independent, or Independent_Components aspect
specifications. The lega
Synchronous barriers are currently not supported by GNATprove (i.e. it
doesn't recognize that they are initialized by synchronous). They are
specifically detected and rejected as not-in-SPARK, but it is more
elegant to annotate the Ada.Synchronous runtime library unit with
SPARK_Mode => Off.
Compi
This patch corrects an issue whereby the compiler would incorrectly
generate checks for overlapping formals (-gnateV) leading to spurious
runtime errors when a zero-sized array actual gets passed alongside
another formal declared in the same region.
Tested on x86_64-pc-linux-gnu, committed on trun
This patch corrects an issue whereby the compiler would crash if it
encountered an exit statement featuring a loop identifier where such
referenced loop iterates through a predicated type.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Justin Squirek
gcc/ada/
* exp_ch5.
Make each invocation graph point to the corresponding library graph. Use
this information in Write_Invocation_Graph_Vertex to print out the name
of the library item containing this vertex.
For procedures that take both the library graph and invocation graph as
parameters, remove the library graph
When raising Program_Error due to an incorrect Kind transition, print a
more informative debugging message.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Bob Duff
gcc/ada/
* bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the
old and new Kinds to the r
GNAT ignores the null exclusion property of the target access type in a
membership test (e.g. Ptr in Null_Excluding_Ptr_Type), this is fixed
here.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch4.adb (Expand_N_In): Fix handling of null ex
This patch corrects the assertions in Add_Edge_Kind_Check. In
particular, a spec-->body edge can come from an Invocation_Edge or a
Forced_Edge in case of cycles. Other edges are added in a certain
order.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Bob Duff
gcc/ada/
This patch disables a sometimes-failing assertion. The assertion is
failing because there is an invocation edge spec-->body, and then we
later add a Body_Before_Spec_Edge for the SCC computation. This is a
temporary fix; we need to investigate why the spec-->body invocation
edge exists.
Tested on
This is a useful optimization to avoid contention around the shared
empty string.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* libgnat/a-strunb__shared.ads, libgnat/a-strunb__shared.adb
(Reference, Unreference): No-op for Empty_Shared
Side_Effect_Free was always assuming an aggregate isn't side effects
free, but we can do better by taking advantage of the
Compile_Time_Known_Aggregate flag.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_util.adb (Side_Effect_Free): Improv
This implements the support for the new C_Variadic_n conventions,
n ranging from 0 to 16, in all versions of the language since the AI is
a binding interpretation.
These new conventions are meant to be used in conjunction with the
Import aspect/pragma to call variadic C functions with the special
Now that there is no artifical limit on Convert_To_Positional, we use
the same heuristics than in Aggr_Size_OK, to share the code and to
generate static aggregates in more cases.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_aggr.adb (Max_
This moves around the declarations of functions that are not in the
right category, adds pragma Inline for others and fixes alphabetization
issues.
This also clearly splits the functions subject to pragma Inline from the
procedures subject to the pragma, the former being read by XEINFO but
not the
We identify all the places where error messages are issued in the
expander and should be issued in semantic analysis instead, for future
clean ups.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch3.adb, exp_ch4.adb, exp_ch6.adb, exp_ch9.ad
When a dispatching operation overrides an inherited subprogram, it must
be subtype conformant with the inherited subprogram. Such check is not
performed by the frontend on overriding primitives of private types
which are declared before the full type declaration of the private type.
Tested on x86
This change is a step towards propagating more consistently the DIC,
Invariant and Predicate attributes between different views of the
same type, in particular to the newly built underlying full views.
It also cleans up the handling of the base types for the DIC and
Invariant attributes, which loo
Before this commit, GNAT would use the type of the expression rather
than that of the subtype mark in order to decide whether it should
generate range checks or not. This means that in some cases, GNAT would
decide that no range checks were needed, which was wrong. This issue
went mostly unnoticed
This patch further refines the checks and the corresponding error
messsages on the legality of instantiations where some formal types and
their corresponding actuals may carry Atomic, Volatile, etc. aspect
specifications. The legality rules stated in RN 6.1 (12/5) are in fact
backward-incompatibl
This is a code clean up as part of removing all calls to Error_Msg* in
the expander.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-09 Arnaud Charlet
gcc/ada/
* exp_ch5.adb (Expand_N_Assignment): Remove kludge for
AI05-0087.
* sem_ch12.adb (Validate_Derived
Routine Get_Low_Bound was added to frontend while moving utility
routines from the GNATprove backend, but it is no longer referenced.
(Surprisingly, there is no Get_High_Bound routine anywhere).
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
gcc/ada/
* se
The `if Token = ...` condition was added when aspect specifications were
introduced in GNAT: aspect specification parsing is done as part of
subprogram declaration parsing, and so once aspect specifications are
parsed, it is necessary to re-start the subprogram declaration-parsing
autotmata. But re
This commit fixes a bug introduced in a previous commit that attempted
to detect illegal body definitions on null procedures but did not
account for the fact that function definitions such as `function F
return Integer with Global => null is` could use the same path. This
would result in an asserti
This patch corrects an issue whereby the compiler would issue incorrect
accessibility errors and checks for objects initialized by functions
returning anonymous access types or type conversions where the operand
is a function returning an anonymous access type.
Tested on x86_64-pc-linux-gnu, commi
Membership test operators (i.e. "in" and "not in") have either the right
operand present (when there is just one choice) or the list of
alternatives present (when there are many choices), as documented in
sinfo.ads.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
g
When post-call actions need to be inserted in an expression context, an
N_Expression_With_Actions node is used. That's not done here for the
condition of an if-expression, so the change adds this case.
It also deals with the case of a call to a primitive of a tagged type
written in prefixed notat
Overriding dispatching primitives Initialize, Adjust or Finalize of a
controlled type by means of a subprogram body that has no specification
causes the frontend to initialize incorrectly the dispatch table slots
of these primitives.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 J
A workaround for a bug in expansion of Enum_Rep attribute in the
GNATprove mode was to expand First and Last attributes. Now with
handling of Enum_Rep fixed we don't need this workaround anymore.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Piotr Trojanek
gcc/ada/
* e
This patch implements AI12-0220, which adds contracts to
Access_To_Subprogram types so that pre/postconditions are applied to all
indirect calls through such an access type.
Tested on x86_64-pc-linux-gnu, committed on trunk
2020-06-10 Ed Schonberg
gcc/ada/
* einfo.ads (Access_Subprog
801 - 900 of 3386 matches
Mail list logo