In Ada 2022 mode, the compiler crashes when generating the Put_Image
function for a tagged type if the parent subtype is constrained.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_put_image.adb (Make_Component_Attributes): Use
Implementation_Base_Type to get th
Before this commit, the following piece of code:
procedure Main is
function F (X : access Integer) return Boolean with Import;
begin
null;
end;
Resulted in the following error messages:
main.adb:2:59: error: ";" should be "is"
main.adb:5:01: error: "end F;" expected
main.adb:5:01: error: miss
Style cleanup only.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_put_image.adb (Make_Put_Image_Name): Fix style.
(Image_Should_Call_Put_Image): Likewise.
(Build_Image_Call): Likewise.diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb
--
Give a warning if both Size and Value_Size attributes are specified for
the same type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Duplicate_Clause): Add a helper routine
Check_One_Attr, with a parameter for the attribute_designator we
are l
The encoding of the debugging line information has substantially changed
in DWARF 5, so this adds the support for it alongside the existing code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-dwalin.ads: Adjust a few comments left and right.
(Line_Info_Re
We add new field types Valid_Uint, Unat, Upos, Nonzero_Uint,
which have predicates that assert the value is a proper
Uint value (i.e. not No_Uint), and that the value is
appropriate. It is not clear that Nonzero_Uint is needed,
but it is useful in testing; we can always remove it later.
We use the
The fixed lower bound also makes it possible to simplify the formula of
the upper bound used for unconstrained array types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) : Use a
fixed lower bound if the index subtype is mar
A comment in Analyze_Case_Statement describes an "interesting
optimization" that was applied to all assignable objects. This patch
extends it to all objects, in particular, to formal parameters of mode
IN.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Analyze_
This patch fixes a bug where if a private type has a full type that is a
modular type with a Default_Value specified, then creating objects of
that type causes the compiler to incorrectly say, "illegal operand for
numeric conversion".
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
When using 'Valid_Scalars on unconstrained arrays, the expanded code
includes unchecked conversion to the unconstrained base type, which may
lead to incorrect code being generated.
Fixed by replacing Validated_View by Get_Fullest_View except for records
where it is still needed.
We also take this
A reference in the comment about the type resolution described in
Sem_Ch4 refers to description with a header "Handling of Overload
Resolution", but this has been moved to Sem_Type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.ads: Update reference in comment.
Remove dead code found by GNATcoverage:
* Protected objects do not exist in Ada 83.
* The whole last part of Scan_ALI is no longer used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Object_Declaration): Remove dead code.
* ali.ads, ali.adb (S
The RM states (A.18-4-18/2, A.18.7-17/2, et al) that "the predefined "="
operator for type Cursor returns True if both cursors are No_Element, or
designate the same element in the same container."
In some cases, GNAT's implementation violates this requirement. This was due
to the component "Positi
It may be surprising to users that a ghost entity is not allowed to
appear in a predicate, which is a kind of assertion. Explain this in a
continuation message, as well as the possible fixes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ghost.adb (Check_Ghost_Context): Ad
Compiler aborts on an instance body that has a reference to a selected
component of a local type extension, when the component is inherited
from an ancestor type declared outside of the generic being
instantiated.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (
When calling an access to a subprogram taking an unconstrained
discriminated record as parameter, we fail to pass the extra constrained
actual parameter, which would lead to spurious or missed discriminant
checks.
At the same time we noticed that GNAT sometimes generates trees of the
form:
(Fie
This is preliminary work to properly handle a declare expression used in
a postcondition. This first part is adding guards against missing types.
The second part will be about setting the proper type when currently
missing.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem
Global variable Sem_Type.Headers, which is used in type resolution, was
initialized twice: by elaboration and by Init_Interp_Tables (called by
Gnat1drv).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* fmap.ads (Reset_Tables): Remove outdated references to
GNSA/ASIS.
Recent improvements in the handling of discriminants and discriminant
checks made an assert failure appear on complex code.
It appears that the assertions in einfo.adb (Discriminant_Constraint) is
too strict.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.adb (Discri
When a Pre/Post aspect is conflicting with Static aspect, the error
message now says 'aspect "Pre"' or 'aspect "Post"' and not just "this
aspect".
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Static): Use aspect name in the
error messa
Change the internal data structure that stores the compiler diagnostics
to store spans instead of locations, where a span is a triplet of a main
location, and a first-last pair of locations. Also change the main
procedures for reporting an error in Errout to use spans instead of
locations whenever
AI12-0397 specifies new rules for the resolution of expressions for the
Default_Intial_Condition aspect, based on defining that a reference to
the current instance of a type with DIC is a notional (nonabstract) formal
derived type (making DIC similar to how Postcondition and Type_Invariant
are defi
Check for the expression of the aspect Static were done inside branches
corresponding to inside-a-generic and outside-a-generic. Now this check
occurs only once. Code cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Aspe
This overcomes the lack of fused multiply-add instruction on the x87
FPU by doing an iterated addition with exact error handling for the
last digit taken into account for the mantissa.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valrea.adb (Fast2Sum): New funct
Reuse Error_Msg_Ada_2020_Feature for messages that reference the
currently processed aspect using the '%' insertion character. Cleanup
only; behaviour is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Static): Reuse
Error_M
The counter variable in routine Formal_Is_Used_Once is initialized with
0, then is possibly incremented to 1, and when incremented again, the
traversal is abandoned. This second increment can only make the counter
equal 2; there is no need to explicitly re-assign it.
Code cleanup only; semantics i
System.Interrupt.Install_Restricted_Handlers takes a parameter Prio. It
was defined as Any_Priority when it should be the more narrower
Interrupt_Priority subtype as handlers can only have priorities in the
Interrupt_Priority range. Using the more narrower subtype assists in
unit testing.
Tested o
The data structure for overloaded interpretations included a hash table
with a subtle implementation. It is now replaced with a generic hash
provided by the GNAT.HTable.
This is only a code cleanup; behaviour of the compiler is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/
The result must be the Small instead of the Tiny in this case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-fatgen.adb: Add use clause for Interfaces.Unsigned_16
and Interfaces.Unsigned_32.
(Small16): New constant.
(Small32): Likewise.
As GNATprove uses the AST after semantic analysis without expansion, the
recent optimization in the evaluation of selected components for
aggregates was leading to incorrect AST where possible run-time errors
in the evaluation of the (aggregate) prefix were not taken into account.
Fixed by only ena
The comment for List_Length says "It is an error to call this function
with No_List (No_List is not considered to be the same as an empty
list).". It legitimately happens in practice, so adjust the comment to
allow this.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* nlist
As part of recent improvements related to discriminant checks, a
regression was introduced in complex cases of generics and use of 'Image
on an expression partially rewritten as a [raise Constraint_Error] node.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Ch
Applying Class to an untagged incomplete type is legal, but classified
as obsolescent in Annex J (for Ada 2005 and later), so should be flagged
with a warning when the -gnatwj switch applies, as well as being
reported as a violation of No_Obsolescent_Features when that restriction
is enabled. Both
This AI updates among other things some declarations in big number
packages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-nbnbin.ads (From_Universal_Image): New.
(Big_Integer): Update definition.
* libgnat/a-nbnbre.ads, libgnat/a-nbnbre.adb
Various fixes regarding the use of spans in error messages when using
debug flag -gnatdF.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Error_Msg_NEL): Extract span from node.
(First_And_Last_Nodes): Use spans for subtype indications and
attribu
The main reason is that the current implementation does not work if the
type does not support denormalized numbers, because it is piggybacked
on the Scaling attribute and Scaling will flush to zero in this case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-fatge
Aspect Part_Of is first translated into a corresponding pragma; then, we
use Find_Related_Context to recover the node where the aspect was
originally attached.
However, this routine was only working for pragmas Part_Of coming from
aspects applied to generic packages instantiated within other progr
Compiler aborts on an aggregate for a discriminated out_parameter when
the parent type has dynamic_predicates.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Build_Constrained_Itype): Inhibit the generation
of predicate functions for this Itype, which
The implementation computes an incorrect increment for normalized numbers
with the smallest exponent when the floating-point type does not support
denormalized numbers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* eval_fat.adb (Succ): Add a special case for zero if the ty
Routine Set_Categorization_From_Pragmas processes pragmas listed after
the compilation unit. It requires enclosing scopes to be visible, to
support pragmas (and aspects that are translated to pragmas) like here:
with Generic_Pkg;
private package Parent.Child_Instance is new Generic_Pkg
In a previous commit, some System.GCC units were renamed to be children
of System.GCC.DI instead, so as to have System.GCC be free of symbols
which are specific to 32bit platforms. This was needed in the context
of a 64bit vx7r2cert platform (AArch64) where we needed to add
equivalent routines spec
A recent change done as part of the implementation of AI12-0397 was to
suppress generation of DIC check expressions within DIC procedures
associated with abstract types (to avoid producing calls to abstract
subprograms, which are legal to give in a DIC aspect, but would cause
problems for gigi if t
This saves a few cycles by using Ureal_Half instead of Ureal_1.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* eval_fat.adb (Succ): Use Ureal_Half in a couple of places.diff --git a/gcc/ada/eval_fat.adb b/gcc/ada/eval_fat.adb
--- a/gcc/ada/eval_fat.adb
+++ b/gcc/ada/eval_fa
A new version of this AI was published recently, refining the legality
rules around renaming of a qualified expression.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch8.adb (Analyze_Object_Renaming): Update check for
AI12-0401.diff --git a/gcc/ada/sem_ch8.adb
In the case of an aggregate containing controlled array components,
if sliding of the indexes is involved, the components are prematurely
finalized without a corresponding initialization.
Also fix a latent bug in Exp_Aggr.Collect_Initialization_Statements
which was not always inserting Initializat
The Duration type of package Standard can be either a 32-bit or a 64-bit
fixed-point type depending on a flag in the system.ads file, but it needs
to be 32-bit when a target configuration file sets a 32-bit size for all
the predefined integer types.
Tested on x86_64-pc-linux-gnu, committed on trun
In GNATprove mode, inlining is used to make it easier to perform proof
without forcing the user to annotate all local subprograms with
contracts. But the compiled code will not be similarly inlined, thus
the analysis should not assume that the compiler will have access to the
same extended precisi
The compiler was failing to generate a required constraint check in the
case of a type conversion between access-to-discriminated types. This
patch fixes this bug.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Type_Conversion_Checks): Move out constraint
The Extra digit is not correctly set when the precision limit is reached
by means of trailing zeros.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuer.adb (Scan_Decimal_Digits): Set Extra to zero
when the precision limit is reached by means of trailing
Add the possibility for a tool to enable colored output using SGR when
outputting to a terminal. This is currently used only in GNATprove, but
could be enabled for compiler messages in the future. Use the same colors
(including bold) as gcc/g++ as much as possible.
Tested on x86_64-pc-linux-gnu, c
This patch fixes a bug that caused the compiler to crash on T'Reduce, if
T is something like Integer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Change "$" to "&".
Otherwise, Errout will trip over an uninitialized (invalid)
ADA_EXCLUDE_SRCS and ADA_INCLUDE_SRCS contain old references to non
existing files.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (ADA_EXCLUDE_SRCS): Remove unused files.
(ADA_INCLUDE_SRCS): Remove libgnat/system.adsdiff --git a/gcc/ada/Makefile.rtl b/
This changes the rounding mode used for the static evaluation of the
Machine attribute of floating-point types to the mode used for the
static evaluation of real expressions, for the sake of consistency.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Eval_Attr
The expansion performed in Expand_N_If_Statement only at -O1 and above
can create inconsistencies in the tree that can cause trouble when
compiling different files with different optimization levels. This
is visible in particular in GNAT LLVM when generating C code on ACATS
test cc50a01.
Fixed by
The -gnato2 mode of overflow checking, aka Minimized overflow checking,
cannot work for 128-bit integer types because it is implemented using
64-bit integer types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Compare_Minimize_Eliminate_Overflow): Remov
This gets rid of overflow checks done using a 128-bit integer type on
64-bit platforms and that can be done in a narrower type, by reusing
the machinery already implemented to narrow the type of operations.
This runs afoul of the processing for Max_Size_In_Storage_Elements
in Expand_N_Attribute_Re
GNAT does not accept a declaration of the form:
type Rec (D : access Rec) is null record;
To solve this, we factor out Check_Anonymous_Access_Components and
reuse it from Process_Discriminants and adjust Freeze_Record_Type
accordingly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada
This patch fixes an issue in the compiler whereby a spurious
accessibility error regarding actuals for explicitly aliased formals in
a function call within a return statement gets triggered during
compilation when the return type of the function call in question has
implicit dereference specified.
When a function has "in out" parameters and a postcondition which does
not reference 'Result, a potentially spurious warning is emitted. The
necessary logic was actually already there in
Sem_Util.Check_Result_And_Post_State but was using a local
Has_In_Out_Parameter function instead of using simply
Compiler aborts on an aggregate with limited components, when the
aggregate is a formal in a function call that is the right-hand side of
an assignment, possibly coming from an object declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Expand_Array_Agg
When using e.g. pragma Assert (X'Initialized) combined with pragma
Restrictions (No_Implicit_Loops), a violation is flagged when assertions
are disabled, which is undesirable. Fixed by recognizing simple forms of
dead paths used by pragma Assert when assertions are disabled.
Tested on x86_64-pc-li
This patch fixes an issue in the compiler whereby extra flags and tests
added to the internally generated _postconditions procedure confused and
caused issues with CodePeer due to it treating the procedure as coming
from source.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
"exporting" a type may seem useless but is actually useful to set its
convention and sometimes its external name.
So simply remove this warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Set_Exported): Do not warn on exporting a type.diff --git a/gcc/ada
Compiler emits a warning on a selected component that is an actual in a
function call, when the enclosing object has no explicit initialization
and no discriminants, but the component type itself has partial
initialization. Such a warning should be suppressed.
Tested on x86_64-pc-linux-gnu, commi
Replace calls to Error_Msg_NE whose Msg parameters have no insertion
characters corresponding to the E parameter with equivalent but simpler
calls to Error_Msg_N. Code cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Profil
Package GNAT.Case_Util contained routines renamed from System.Case_Util.
Few routines were missed. Renames entire package instead of renaming
each routine separately.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-casuti.adb: Replace with "pragma No_Body".
Prefix of attributes Version and Body_Version denotes any program unit,
including protected entries, which were wrongly rejected this context.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Check_Program_Unit): Replace tests for Task_Kind
and Protected
Attributes Version and Body_Version can be prefixed by program units,
which include protected units and task units. Those attributes were
wrongly accepted when prefixed by protected subtype, task subtype and by
any object of a concurrent type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
Remove trailing space in calls to Error_Msg_N routines. Cleanup only.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb, sem_aggr.adb, sem_cat.adb, sem_ch10.adb,
sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
sem_ch6.adb, sem_ch8.adb, sem_ch9
When the prefix of a call denotes an overloaded primitive operation, all
possible interpretations are analyzed to determine the intended one. If
all of them fail, then if the All_Errors flag is on all interpretations
are analyzed anew to indicate why each one is illegal. If All_Errors is
not set th
Default initialization of a local Fname variable was never used. Code
cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dist.adb (Build_From_Any_Call): Remove initial value for
Fnam; fix style.
(Build_To_Any_Call): Rem
The current version of Set_String is no longer used and not very useful
and even unsafe with the introduction of a-stunau__shared.adb.
Replace it with a more useful and safer version taking a callback to set
the string.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgna
A local counter objects that are initialized with 0 and only incremented
now have type Nat instead of Int. Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch7.adb (Build_Finalize_Statements): Refine type of a
local counter v
Replace expression of the form "X = RTE (...)" with "Is_RTE (X, ...)",
which avoids loading of the unit where the ... entity is defined. In
particular, a sequence of RTE_Available and RTE load the target unit
where Is_RTE doesn't.
This patch is primarily a code cleanup, but it also avoids unnecess
Adding rule about a user-defined equality operation as SPARK RM
6.1.4(11) is changing the numeration of previous rules (11,12).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
Fix reference to SPARK RM rule
The leading and trailing spaces in error message strings have been
recently removed. This patch adds an assertion to prevent those spaces
from appearing again.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Error_Msg_Internal): Add assertion to prevent
s
When the left expression of a membership test is an object implementing
an interface type, and the right operand of such membership test is a
non-class wide interface type, the compiler generates code that, instead
of comparing the actual tag of the left expression to the tag of the
right operand,
This moves the low-level processing on characters to the package
Img_Util, factors out common processing with fixed point, and overhauls
the handling of negative zeros and rounding. This also removes the
Is_Negative intrinsic function, which was only accessible from
predefined units and is now unu
Switch -gnatic, where "c" denotes a character set, is described in the
GNAT User's Guide sections 4.3.11 Character Set Control and 4.3.1
Alphabetical List of All Switches, but the latter section didn't mention
'5' as an allowed value for "c".
This is implemented in csets.adb, switch-c.adb (for the
Rule SPARK RM 6.1.4(13) only mentions "subprograms", but it is equally
applicable to protected entries whose global inputs cannot appear as
global outputs in nested subprograms.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing
Constants of an access-to-variable type can only appear as global
outputs in procedures, tasks and protected entries, not in functions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Global_Item): Take subprogram kind into
account when acceptin
Fix implementation of SPARK RM 6.1.4(13), which says:
"... if the global_specification of the outer subprogram has an entity
denoted by a global_item with a mode_specification of Input or the
entity is a formal parameter with a mode of in"
but the rule was only enforced for outer subprogr
If some objects are declared in the body of a generic package, these
objects are not finalized when the package is instantiated at the
library level.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch7.adb (Build_Finalizer_Helper.New_Finalizer_Name):
Unnest so th
Force the use of the "error:" marker for error messages in GNATprove.
This helps distinguishing these messages from others like warnings,
check messages and info messages, in particular when colored output is
used.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnat1drv.adb
Error messages about the Global/Depends contracts are constructed in the
Global_Name_Buffer, but there is no need to store those messages as the
Name_Id objects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Role_Error, Usage_Error): Replace calls to
In order to use the same matching function in GNATprove for justifying
messages through pragma Annotate as the matching function used for
pragma Warnings, make that function publicly visible in Erroutc.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* erroutc.adb (Matches): M
This patch refines the handling of container aggregates with non-static
sizes given with iterated component associations and iterated element
associations. When necessary we construct an expression to be evaluated
dynamically to guide the allocation of the container, prior to inserting
elements.
T
Replace low-level First_Entity/Next_Entity with a high-level
First_Formal/Next_Formal. The new code is easier to debug, because we
don't even see local subprograms, objects, etc.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Collect_Global_Item): Iterate dire
Iteration routines should come in pairs, i.e. First_Formal with
Next_Formal and First_Entity with Next_Entity. This patch fixes two
occurrences where First_Formal was used with Next_Entity. Cleanup only;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Routine First_Formal works both for non-generic and generic subprograms,
so patch removes a dubious special-casing for the latter.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-xref.adb (Generate_Reference_To_Formals): Remove dedicated
branch for generic subpro
Objects that typically would be constant, but can actually be written
because they are of access-to-variable type, can appear as outputs in
the Global and Depends contracts of non-functions (i.e. functions,
procedures, generic functions, generic procedures, protected entries,
task types and single
When Ada introduced Ada.Assertions.Assertion_Error, we made it a
renaming of the existing System.Assertions.Assert_Failure as provisioned
by the ARM, but we should have done it the other way around, so that the
reference/first class exception is the one from the ARM in e.g.
exception messages.
Thi
A List_Name_Count variable is initialized with zero, then incremented
and decremented in a stack-like manner, so it should never become
negative.
This gives us extra confidence, but otherwise the behaviour is not
affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ppr
Back out the previous change that tried to "optimize" in
Expand_Concatenate. It turns out that this is actually a pessimization,
and it causes codepeer to trip over a bunch of extra checks.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Concatenate): Rem
Printing of expressions is used in GNATprove to display parts of an
assertion which are not proved, Here the printing is improved slightly
for an expression-with-actions, so that the underlying expression is
printed, instead of the corresponding AST form of the expression with
Expr_Name.
Tested on
Unit Pprint, which implements pretty-printing of the AST, defined
routine To_Mixed_Case, which was identical to System.Case_Util.To_Mixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* pprint.adb (To_Mixed): Removed.diff --git a/gcc/ada/pprint.adb b/gcc/ada/pprint.adb
---
Code cleanup; semantics is unaffected. The code for pretty-printing
integer, real and string literals now looks the same.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* pprint.adb (Expr_Name): Simplify with functional variant of
UI_Image.diff --git a/gcc/ada/pprint.
Code cleanup; semantics is unaffected. Perhaps the extra qualification
used to be necessary to avoid ambiguities, but it is no longer needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* pprint.adb: Remove qualification of arbitrary calls to
Sinfo.Expressions and
In Eval_Arithmetic_Op we set Raises_Constraint_Error flag on integer
division by zero, but we didn't set it for real division by zero.
This only affects GNATprove, because GNAT sets this flag inside
Apply_Compile_Time_Constraint_Error (which has an early return guarded
by GNATprove_Mode). Possibly
Add legality checks for indexed aggregates with component associations.
RN 4.3.5 (28/5 - 30/5) specifies validity rules for indexed aggregates,
intended to simplify implementation as well as the computation of the
expected size of an indexed aggregate, such for an aggregaate of a
vector type.
Tes
301 - 400 of 3386 matches
Mail list logo