The comment in Par.Load says "... or we are in big trouble, and abandon
the compilation", but the code merely emitted errors and kept going. Now
it emits errors, flags the problem in the unit table and gives up. Also,
it was wrong for this routine to remove the unit, because the callers
who add ent
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.adb (Ensure_System_Dependency): Simplify condition.diff --git a/gcc/ada/lib-writ.adb b/gcc/ada/lib-writ.adb
--- a/gcc/ada/lib-writ.adb
+++ b/gcc/ada/lib-writ.adb
@@ -147,7 +147,7
When loading of renamed child unit failed, we didn't properly restore
the value of a global Parsing_Main_Extended_Source variable.
This is primarily a cleanup change; behaviour is not affected (perhaps
except for errors reported on complicated code that is illegal anyway).
Tested on x86_64-pc-lin
There is only one call to Unit_Display and it is guarded by the
List_Units global variable. There is no need to retest this variable
inside the Unit_Display routine.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch10.adb (Unit_Di
Simplify "Present (L) and then not Is_Empty_List (L)" into "not
Is_Empty_List (L)", since Is_Empty_List can be called on No_List
and returns True.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb, sem_ch6.adb, sem_ch9.adb,
The perfect hash function generated by the compiler to speed up the Value
attribute of an enumeration type contains an implicit loop and, therefore,
violates the No_Implicit_Loops restriction when it is active.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_imgv.adb: Ad
In the case of complex generic instantiations, the warning on component
not being present can be spurious (corresponding to dead code for the
given instance), so we disable it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads, sem_util.adb
(Apply_Compile_
Add syntax and semantic support for this new Ada 2022 feature.
Support for proper accessibility levels to be investigated in a second step.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-ch5.adb (P_Iterator_Specification): Add support for access
definition in lo
In the presence of style switch -gnatyO, the compiler emits a spurious
style violation message naming an inherited operation that does not come
from an explicit subprogram declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* style.adb (Missing_Overriding): Do not emi
GNATcoverage possibly relies on the presence of the duplicate D lines in ALI
files for its Source Coverage Obligation tables among different instantiations
of a same generic. Mention this in comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.ads: Mention SCOs
The .inc extension isn't recognized by gprconfig. The original
motivation for using this extension was to match the convention
of putting code in .inc ala unwind.inc. However it's easier in this
situation to just rename it to a .h file.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Misc cleanups found while working on transient scopes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* comperr.adb (Compiler_Abort): Call Sinput.Unlock, because if
this is called late, then Source_Dump would crash otherwise.
* debug.adb: Correct documentation
This disables the last special encoding done in Get_Encoded_Name, except
when -fgnat-encodings=all is passed on the command line.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.adb (Get_Encoded_Name): Do not encode names of discrete
types with custom bounds
Ada_2022 introduces the notion of Target_Name, written @, to be used in
assignment statements, where it denotes the value of the left-hand side
prior to the assignment. This patch diagnoses illegal uses of the target
name outside of its legal context.
Tested on x86_64-pc-linux-gnu, committed on tr
Prevent AST climbing from going outside of the current program unit;
tune style; add comments. Also, only set the Current_Assignment global
variable when needed and clear it once the analysis of an assignment
statement is done.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
Remove the Unknown_ type representation attribute predicates from
Einfo.Utils. "not Known_Alignment (...)" is at least as readable as
"Unknown_Alignment (...)" -- we don't need a bunch of functions that
just do a "not".
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-u
Cleanup related to preanalysis in GNATprove mode; behaviour is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Preanalyze_And_Resolve): Only call
Set_Must_Not_Freeze when it is necessary to restore the previous
value.diff --git a/gcc/
Code cleanup related to preanalysis in GNATprove mode; behaviour is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): A local Expr
constant was shadowing a global constant with the same name and
the same va
Code cleanup related to handing of static expression functions in
GNATprove; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Change types local
variables from Entity_Id to Node_Id.diff --git a/gcc/ad
Code cleanup related to handing of static expression functions in
GNATprove; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Use Orig_N variable
instead of repeated calls to Original_Node.diff --git
Cleanup related to handing of static expression functions in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Fix comment.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_c
Cleanup related to handing of static expression functions in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Add variable to
avoid repeated calls to Etype.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
---
Analysis of static expression functions happened inside an IF branch
guarded by GNATprove_Mode. Cleanup related to handling of static
expression functions in GNATprove mode; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Express
Group two variants of preanalysis of expression functions. Code cleanup
related to handling of static expression functions in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Reorder code.diff --git a/gcc/ada/sem_ch6.adb b
This updates the documentation of the debugging information generated by
the compiler present in the spec of the Exp_Dbug unit.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.ads: Update documentation of various items.diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp
This patch corrects various issues discovered during testing of the
No_Dynamic_Accessibility_Checks restriction leading to level
miscalculation errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Type_Access_Level): Add new optional parameter
Assoc_
We need to declare a predicate function along with its type but can only
generate the body at freeze point which may be in a separate scope,
leading to inconsistencies. So fix this by deferring the generation of
the predicate function declaration and fix latent bugs uncovered along
the way.
While
Explicitly initialize local variables related to analysis of expression
functions to prevent spurious checks from static analysers.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Initialize Orig_N
and Typ variables.diff --g
Since newlib doesn't implement correctly long double, use the wraplf
variant for a-nallfl.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (LIBGNAT_TARGET_PAIRS) : Use
the wraplf variant of Aux_Long_Long_Float.diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/
This in particular documents the new warning given on overlays.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_attributes.rst
(Scalar_Storage_Order): Add paragraph about representation
changes.
* gnat_rm.texi: Regen
Minor typo; found while fixing handling of tagged types in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.ads (Map_Types): Fix typo.diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads
--- a/gcc/ada/exp_util.ads
+++ b/gcc/ada/exp_util.ads
@@ -915,7 +
This prevents the output of -gnatRj from containing several "variant" fields
for an extension with a variant part of a tagged type with a variant part.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* repinfo.ads (JSON output format): Document adjusted key name.
* rep
Fix layout of contracts in libgnat/a-strunb.ads and
libgnat/a-strunb__shared.ads so that it is the same in both files.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Fix layout
in contracts.diff --git a/gcc/ada/lib
...in case Current_Error_Node is Empty, which will cause it to print "No
source file position information available". At least now we have the
file name being compiled.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* comperr.adb (Compiler_Abort): Print source file name.diff
The declaration of time_t is in flux based on it's overflow in Year
2038, so declare it uniformly based on System.Parameter.time_t_bits
to ease this transition and also enable VxWorks targets which allow
it to be parameterized, to be rebuilt more easily by one source change.
Two changes of note:
s
This patch fixes an issue in the compiler whereby a pragma Inline
appearing after a subprogram body stub to which it applies and where no
specification is present causes a compile time crash.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Check_Pragma_Inline):
Improve existing support for the Ada extension feature of casing on
composite values to handle casing on values that are discriminated or
have discriminated subcomponents.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb (Expand_General_Case_Statement): Add new fu
This patch fixes an issue in the compiler whereby an assignment to a
limited interface access type causes a crash when the right hand side
has an unresolvable function call in prefix notation and verbose errors
are enabled via (-gnatf).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
The previous implementation could exhibit quadratic behavior in some
cases (e.g., if the input was already sorted or almost sorted). The
new implementation uses an N log N worst case algorithm.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cdlili.adb: Reimplement
Add IPV6_FLOWINFO and IF_NAMESIZE values into generated package
System.OS_Constants.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gsocket.h: Include net/if.h to get IF_NAMESIZE constant.
* s-oscons-tmplt.c: Define IPV6_FLOWINFO for Linux.diff --git a/gcc/ada/gsock
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
301 - 400 of 3267 matches
Mail list logo