/testsuite/ or is it fine if I just keep the current “New
testcase.”?
--
Pierre-Marie de Rodat
If the type_mark of a qualified_expression refers to the current
instance of the type, do not crash; instead give a proper error
message. This is illegal by RM-8.6(17).
The following test should get an error:
current_instance_default.ads:2:54: current instance not allowed
package
This patch fixes a compiler abort on a record declaration that includes a
mutable record component whose default value is an aggregate that includes
a box-initialized component whose value depends on a discriminant of the
component.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
On 09/18/2017 10:09 PM, Eric Botcazou wrote:
I'm not sure anyone really cares so it's up to you I'd say.
Ok, thanks. Done! Committed as r252971.
--
Pierre-Marie de Rodat
ump (or alike) can properly parse the line table?
--
Pierre-Marie de Rodat
the virtual one. */
bool virtual_offset_p;
--
Pierre-Marie de Rodat
Routine Unit_Declaration_Node now recognizes protected types as program
units and returns their declaration nodes; previously it returned
declaration nodes of the enclosing program units. This was an oversight.
-- Source --
-- illegal.ads
package Illegal
with
This patch modifies the warnings denoting ineffective use-clauses to be more
explicit and user-friendly.
-- Source --
-- unused_a.adb
with Ada.Text_IO;
with Interfaces;
procedure Unused_A is
use type Interfaces.Unsigned_8;
begin
Ada.Text_IO.Put_Line ("Hello,
This patch fixes a compiler crash on a function call when validity checks
on actuals are enabled (-gnatVi) and the target type is a scalar type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-10-09 Ed Schonberg
* exp_attr.adb
This patch fixes a compiler abort on an instantiation where the actual for
a formal package is an instantiation of a generic child unit. An instantiation
freezes its actuals, and in the case of formal packages whose instance
includes a body the back-end needs an explicit freeze node for the
This patch suppresses a spurious ambiguity error on a prefixed call to an
inherited class-wide operation, when the operation also has other visible
homonyms in the context.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-10-09 Ed Schonberg
*
d I thought I committed it but I guess I got confused with my
SVN setup. Anyway the fix is now in. Thank you for having reported this!
--
Pierre-Marie de Rodat
This patch suppresses checks within finalizer routines, because they can't
fail. No change in behavior; no test available. This is just an internal
cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Bob Duff
* exp_ch7.adb (Create_Finalizer):
RM 11.4.2 stipulates that the optional string argument in an Assert pragma is
evaluated only if the assertion fails and the string is incorporated into the
raise statement. Previous to this patch the string expression was evaluated
unconditionally, leading to unwanted side effects if its
This repairs the ABI breakage for record types with Long_Float components
introduced on 32-bit x86/Linux by the previous change. The Long_Float type
is awkward on this platform because it has got a dual alignment setting:
it's 8 for standalone object and array component and 4 for record
This patch utilizes compilation switch -gnatd.v to enforce the SPARK rules for
elaboration in SPARK code. The affected scenarios are calls and instantiations.
If the switch is active, the ABE mechanism will verify that the scenarios have
fulfilled their Elaborate[_All] requirements. Otherwise the
This patch modifies the check which ensures that no call is executed in a
preelaborated unit. The check now properly ignores a case where a generic
unit is subject to pragma Remote_Call_Interface, and the call appears in
the body.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This patch corrects an issue introduced by Q220-025 where the use of pragma
warnings off applied to an unreferenced variable is not warned about the
possibility of replacing with the more specific pragma unreferenced when using
the -gnatw.w.
-- Source --
-- p.adb
This patch modifies the processing of SPARK annotations Initializes and
Initial_Condition to perform the resolution of the related expressions
at the end of the enclosing package visible declarations.
-- Source --
-- init_cond.ads
package Init_Cond
with SPARK_Mode,
Routine [Set_]Generic_Parent can only be called on package, function
and procedure specification nodes, as asserted in their bodies. It would
crash when called for renaming or object declarations; the comment was
most likely referring to some earlier implemenation idea.
Tested on
This patch reimplements the treatment of variable assignments and reads within
SPARK elaboration code. The changes are as follows:
1) Diagnostics of variable assignments in elaboration code are now based on the
rules in effect (either Ada or SPARK).
2) Variable assignments in Ada elaboration
The compiler may silently skip generating a validity check on a
type conversion of a component of a record type. After this patch
the error is reported on the following sources.
pragma Initialize_Scalars;
package Pkg is
type T is record
Major : Natural;
Minor : Natural;
end
This patch corrects an issue whereby a defaulted formal subprogram was not
being accounted for when checking for ineffective use_type_clauses on private
types used as generic actuals.
-- Source --
-- types.ads
package Types is
type Enum_1 is private;
private
This fixes a run-time performance regression recently introduced on 32-bit
Windows for Ada.Numerics by an unrelated change that exposed an old defect of
the compiler on 32-bit Windows, namely that the Long_Long_Float type has got a
wrong alignment of 8 instead of the expected 4.
The following
. :-)
--
Pierre-Marie de Rodat
Hello,
This patch is an attempt to fix the crash reported in PR82155.
When generating a C++ class method for a class that is itself nested in
a class method, dwarf2out_early_global_decl currently leaves the
existing context DIE as it is if it already exists. However, it is
possible that this
support the -gnatd.n flag.
Tested on x86_64-pc-linux-gnu, committed on trunk.
2017-09-13 Nicolas Roche <ro...@adacore.com>
* Make-lang.in: In the fallback mechanim, parse the associated
.ali file and try to guess the locations of dependencies.
--
Pierre-Marie de Rodat
Inde
To make Ada tasks and C threads interoperate better, we have added some
functionality to Self. Suppose a C main program (with threads) calls an
Ada procedure and the Ada procedure calls the tasking runtime system.
Eventually, a call will be made to self. Since the call is not coming
from an Ada
On platforms that require strict alignment of memory accesses, the per-object
form of pragma Suppress (Alignment_Check) also disables the alignment warning
associated with the check. That's not the case for the global form and this
change fixes the inconsistency.
Here's an example on a small
This patch reimplements aspect Disable_Controlled to plug the following holes
in its original implementation:
* The aspect may appear without an expression in which case the aspect
defaults to True, however the compiler would crash due to the lack of
expression.
* If the
First cut at build-in-place for nonlimited types.
This is a work in progress; the build-in-place
support is currently disabled.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-29 Bob Duff
* exp_ch6.adb (Expand_Call_Helper): Handle case of build-in-place
This change allows our style-checker to implement a heuristic to detect
either only typed one ':' or mistyped one of the characters, causing the
entire markup block to disappear as it is then unexpectedly being
treated as a comment instead.
Tested on x86_64-pc-linux-gnu, committed on trunk
This patch corrects an issue whereby source files that did not have read
permissions were incorrectly referred to as "not found'. Now, these different
cases are explicitly identified and warned about properly.
-- Source --
-- toto.c
void toto(void)
{
}
-- hello.adb
This patch removes spurious visibility errors from the instantiation of a
generic package nested within another generic, when the inner package
contains an expression function that is the completion of a visible
function of that package, and the expression includes an object of a
tagged type local
Due to the installation order of packages within a context clause it is
possible to create circularities within the Prev_Use_Clause clain. This patch
corrects this issue by identifying this case through the use of an extra check.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-29
The compiler reports an spurious error processing a derived type
of a non-tagged record type that has discriminants, pragma
Unchecked_Union and pragma Convention C.
After this patch the following test compiles silently.
procedure Conversion is
type small_array is array (0 .. 2) of Integer;
An iterated component association is an Ada2020 extension that simplifies
the construction of array aggregates. This patch properly rejects the use
of this construct as a named association in an aggregate for a record type.
compiling
gcc -c -gnat2020 klurigt-m2.adb
must yield:
The compiler crashes processing an assignment to a discriminated
record type that has pragma Unchecked_Union and Convention C and
is a derivation of a non-tagged record type with discriminants.
After this patch the following test compiles silently.
procedure Conversion is
type small_array is
ch3
--
Pierre-Marie de Rodat
that this instance of inlining is a win
for both performance and code size, so it’s a good candidate even for
-Os. Note that we inline string concatenation routines for the same reason.
--
Pierre-Marie de Rodat
This patch fixes a crash on a classwide precondition on an interface
primitive with an controlling access parameter, when the precondition is
a call that contains a reference to that formal.
The following must execute quietly:
gnatmake -q main
main
---
with Conditional_Interfaces;
with
Safe pointer analysis in GNATprove mode depends on explicit dereferences
being present in the tree. Insert them where needed on access to components
in the special expansion performed in GNATprove mode.
The following code is now analysed without errors in GNATprove mode (with
-gnatd.F) with the
Everything is in the subject.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-25 Vasiliy Fofanov
* adaint.c (win32_wait): Properly handle error and take into account
the WIN32 limitation on the number of simultaneous wait objects.
Index:
GNATprove handles specially invariant checks, and so does not expect to
see calls to invariant procedures in the AST. This patch fixes the two
places where such calls were inserted during semantic analysis, so that
calls are only inserted when not in GNATprove mode. Possibly the same
could be done
This patch fixes a compiler abort in ASIS mode on an aspect specification
whose expression is a function call with parameter associations.
The following must compile quietly:
gcc -c -gnatct p.adb
---
with System;
procedure P is
type T is new Integer;
package Obj is
Buf : T := 1234;
The monotonic clock epoch is set to some undetermined time
in the past (typically system boot time). In order to use the
monotonic clock for absolute time, the offset from a known epoch
is calculated and incorporated into timed delay and sleep.
Tested on x86_64-pc-linux-gnu, committed on trunk
This patch improves the performance of the code generated by the compiler
for attribute Image when applied to user-defined enumeration types and the
sources are compiled with optimizations enabled.
No test required.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-25 Javier Miranda
Cleanup only; semantics unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-25 Piotr Trojanek
* sem_util.adb (Has_Null_Abstract_State): Remove, as an exactly same
routine is already provided by Einfo.
* einfo.adb
This patch corrects an issue whereby index actuals in calls to entry families
were not being properly flagged as referenced leading to spurious warnings
when compiling with -gnatwu.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-09-25 Justin Squirek
In ASIS mode we resolve the expressions in aspect specifications to provide
sufficient semantic information, including entities and types of identifiers.
The tree traversal that performs this resolution must omit identifiers that
are selector names of parameter associations in calls, because these
This patch modifies resolution to perform minor expansion for SPARK in order to
properly qualify concurrent discriminants used as defaulted actuals in calls.
-- Source --
-- p.ads
package P is
protected type PT (D : Integer) is
procedure Dummy (Arg : Integer
This patch updates the analysis of Refined_State triggered by contract freezing
to raise a more suitable exception when compilation has to be halted.
-- Source --
-- pack.ads
package Pack
with Abstract_State => State
is
function F return Boolean with Global =>
This patch fixes a compiler abort on a package instantiation when the
corresponding generic has a formal package, and the instantiation has an
actual that renames the desired package instance.
The following must compile quietly:
gcc -c mc.adb
---
package MC is
procedure Dump_States;
end
This patch suppresses the transformation of references to renamings into
references to renamed names when the reference appears within a pragma of
no significance to SPARK.
-- Source --
-- uname.adb
procedure Uname is
type Bounded_String is record
Length :
Default to "No source file position information available" message for
bug boxes emitted from the non-GCC backends. No test provided, because
this only affects bug boxes.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-09-25 Piotr Trojanek
* adabkend.adb
On 09/25/2017 01:54 PM, Richard Biener wrote:
Ok for trunk and gcc-7 branch after a while.
Thank you, Richard! Committed on trunk as 253147; I’ll wait at least one
week to revisit the gcc-7 branch commit.
--
Pierre-Marie de Rodat
. As
discussed on IRC, I’m not very familiar with debug info generation for
optimized code yet anyway. ;-)
Are there still pending issues with this? Also, do you think we can port
the fix for PR79542 on the 7 release branch?
--
Pierre-Marie de Rodat
Hello,
I would like to ping for the patch I submitted at
<https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00653.html>. Thank you in
advance!
--
Pierre-Marie de Rodat
On 09/04/2017 11:26 AM, Richard Biener wrote:
No more pending issues and yes, I guess the fix is ok for the branch.
Ok, thanks! This is now comitted on the 7 release branch.
--
Pierre-Marie de Rodat
This patch enhances the compiler to statically allocate secondary
dispatch tables.
No test available because it would require the analysis of the
generated assembly code (thus depending on the target architecture).
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Javier Miranda
This patch fixes a spurious error on an expression function that is a
completion, when the expression is a function call that returns an anonymous
access type. The preanalysis of the expression to freeze referenced types
requires the proper computation of the access level of the function call,
at
This patch improves and simplifies the debugging hooks. Now you just have to
break on nnd to find all "interesting" creations/modifications of node ids. No
change in functionality; no test available.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Bob Duff
This patch removes a spurious error on a call to a function that applies
to a predicated tagged type, when the actual in the call is class-wide.
The argument must be converted to be type-specific, given that the predicate
function is not dispatching and cannot accept a class-wide actual.
This patch suppresses the generation of ABE checks when compiling for GNATprove
because a) the checks are not needed and b) the checks involve raise statements
which are not supported by GNATprove. No need for a test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Hristian
This patch fixes a spurious error in an expression for a dynamic predicate,
when the name of (a homograph of) the type to which the predicate applies
is used in a context where the name cannot denote a current occurrence.
The following must compile quietly:
gcc -c conv.ads
---
with Typ; use
The evolution of SPARK RM 7.1.3(10) rule was not followed by code that
implements it. The current wording is:
"If a procedure has an in mode parameter of an effectively volatile type,
then the Effective_Reads aspect of any corresponding actual parameter
shall be False."
and the
This patch corrects an issue whereby an expression function within a ghost
package would cause orphaned freeze nodes.
-- Source --
-- p.ads
package P
with SPARK_Mode
is
type Rec is record
I : Integer;
end record;
package Inner with Ghost is
This patch classifies 'Access, variable assignments, and variable references as
static model-only scenarios because they are graph-dependent and do not produce
any checks. No need for a test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Hristian Kirtchev
This patch adds support for reverse iterations over formal containers,
analogous to what is supported on arrays and predefined containers.
Executing:
gnatmake -q foo
foo
must yield;
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1
10 9 8 7 6 5 4 3 2 1
---
with Ada.Text_IO; use Ada.Text_IO;
This patch ensures that the Elaborate[_All] requirement imposed on the context
of a unit in SPARK code is verified only when the static model is in effect.
-- Source --
-- server.ads
package Server with SPARK_Mode is
function Read return Integer;
end Server;
--
When the debugging switch -gnatdJ is present, warning messages include the
name of the unit within which the warning is generated. This patch fixes
a crash in the compiler when a warning appears within a child unit.
The command
gcc -c -gnatdJ test-a.ads
must yield;
test-a.ads:6:17: warning:
This patch update the mechanism which retrieves the enclosing scope of a node
to account for blocks produces by exception handler expansion. These blocks are
not scoping constructs and should not be considered. As a result, an access-
before-elaboration check will no longer cause a crash on ZFP.
This patch update the categorization of node N_Call_Marker's fields. No change
in behaviour, no need for a test.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-10-09 Hristian Kirtchev
* sinfo.ads: Update table Is_Syntactic_Field to reflect the nature of
This patch corrects an omission on the legality check of an allocator whose
expression is of a limited type, when the allocator is the expression of an
expression function.
Compiling t3.adb must yield:
t3.adb:4:13: warning: not dispatching (must be defined in a package spec)
t3.adb:5:07:
The Sem_Type.Covers predicate is by far the topmost subprogram in the profile
of unoptimized compilations in Ada. This change contains a series of small
optimizations that save about 2% of the instruction count on x86-64:
1. Inline 3 more predicates from einfo,
2. Simplify a convoluted
Hello Richard,
On 09/25/2017 01:54 PM, Richard Biener wrote:
Ok for trunk and gcc-7 branch after a while.
Is it still okay to commit to gcc-7, now?
--
Pierre-Marie de Rodat
This change fixes a wrong translation of the assignment of an aggregate
made up of a single Others choice to an array whose nominal size of the
component type is the storage unit and which is subject to a Component_Size
clause that effectively bumps this size.
The compiler was generating a call
This patch modifies the analysis of pragma Initializes to detect an illegal
null initialization item.
-- Source --
-- remote.ads
package Remote is
Y : Integer := 0;
end Remote;
-- pack.ads
with Remote;
package Pack
with SPARK_Mode,
Initializes =>
This patch handles properly a static predicate on a scalar type that
is trivially true. Previous to this patch the compiler rejected the
predicate on the incorrect grounds that it was not a static expression.
Compiling bad_days.ads must yield:
bad_days.ads:4:34: warning: predicate is
Concurrent types and single concurrent types can now appear in the input list
of pragma Initializes as long as the type encloses the pragma.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-12-15 Hristian Kirtchev
* sem_prag.adb
This patch "fixes" an issue where an implicit with clause generated to emulate
an implicit Elaborate[_All] pragma appears on a 'W' line in the ALI file. As a
result, the 'W' line may introduce a spurious build dependency in GPRbuild.
-- Source --
-- func.ads
function
This patch fixes a spurious error on a declaration for an equality
operator whose operands have an incomplete type, when the same declarative
oart includes another such equality operator on another incomplete type which
is used as an actual in an earlier instantiation.
Tested on
This patch prevents the propagation of spurious errors about the prefix of
access being non-aliased when getting the access to an array indexed by an
enumeration with a custom representation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-12-15 Justin Squirek
RM 4.5.3 (28) specifies that (except for records and limited types) a
membership operation uses the predefined equality, regardless of whether
user-defined equality for the type is available. This can be confusing
and deserves a new warning.
Compiling code.adb must yield:
code.adb:19:42:
System.Fat_Gen is a generic unit implementing support routines for floating-
point attributes, for example the 'Machine attribute. These routines make
themselves use of the 'Machine attribute, some of them by calling the
Machine support routine directly, some others by using the attribute.
This patch updates the implications that pragma Default_Initial_Condition has
on full default initialization of objects and types. According to the SPARK RM,
the pragma may appear without an expression
7.3.3 The aspect_definition may be omitted; this is semantically equivalent
to
This patch extends the optimization of allocators for arrays of non-controlled
components, when the qualified expression for the aggregate has an
unconstrained type and the upper bound of the aggregte is non-static. In this
case it is safe to build the array in the allocated object, instead of
This patch restores the functionality of debug switch -gnatdL to the behavior
prior to revision 255412. The existing behavior has been associated with
switch -gnatd_i.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
2017-12-15 Hristian Kirtchev
*
This patch prevents expression functions which complete previous declarations
in a package spec from loading the body of the package spec on the basis that
the expression function body is needed for inlining. This in turn prevents the
generation of spurious dependencies on units in ALI files.
This patch fixes a crash in the compiler when enabling unnesting of subprograms
on a generic unit.
The following must compile quietly:
gcc -c -gnatg -gnatd.1 a-btgbso.adb
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-12-15 Ed Schonberg
* exp_unst.adb
This patch updates the analysis of pragma Refined_State to reject constants
which are used as refinement constituents and are either
* Part of the visible state of a package
* Part of the hidden state of a package, and lack indicator Part_Of.
-- Source --
--
This patch fixes a crash on a subpogram instance that appears within a package
that declares the actual type for the instance, when the corresponding type is
a private or incomplete formal type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada
2017-12-15 Ed Schonberg
This patch modifies the analysis of Part_Of indicators to verify their
associated rules even when the indicator appears in non-SPARK code. This
prevents possible tamperings of Part_Of constituents of single concurrent
types outside of SPARK code.
-- Source --
--
This patch fixes a crash on an expression function that is a completion, when
the return expression includes a reference to a discriminant-dependent
component. An expression function that is a completion freezes all types
referenced in the expression, but some itypes are excluded because they are
This patch fixes a bug where if an address clause specifies a call to
System'To_Address as the address, and the code is compiled with the
-gnatc switch, the compiler gives a spurious error message.
The following test should compile quietly with -gnatc:
gcc -c -gnatc counter.ads
with System;
This patch modifies the elaboration warnings produced by the ABE mechanism to
depend on the status of flag Elab_Warnings. The flag is enabled by compilation
switch -gnatwl. This change allows for selective suppression of warnings, as
well as total suppression.
In order to preserve the behaviour
This patch implements the following SPARK rules from SPARK RM 6.1.1(3):
A subprogram_renaming_declaration shall not declare a primitive operation of
a tagged type.
-- Source --
-- renamings.ads
package Renamings with SPARK_Mode is
type T is tagged null
This patch accounts for the case where the early call region of a subprogram
body declared in a package body spans into the empty corresponding spec due to
pragma Elaborate_Body.
-- Source --
-- gnat.adc
pragma SPARK_Mode (On);
-- pack.ads
package Pack with
CodePeer analysis of GNAT showed that a parameter was not read and
always set on all paths, making it an out rather than an in-out.
This was not detected by the compiler, because one path ends up
raising an exception, which is not taken into account in the simpler
analysis done in GNAT.
Tested on
This patch enables the check which ensures that a subprogram renaming does not
declare a primitive operation of a tagged type in instantiations.
Tested on x86_64-pc-linux-gnu, committed on trunk
2017-11-16 Hristian Kirtchev
* sem_ch8.adb
201 - 300 of 3386 matches
Mail list logo