This commit implements basic support for the -fdiagnostics-format=json
option that GCC has. When GNAT finds this argument in the command line,
error messages such as:
tmp.adb:4:12: "My_Var" is undefined
Will be printed as:
[
{
"kind": "error",
"locations": [
{
"caret": {
The flag is first set on them as for any other constants but then
cleared when the import pragma is processed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Process_Import_Or_Interface): Do not
artificially record a possible modification for a constan
This is useful for e.g. CodePeer usage.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion
mismatch check when Relaxed_RM_Semantics is set.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_
Detection of overlapping actuals doesn't need to be special-cased for
prefix notation, because it is done after prefixed calls have been
rewritten into ordinary calls, both in normal compilation and semantic
checking mode (with switch -gnatc).
Behaviour is unaffected; the removed code was dead.
T
This patch adds the -gnatd_g switch, which lowers the threshold for
computing static aggregates at compile time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb: Document switch.
* exp_aggr.adb: If -gnatd_g was given, then do not bump the
limit to 5
Normally the warnings:
warning: formal parameter "..." is not modified
warning: mode could be "in" instead of "in out"
are disabled if the type contains components of an access type.
A previous patch enabled such warnings if the only such components
are in internal private types.
This pa
When detecting overlapping actuals we were only examining the type of
the first formal parameter, so that errors and warnings were depending
on the order of parameters.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Warn_On_Overlapping_Actuals): Examine types
These days, gnat check should always call gnatcheck
[--target=prefix], same for gnat test.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatcmd.adb: Fix handling of check and test commands.diff --git a/gcc/ada/gnatcmd.adb b/gcc/ada/gnatcmd.adb
--- a/gcc/ada/gnatcmd.adb
++
This patch corrects a bug in A'First (N), where N is not a literal or
named number -- the compiler would think N = 1, even when it is 2 or
more.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Check_Array_Or_Scalar_Type): Use Expr_Value
instead of Intva
Overlapping actuals of elementary types are illegal since Ada 2012; all
other overlapping actuals are now reported as warnings regardless of the
Ada version (because they are equally suspicious).
We even had a comment:
"Overlap is only illegal in Ada 2012 in the case of elementary
types (pass
The compiler was failing to perform a check on a conversion of an
array that has a length that exceeds the range of the index subtype
of the target subtype of the conversion when the target subtype is an
unconstrained array subtype with a fixed lower bound (FLB). The FLB
array subtype's index range
The compiler incorrectly flags a string literal used to initialize an
array object with a nominal fixed-lower-bound array subtype (and in
other fixed-lower-bound sliding contexts). String literals will already
be given proper bounds when in such contexts based on the applicable
constraint, so no sl
Fix a couple of inaccuracies in the VxWorks signal handler trampoline
for aarch64:
- REGNO_PC_OFFSET, used as the cfi return column number, is better
sync'ed with the back-end's DWARF_ALT_FRAME_RETURN_COLUMN.
- R18 is used by VxWorks for internal purposes so is best left out of
the CFI notes
AAMP is no longer supported. This patch removes AAMP-specific code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ada_get_targ.adb, aspects.ads, checks.adb, cstand.adb,
einfo.ads, exp_attr.adb, freeze.adb, get_targ.adb,
libgnat/a-textio.ads, libgnat/g-memdu
GNAT was freezing prematurely any type referenced in a subprogram
profile as part of freezing, regardless of the scope involved, causing
premature freezing of types and therefore preventing declaration of
additional primitive operations.
This is now almost fully fixed. There is one remaining catch
Constant fold Enum_Lit'Size so the back end won't see it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Eval_Attribute): For Enum_Lit'Size, use
Enum_Type'Object_Size.diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+
This patch fixes a bug in which "gcc -gnatDGL" raises an unhandled
Constraint_Error in checks-on mode if the last line in the file is not
terminated with a line terminator.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sprint.adb (Write_Source_Line): Check for EOF in
This patch does not modify the functionality of the frontend; it ensures
the correct decoration of wrappers of class-wide pre/post conditions
required for AI12-0195.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb (Process_Spec_Postconditions): Add missing
Slices that denote the same objects can be indexed either by integer or
character literals, but the latter was not detected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Denotes_Same_Object): Handle character literals
just like integer literals.diff
Error checks are added to disallow index constraints given with a
mixture of constrained and fixed-lower-bound ranges, and also to
disallow an index constraint with a fixed-lower-bound index applied to a
type or subtype with fixed-lower-bound indexes.
Tested on x86_64-pc-linux-gnu, committed on tr
Routine Denotes_Same_Object wrongly handled renamings of renamings. In a
code like this:
B : Integer renames A;
C : Integer renames B;
names "B" and "C" differ and their renamed object names "A" and "B"
differ too. This patch rewrites this routine to literally follow the RM,
which fixes the
The rules for building s-mmap were missing from aarch64-linux for no
apparent reason. The macros for this package includes other packages
that were also missing. There was no example where s-mmap was added by
itself so the standard macros were added.
Tested on x86_64-pc-linux-gnu, committed on tru
Routine Find_Overlaid_Entity collects entire objects from prefixes of
attribute Address is overlay specifications. The alignment of those
entire objects are then examined in Validate_Address_Clauses.
However, Find_Overlaid_Entity wrongly collects protected components (and
discriminants of concurre
When a sliding conversion is expanded during preanalysis of certain
assertion pragmas (such as Loop_Invariant), to convert an object of to
an array subtype with a fixed lower bound, a Val attribute created as
part of the upper bound expression of the conversion's subtype is not
expanded later when
Routine Indexed_Component_Bit_Offset is meant to return the first bit
position of an array component, but it only examined the first index
expression and necessarily produced wrong results for multidimensional
arrays.
Since this routine is only used for warnings, it is safe to simply
disable this
Statically matching slices in actual parameters are now detected in the
Denotes_Same_Object routine by directly examining the slice indexes and
by a dubious recursive call.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Denotes_Same_Object): Simplify handling
Simplify detection of renamings within actuals that denote the same
object. This code only needs to take object renamings and shouldn't care
about renamings of subprogram, packages or exceptions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Object_Renamin
Typo in description of handling of Address clauses by GNAT; spotted
while implementing support for overlays in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/representation_clauses_and_pragmas.rst (Address
Clauses): Fix unbalanced parens.
The -gnatR output contains information about fixed-point types declared
in the program and it comprises real numbers, which are displayed using
a custom format specific to the compiler, which is not always compatible
with the JSON data interchange format.
The change also fixes an off-by-one bug in
Fix a bug in slices, where a zero-sized slice causes an invalid read
detected by valgrind
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-bituti.ads (Small_Size): Do not include 0 in this
type.
* libgnat/s-bituti.adb (Copy_Bitfield): Do nothing for
-gnatU prepends `error:` to error messages, enabling it by default makes
error messages more consistent with warnings. -gnatw.d tags messages
with the flag that caused them.
As users might need to switch back to the previous behavior, the
`-gnatd_U` flag is introduced to do exactly that.
Tested
Implement the 'Valid_Value attribute for enumeration types. Currently,
'Valid_Value is not supported for types in Standard, because they do not
have image/value tables. Currently, there are no 'Valid_Wide_Image or
'Valid_Wide_Wide_Image attributes.
Tested on x86_64-pc-linux-gnu, committed on trun
Used by GNAT LLVM to handle E_Constant and E_Variable with
Is_Return_Object.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads (Return_Statement): Add documentation.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Set it.
* gen_il-fields.ads: Add
The issue is that the unchecked conversion of small bit-packed arrays
to modular types is not done in memory order, whereas this order is
expected by the System.Bitfield_Utils unit.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb (Expand_Assign_Array_Bitfield_Fas
This patch implements the new language feature described in AI12-0205
that introduces defaults for generic formal types. These defaults are
subtype marks that must denote a type that is usable as an actual in any
subsequent instantiation of the enclosing generic unit. The legality
rules are similar
If slices fit in 32 bits, and bounds are known at compile time, use a
more efficient method for slice assignment. (32 is the usual case here,
we're really talking about Val_Bits, which is 32 on most targets.) We
might want to change 32 to 64 here.
Tested on x86_64-pc-linux-gnu, committed on trunk
This patch implements experimental features under the -gnatX flag for
"return ... when", "raise ... when", and "goto ... when" constructs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst: Document new
feature under pragm
Add Inline and Pure_Function aspects. With these changes, and additional
changes in gigi, we should be able to eliminate duplicate calls to
Value_Enumeration_Pos.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuen.ads (Value_Enumeration,
Valid_Enumerati
This change implements a missing check for qualified_expressions where
the qualifying subtype is an unconstrained array subtype that specifies
fixed lower bounds for one or more of its index ranges.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Selected_Range_C
GNAT's initial implementation of Ada 2022's Image attributes for
non-scalar types referenced (in user-visible ways) a GNAT-defined
package Ada.Strings.Text_Output and child units thereof. The Ada RM
specifies that a similar-but-different package,
Ada.Strings.Text_Buffers, is to be provided (RM A.4.
Iteration with an artificial Continue flag in routine Validated_View was
confusing. Also, most of the routines that traverse type hierarchies are
written in recursive style.
Cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads
Expansion of attribute Valid_Scalars was meant to use Get_Fullest_View
for arrays and Validated_View for records. However, this was not done
consistently and for records we were mixing Get_Fullest_View with
Validated_View.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_
This is needed to allow bootstrap with old compilers, due to
finalization issues.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Make-generated.in (ada/stamp-gen_il): Ignore errors from
running gen_il-main.diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-genera
This patch fixes a bug in the node/entity kinds that are generated by
Gen_IL in sinfo/einfo.h. These numbers should be the same as the 'Pos of
the corresponding enumeration literals in Node_Kind and Entity_Kind.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen.adb
Also minor reformatting nearby.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen-gen_entities.adb (Record_Field_Kind,
Allocatable_Kind): Add new abstract kinds.
(Constant_Or_Variable_Kind): Likewise.
(E_Constant, E_Variable, E_Loop_Parameter
This adds some OS constants that are needed to control the
keepalive status of TCP connections. The new constants are
TCP_KEEPCNT, TCP_KEEPIDLE and TCP_KEEPINTVL.
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-o
Originally the expansion of attribute Validate_Scalars was only using
Validated_View, but it was generating unnecessary unchecked conversions
between array types that prevented validity checks from being optimized
at compilation time.
To prevent those conversions some of the calls to Validated_Vie
Code cleanup, both to improve efficiency (when no error has been posted
for a subprogram call) and to avoid potential crashes (when an error has
been posted and the subprogram call parameters are likely to be
ill-formed as well).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This moves the declaration of Value_Enumeration_Pos to the body, renames
Valid_Enumeration_Value into Valid_Value_Enumeration and eliminates the
need for a range check on the return path of Value_Enumeration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* rtsfind.ads (RE_Id
Code cleanup related to fixing Valid_Scalars for private records.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Is_Local_Type): Simplify by reusing Scope_Within.diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_All): Simplify by reusing
Is_Subprogram_Or_Entry.
* sem_ch11.adb (Analyze_Handled_Statement): Likewise.diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.a
Cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Declarations): Remove explicit check for
missing, because a subsequent call to Is_Empty_List will detect
them anyway.diff --git a/gcc/ada/sem_ch3.adb b
Code cleanup related to fixing Valid_Scalars for private records, which
used to involve Get_Fullest_View.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Get_Fullest_View): Refill comment; remove extra
extra after period.
* sem_util.adb (Get_Ful
The documentation says that the Parent field is not defined for the
Empty node, but many places were setting and getting the field. This
patch changes the code to obey the documentation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.adb, atree.ads (Parent, Set_Parent
The compiler improperly flags a renaming-as-body or a function
instantiation declaring an operator that overrides a predefined
operator, when the renaming or instantiation is declared with an
overriding_indicator. In the renaming case, the Overridden_Operation
field of the subprogram's entity is n
A standalong ifeq is added for selecting vxworks7r2 targets which
have shared gnatlib enabled. The powerpc64 ifeq is moved here and
x86_64 is added to the filter list.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl: Add a new ifeq for vx7r2 shared gnatlib.diff
Pre and postconditions in the formal containers library are
designed for formal verification. In general, we do not want to
execute them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfdlli.ads: Use pragma Assertion_Policy to disable
pre and postconditio
Makefile.rtl (x86_64-vx7r2) adds a package i-vxinco.adb, which imports
a variable that is not exported on rtp. This problem only shows up
with a shared library runtime because it's never actually used, and
gets optimized away in a static link.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
The __gnat_in_child_after_fork flag was introduced for tracking memory
within a child process created by __gnat_expect_fork. It is not needed
for __gnat_portable_spawn, where fork is immediately followed by execv
(and _exit should execv fail), because there can be no memory
allocations between fork
Multiple threads can access the elements of
System.Tasking.Debug.Known_Tasks concurrently. While the compiler will
generally produce code that reads and writes Task_Ids atomically since
Task_Id is word size, it is best to be explicit to prevent data race
issues that may arise from non-atomic compon
This makes the comments use the same syntax as -gnatD/G for freeze nodes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Freeze_Subprogram_Body): Add missing "freeze".
(Install_Body): Likewise.diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
--
GNATprove no longer calls an obsolete variant of Adjust_Name_Case that
uses a global buffer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.ads (Adjust_Name_Case): Remove obsolete and now unused
variant.
* errout.adb (Adjust_Name_Case): Likewise; fix
The special case used for catching the 'mod -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_Mod): Remove special case for mod -1
Compiler aborts on an object declaration for a limited array type,
when declaration includes an aggregate that must be built in place,
and declaration carries an aspect specification for Address of object.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Convert
The -gnatyr switch is supposed to generate a style warning if the case
of a usage name does not match that of the defining_identifier it
denotes. The warning was missing for component names appearing in record
representation clauses; this patch fixes that bug.
Tested on x86_64-pc-linux-gnu, commit
When we make a copy of a tree containing a block, we need to make new
entities for variables declared in the block. If not, the entity
points to the wrong declaration, which is an invalid tree and can
cause issues when we need static links and that variable is an uplevel
reference. There may also
We have two families of routines to query entity properties: Known_XXX
and Unknown_XXX. They now simply negate each other instead of negating
their complex conditions.
Code cleanup only related to handling of Alignment in GNATprove;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committe
described this change as a workaround for cross-machine
path issues, I was wondering: do you still need this? If not, we should
probably revert it right now, otherwise we should investigate why you
needed it in the first place. What do you think?
--
Pierre-Marie de Rodat
osses again. :-)
--
Pierre-Marie de Rodat
This patch introduces a dynamically resizable, load factor-based hash
table in unit GNAT.Dynamic_HTables.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Hristian Kirtchev
gcc/ada/
* libgnat/g-dynhta.adb, libgnat/g-dynhta.ads: New package
Dynamic_HTable.
gcc/tes
In GNATprove we appear to abuse a routine related to cross-references and
expect it to deliver exact results, which is not what it was designed for.
This patch is a temporary solution to avoid crashes in GNATprove; it doesn't
affect the frontend or other backends, because this code is used exclusi
This patch adds unit GNAT.Lists which currently contains the
implementation of a general purpose doubly linked list intended for use
by the compiler and the tools around it.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Hristian Kirtchev
gcc/ada/
* impunit.adb: Add g-l
If a discriminant specification has a default that is a call to an
expression function, that function has to be frozen at the point of a
call to the initialization procedure for an object of the record type,
even though the call does not appear to come from source.
Tested on x86_64-pc-linux-gnu, c
The compiler may report errors on enumeration types with non-standard
representation (i.e. at least one literal has a representation value
different from its 'Pos value) processing attribute 'Enum_Rep.
It may also generate wrong code for the evaluation of 'Enum_Rep raising
Constraint_Error at runt
This patch fixes a spurious error in a program that contains a
discriminated task type and several of its subtype in the same
declarative part, when the corresponding discriminant constraints are
expressions.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Ed Schonberg
gcc/ada/
This patch modifies the set of attributes that applies to entries and
entry families to include elaboration entities used by the
access-before-elaboration mechanism.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Hristian Kirtchev
gcc/ada/
* einfo.adb (Elaboration_Entit
The dimension system in System.Dim.Mks is based on Long_Long_Float,
which may not be convenient to people who want to use Float or
Long_Float as basis. These new files provide units that define the
dimension system based on Float in System.Dim.Float_Mks and on
Long_Float in System.Dim.Long_Mks.
Ch
This fixes a long-standing issue present for extensions of tagged record
types with a representation clause: the clause is correctly inherited
for components inherited in the extension but the position and size are
not, which fools the logic of Is_Possibly_Unaligned_Object.
This can result in an a
This patch fixes a compiler abort on an expression function that is a
completion of a subprogram with preconditions. The problem is caused by
the presence of types in the precondition that are not frozen when the
subprogram body constructed for the expression function receives the
code that enforce
This patch ensures that with clauses that mention ignored Ghost units are
retained in the tree. The retention is necessary for several reasons:
* The with clauses allow the new elaboration order mechanism to
produce the same library edges regardless of whether the Ghost unit
is checke
This patch fixes a compiler abort on an expression function whose
expression includes tagged types that have not been frozen before the
generated body of the function is analyzed, even though that body is
inserted at the end of the current declarative part.
Tested on x86_64-pc-linux-gnu, committed
VxLink is a helper tool used as a wrapper around g++/gcc to build
VxWorks DKM (Downloadable Kernel Modules).
Such DKM is a partially linked object that includes entry points for
constructors and destructors.
This tool thus uses g++ to generate an intermediate partially linked
object, retrieves th
This patch fixes an improper expansion of aggregates for limited array
types in an object declaration. Prior to this patch, The presence of the
aggregate (which can only consist of box initializations) would create a
temporary that was then assigned to the object in the declaration.
Apart from a vi
If F is a function with a single defaulted parameter that returns an
access_to_array type, then F (I) may designate either the return type or
an indexing of the result of the call, after implicit dereferencing. If
the component type C of the array type AR is accces AR this is ambiguous
in a contex
The conformance between an overriding protected operation with
progenitors and the overridden interface operation requires subtype
conformance; requiring equality of return types in the case of a
function is too restrictive and leads to spurious errors when the return
type is a generic actual.
Tes
The compiler blows up writing the ALI file of a package that has a ghost
subprogram with an annotate contract.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-08-21 Javier Miranda
gcc/ada/
* lib-writ.adb (Write_Unit_Information): Handle pragmas removed
by the expander.
On 05/31/2017 11:08 AM, Pierre-Marie de Rodat wrote:
On 05/31/2017 09:34 AM, Richard Biener wrote:
Actually for the bigger picture I'd refactor
rest_of_decl_compilation, not calling it from the frontends but
rely on finalize_decl/function. The missing part would then be
calling the dwarf
On 05/26/2017 04:12 PM, Pierre-Marie de Rodat wrote:
I tried this, but I got a crash when compiling the Ada runtime
(g-awk.adb). I could not extract a reproducer, but the idea is that
because of the call to set_decl_origin_self, some DECLs have themselves
as DECL_ABSTRACT_ORIGIN. As a result
cc1’s .debug_info: there is the expected evolution, too,
I suspect Fortran wants to do sth similar as Ada for imported modules.
Maybe. I have zero Fortran knowledge, so I’ll let a Fortran expert
decide, if that is fine for you. :-) In any case, the back-end is ready
for that.
--
Pierre-Mar
On 06/21/2017 09:11 AM, Richard Biener wrote:
Sure, no obligation for you to enhance Fortran debug!
Understood, thanks. For your information, I just committed the change.
Thank you again for reviewing!
--
Pierre-Marie de Rodat
Inside GNATprove, inlining may cause use-clauses to be added in contexts
where the entities are already visible. Do not emit warnings about unused
use-clauses in these contexts, similar to what is done for instances of
generics.
There is no test as only GNATprove is impacted.
Tested on x86_64-pc-
This patch suppresses warnings concerning potential access-before-elaboration
issues when the warnings originate from finalization actions performed within
an initialization context. Such warnings seem confusing to users because they
are not directly related to source code, but to byproducts of the
This patch reimplements the handling of variable references by the access-
before-elaboration mechanism for the purpose of SPARK elaboration checks.
Prior to the patch, variable references (N_Expanded_Name and N_Identifier)
were detected and processed as is, however such references might be folded,
Compiler rejects an overriding indicator on a Finalize subprogram
for a derived type D when the parent type P is a derivation of a
private type whose full view is controlled, and the ultimate parent
of P has a visible primitive Finalize.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This patch improves the performance of the new ABE mechanism by eliminating
multiple traversals of the same subprogram body by memoizing all the nested
scenarios found within.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-11-08 Hristian Kirtchev
* einfo.adb: Elist36 is now us
GNATprove relied on frontend writing cross-references data into the ALI
files to synthesize Global contracts. Now this is done by the GNATprove
itself. This patch deconstructs the frontend code, that is no longer needed.
No test, as only dead code removed.
Tested on x86_64-pc-linux-gnu, committed
This patch corrects the expansion of Unchecked_Deallocation calls to operate
with the available view of the designated type. This ensures that if the type
is visible through a limited with clause, the expansion properly detects the
case where the designated type requires finalization actions.
GNATprove never collects cross-references to empty entities. Removed code
most likely became dead at some point and this was not noticed. No test,
as the removed code was only executed as part of GNATprove and its behaviour
appears not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2
Part of deconstructing SPARK cross-references, which are used to synthesize
Global contracts for code annotated with SPARK_Mode => Off.
Data like line and column numbers was only needed to make the xrefs in the
ALI file more readable. Now that the xrefs are not written to the ALI file
at all, ther
GNATprove now picks frontend cross-references directly from memory and
not from an ALI file), so there is no need to convert them to strings;
it is cleaner and more efficient to store them as Entity_Ids. No test
provided, because the behaviour is not affected.
Tested on x86_64-pc-linux-gnu, commit
1501 - 1600 of 3432 matches
Mail list logo