Tables with small left columns and large right columns had colliding
text in the PDF version of GNAT RM.
Spotted while adding description of pragma Ada_2022.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_characteristics.rst: Add
An entity flag Reachable now only applies to E_Label entities and needs
to be explicitly reset when mutating labels into loop entities. Only
needed to prevent cascaded errors when compiling a malicious ACATS test
with -gnatq (try semantics, even if parse errors).
Cleanup related to detection of un
This patch fixes a crash caused by specifying the Secondary_Stack_Size
aspect of a task type as the value of a discriminant of the task type,
and then declaring a record component whose type is the task type,
constrained to a discriminant of the record.
Tested on x86_64-pc-linux-gnu, committed on
In cases where the Ada 2022 feature of target name symbols (@) is used
and the evaluation of the name is side-effect free, the compiler creates
a temporary object to hold the value of the target object for use as
the value of "@" symbols in the right-hand side expression. In the case
where the targ
Only enhancement of formatting.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Change
blocks from plain code to Ada.diff --git a/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst b/gcc/ada/doc/gnat_ugn/e
Only enhancement of formatting.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_ugn/inline_assembler.rst: Fix typos and formatting
glitches.
* gnat_u
Fix Spec/Body headers in .adb/.ads files, respectively; all violations
detected with grep and manually filtered because of .tmpl files.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_atag.adb, lib-util.ads, libgnat/g-decstr.adb,
libgnat/g-exptty.adb, libgnat/g-s
On SUSE 15, glibc-locale-base-32bit is needed to run 32bit versions
of Libadalang tools.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/platform_specific_information.rst: Add
glibc-locale-base-32bit as a dependency in SUSE distributions.
* gnat_
Some of the restrictions were initially implemented as specific to GNAT,
but now they are part of Ada; likewise, some of recently added
restrictions were considered to be part of Ada, but are not yet in the
standard. This patch updates their categorization based on Ada 202x
Draft 32.
Only a No_Imp
Update to version 4.8.14 of prover Z3 requires minor adjustments of the
ghost code to add necessary intermediate assertions that drive the
automatic proof.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb (Double_Divide, Scaled_Divide): Add
interm
To warn about infinite loops we detect variables referenced in loop exit
conditions. We handle references within boolean operators, i.e.
comparison and negation, which are likely to appear at the top level of
the condition (e.g. "X > 0"). However, we can easily handle all
operators, because they ar
In the case of a constrained access definition for a record component we
are calling create_itype twice the former not being updated. This leads
to a malformed node that crashes -gnatG when predicates are activated.
Instead of creating a default Itype for Desig_Subtype, create it with
the correct
It comes from a discrepancy in the analysis of binary operators, between
the predefined ones for which we register an interpretation with the base
type and the user-defined ones for which we register an interpretation
with the subtype directly.
This is harmless in almost all cases because the two
Add new configuration restriction No_Local_Tagged_Types. This new
restriction ensures at compile time that all tagged types are only
declared at the library level.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-rident.ads (Restriction_Id): Add
No_Local_Tag
Ada 2022 bracket syntax is only allowed for arrays and containers, not
records. This change correctly rejects record aggregates using brackets
along with few cases of brackets being used instead of parentheses.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-direct
Uses of Compile_Time_Error and Compile_Time_Warning as configuration
pragmas were detected with a custom check in semantic analysis. Now they
are detected with an existing general check in parser.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma):
Unbalanced parens can be found when editing in emacs using the
"check-parens" command. Offending occurrences must be examined manually,
because few of them are intentional.
Minor cleanup of typos in documentation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/
In GNAT User's Guide section about configuration pragmas the
Detect_Blocking has been recently moved to an alphabetic order. This
patch moves the its Name_Id and Pragma_Is in the source code to match
this order.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* snames.ads-tmp
Prove System.Image_U, making the connection with the space available in
the string as computed with System.Width_U and the functions that
support the other direction of 'Value in System.Value_U.
The units that support 'Image cannot be marked Pure anymore, as they now
depend on non-pure units.
Tes
Pragma Aggregate_Individually_Assign was apparently forgotten to be
listed in the GNAT User's Guide as a configuration pragma.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/the_gnat_compilation_model.rst (Configuration
Pragmas): Add Aggregate_Individua
Use a generic string hash routine for hashing of invocation signatures.
The System.String_Hash unit was added to GNAT in 2009 and shouldn't
cause any bootstrap problems these days. To be safe, we don't use the
GNAT.String_Hash renaming, which was added later.
Cleanup related to a new restriction N
Documentation cleanup. Spotted while looking at description of
configuration pragmas.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst:
(Export_Object, Import_Object, Short_Descriptors): Fix pragma
syntax specific
We expand protected entry body into procedure with a nested block. The
scope of this block is naturally the enclosing procedure. However, the
scope field was wrongly set to the entity of the enclosing procedure
body (i.e. E_Subprogram_Body); now it is set to the entity of the
enclosing procedure sp
The square bracket syntax introduced in Ada 2022 was incorrectly handled
by the style checker and incorrect spacing was enforced. The issue was
in part caused by the wide character syntax (support removed starting
from Ada 2022) that treats the square bracket as a valid identifier
character.
Teste
Using a straight implementation like the one in Find_Arithmetic_Types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Find_Arithmetic_Types): Use local variables.
(Find_Boolean_Types): Rewrite modeled on Find_Arithmetic_Types.diff --git a/gcc/ada/sem_ch
Implement and document hardened booleans, from nonstandard boolean types
with representation clauses to the extra validity checking performed on
boolean types annotated with the "hardbool" Machine_Attribute pragma.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/
Prove System.Image_I, similarly to the proof done for System.Image_U.
The contracts make the connection between the result of Image_Integer,
the available space computed with System.Width_U and the result of
'Value as computed by Value_Integer.
I/O units that now depend on non-pure units are also
New dependencies in s-imagei are causing issues for CodePeer analysis
of GNAT source and libs. Updating the setup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-imagef.adb: Justify false message from CodePeer.diff --git a/gcc/ada/libgnat/s-imagef.adb b/gcc/ada/li
We need to check that the designated subprograms of access-to-subprogram
types are subtype conformant before registering a common interpretation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Possible_Type_For_Conditional_Expression): Add
test for subt
The current implementation is skewed toward the first dependent
expression and does not look into the interpretations of the others if
the first one is not overloaded, which can create spurious ambiguities.
And more precise error messages are now given if the types of the
dependent expressions are
This patch restores the previous behaviour of a recently rewritten
routine Sem_Ch4.Find_Boolean_Types for boolean operators where one of
the operands is a raise-expression, e.g.:
(raise Program_Error or else (X /= Y))
This change is required for the Entity field of the "or else" operator
to be
A sequence of checks for a valid Boolean argument fails when applied to
Any_String because its component is not of a Boolean type. The explicit
guard was unnecessary; it was only needed when a First_Index applied to
Any_String would crash, but this was fixed soon after this guard was
added.
Cleanu
In ISO-8859-15, code for "lower y with diaeresis" is used for the upper
case. In IBM CP 850, upper and lower o with stroke were missing.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* csets.adb (Fold_Latin_9): Fix y with diaeresis.
(Fold_IBM_PC_850): Fix o with str
The spec of runtime units that may be loaded by the compiler should not
contain use-clauses, for visibility to be correctly handled. Remove
use-clauses that were introduced for the ghost big integers unit as part
of the proof of runtime units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gc
Proof of generic units for Long_Long_Long_Unsigned instantiations is
harder for provers, as they have to deal with larger values. Add ghost
code to make the proof easier.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-imageu.adb (Set_Image_Unsigned): Add lemma.
We no longer use the so called front-end SJLJ exception mechanism, so
get rid of it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ali.adb, ali.ads, bcheck.adb, exp_ch11.adb, fe.h,
gnat1drv.adb, opt.adb, opt.ads, targparm.adb, targparm.ads,
lib-writ.adb: Ge
This patch improves some debug printouts so that they avoid crashing on
invalid data.
In addition, the relevant code uses Global_Name_Buffer all over the
place. This patch cleans up some of those uses, in particular ones in
the same code as the robustness changes, and code called by that code.
Te
Do not issue a warning about the postcondition of a function not
mentioning its result when this postcondition is statically True or
False, as this is a specification of non-termination (for value False)
or a hint to SPARK prover for not inlining an expression function (for
value True). In any case
GNAT does not issue a warning anymore on a postcondition of True (used
here to prevent inining inside GNATprove for proof).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuei.ads: Remove pragma Warnings Off.
* libgnat/s-valueu.ads: Same.
* libgn
The compiler should warn when a generic subprogram unit is withed but
not instantiated by the current main unit. This warning relies on flag
Is_Instantiated, which was wrongly set when the generic unit was also
withed and instantiated by some other unit.
This change merely reverts a fix done 20 ye
For warnings about unreferenced entities and unused WITH clauses we
typically exclude references outside of the extended main source unit.
However, we include references to variables of formal private types to
warn in the instance if the corresponding type is not a fully
initialized type.
This spe
To sync the names used in CodePeer (and SPARK) when filtering out
warnings on e.g. unused variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (Has_Junk_Name): Add more dummy names.diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
--- a/gcc/ada/sem_
Function Is_Selector_Name was added in 1995 while experimenting with
default expressions in record declarations. This experiment was
abandoned after one day and this routine was never used since then.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Is_Selector_
Replace membership alternatives with N_Op_Compare. Code cleanup;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Actuals): Simplify with N_Op_Compare.
* sem_util.adb (Replace_Null_Operand,
Null_To_Null_Address_Con
A previous change in "Make debug printouts more robust" accidentally
removed double quotes around identifiers in debug printouts. This patch
restores those. So for example, we have:
Prev_Entity = Node #10 N_Defining_Identifier "foo" (Entity_Id=795)
and not:
Prev_Entity = Node #10 N
If there are compilation errors then gigi doesn't backannotate the AST
with sizes, alignment, etc. The postponed compilation validation checks
can then easily crash or give spurious errors. We now just skip them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnat1drv.adb (
This patch corrects an error in the compiler whereby the presence of a
generic instance featuring a use type clause at library level may cause
a crash at compile time when warnings for ineffective use clauses are
enabled and the type in question is already use visible.
Tested on x86_64-pc-linux-gn
When flagging names of volatile objects occurring in actual parameters
we guard against identifiers without entity. This is redundant, because
earlier in the resolution of actual parameters we already guard against
actuals with Any_Type.
Code cleanup related to handling of volatile components; beh
In SPARK we forbid names that are effectively volatile for reading if
they occur in actual subprogram parameters. We wrongly rejected
references to components, which are not names in Ada.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Flag_Effectively_Volatile_
This patch fixes an issue in the compiler whereby incorrect
accessibility checks were generated in functions returning types with
unconstrained access discriminants when the value supplied for the
discriminant is a formal parameter.
More specifically, accessibility checks for return statements fea
Fix the error message pointing to the Ada reference section on mixed
iterated component association being forbidden. Remove useless loop.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Array_Aggregate): Fix ARM reference.
Remove useless loop.d
In Ada 83 the Unchecked_Deallocation was a top-level unit; since Ada 95
it is an obsolete renaming of Ada.Unchecked_Deallocation. GNAT doesn't
yet warn about uses of these obsolete renamings, but it still seems
better to avoid them.
Cleanup before adding a new instance of Unchecked_Deallocation.
O
The front-end drops a freeze node on the floor because it puts the node
into the Condition_Actions of an N_Iteration_Scheme of a FOR loop.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Insert_Actions) : Check that
it is a WHILE iteration scheme before
Similar to a recent removal of obsolete uses of Unchecked_Deallocation.
In Ada 83 the Unchecked_Conversion was a top-level unit; since Ada 95 it
is an obsolete renaming of Ada.Unchecked_Conversion. GNAT doesn't warn
yet about uses of these obsolete renamings, but it still seems better to
avoid the
This patch improves error messages concerning type mismatches by
printing the actual expected type in more cases instead of the expected
type's first subtype.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Wrong_Type): Avoid using the first subtype of
The compiler may crash processing the successor or predecessor of a task
type discrete discriminant.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Resolve_Attribute): Ensure that attribute
expressions are resolved at this stage; required for preanalyz
The compiler generates wrong code on instantiations of package
Address_To_Access_Conversions when the generic formal is a class-wide
interface type; this causes wrong dispatching calls when the
access-to-class-wide-interface object returned by To_Pointer is used to
dispatch a call.
Tested on x86_6
Add documentation about -fharden-control-flow-redundancy.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/security_hardening_features.rst: Add subsection on
Control Flow Redundancy.
* gnat_rm.texi: Regenerate.diff --git a/gcc/ada/doc/gnat_rm/secur
This removes obsolete code that overwrites a limited view present as the
result type of a function during the tentative analysis of prefixed
views for function calls involving tagged types. The original view is
necessary for the code generator to break the circularity present in
this setup.
The ch
The column is superfluous, component names are missing.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Fix code
snippet.
* gnat_rm.texi: Regenerate.diff --git a/gcc/ada/doc/gnat_rm/representation_clauses_an
Consistently use >= operator in both the code and contracts of
function/procedure Overwrite, to facilitate proof, instead of the strict
inequality > sometimes, as only New_Item remains in the result in the
case of equal size too.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
The compiler currently rejects iterating on an interface type derived
from an iterator type.
See Ada RM 5.5.1(6/3) and 5.5.2(3/3).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Analyze_Iterator_Specification): Fix Typ in the
case of a class-wide deriv
Default initialization of a record object is required to initialize any
components that "require late initialization" after other components.
This includes the case of a type extension; "late initialization"
components of the parent type are required to be initialized after
non-late-init extension
The GNSA_ROOT environment variable can be used to indicate to the
compiler how to find the runtime directory.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.ads, osint.adb (Relocate_Path): If the GNSA_ROOT
environment variable is set, we use that as the prefix
Compiling with and without assertions enabled the name of some generated
symbols differ; this is an issue when using pre-built libraries.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Check_Inherited_Conditions): Dispatch table
wrappers must be placed i
Formal hashed sets and maps are now using a different type of hash table
that does not require controlled types. This is possible because formal
containers do not rely on tampering checks, as cursors do not hold a
pointer to a single matching container, but are logical indexes that can
be used with
Remove violations of SPARK rules, to prepare for the proof of hashed
sets and maps:
- Make the type of hash tables not tagged, so that it will be possible
to mark the type of nodes as having relaxed initialization.
- Remove comparison of addresses as check or optimization: as a check,
it is n
As tampering checks do not exist in formal hashed sets and maps, remove
the machinery for such checks in the version of generic key and node
operations for formal sets/maps. Update comments as well.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-chtgfk.adb (Checke
Create a scope for the Ada 2022 iterated component association loops. In
the case of elements needing finalization, the late expansion would
crash on references to the loop variable within the loop body.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Gen_Loop)
Having realized that noreturn calls of __builtin_return are special,
and other noreturn calls don't get edges to the exit block, I've
realized the consequences of the logic to insert checking before
noreturn and tail calls were not quite what I'd expected before.
Specifically, noreturn calls other
Compiling CUDA code requires compiling code for the host (= CPU) and for
the device (= GPU). Device code is embedded into the host code and must
be registered with the CUDA runtime by the host.
The original approach we took for registering CUDA kernels was to
generate the registration-code on a un
If we're not going to install a signal handler for SIGSEGV then we do
not need an alternate stack to handle this signal (and e.g. stack
overflows).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/s-taprop__linux.adb (Initialize): Do not use an
alternate stac
After a compilation unit containing a Designated_Storage_Model aspect
was processed by the compiler front end, the aspect's expression was
seen as not having been analyzed. In some cases this can lead to the
Storage_Model_Object function not returning the entity of the associated
model object (such
This is a return convention mismatch coming from a discrepancy of the
Returns_By_Ref flag for the inherited function.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Derive_Subprogram): For a function, also copy the
Returns_By_Ref flag from the parent.di
Routines Is_Enabled and Is_Enabled_Pragma are identical (except for
comments); remove this duplication.
Cleanup related to handling of volatile refinement aspects in SPARK;
behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Enabled): R
Routine Type_Or_Variable_Has_Enabled_Property handles either types or
objects; replace negation with an explicit positive condition.
Cleanup related to handling of volatile refinement aspects in SPARK;
behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
Volatile refinement properties (e.g. Async_Writers), which refine the
Volatile aspect in SPARK, are inherited by subtypes from their base
types. In particular, this patch fixes handling of those properties for
subtypes of private types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This aligns Analyze_Negation and Analyze_Unary_Op with the other similar
procedures in Sem_Ch4. No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Analyze_Negation): Minor tweak.
(Analyze_Unary_Op): Likewise.diff --git a/gcc/ada/sem_
This is an incremental change towards supporting shared libraries
for VxWorks on aarch64.
The aarch64-vx7r2 compiler supports compilation with -fpic/PIC. This
change adds aarch64 to the list of CPUs for which GNATLIB_SHARED maps to
gnatlib-shared-dual for vxworks7r2, so "make gnatlib-shared" actu
The problem is that Install_Limited_With_Clause does not fully implement
AI05-0129, in the case where a regular with clause is processed before a
limited_with clause of the same package: the visible "shadow" entity is
that of the incomplete type, instead of that of the full type per the AI.
This r
When checking components of a record type for their own user-defined
equality function it is enough to find just one such a component.
Cleanup related to handling of user-defined equality in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Untag
Cleanup related to handling of user-defined equality in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (User_Defined_Eq): Replace duplicated code with a
call to Get_User_Defined_Eq.diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
--- a/g
Finalization of a record object is required to finalize any components
that have an access discriminant constrained by a per-object expression
before other components. This includes the case of a type extension;
"early finalization" components of the parent type are required to be
finalized before
This moves the implementation of AI12-0101 + AI05-0123 from the expander
to the semantic analyzer and completes the implementation of AI12-0413,
which are both binding interpretations in Ada 2012, fixing a few bugs in
the process and removing a fair amount of duplicated code throughout.
Tested on
The semantic analysis of predicates involves a fair amount of tree
copying because of both semantic and implementation considerations, and
there is a difficulty with quantified expressions since they declare a
new entity that cannot be shared between the various copies of the tree.
This change imp
The key is that the protected type is a (limited) private type, which
fools a test in Cleanup_Scopes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* inline.adb (Cleanup_Scopes): Test the underlying type.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
--- a/gcc/ada/inli
Fix a regression in the support for Ada 2022's treatment of calls to
abstract subprograms in pre/post-conditions (thanks to Javier Miranda
for producing this patch).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_disp.adb (Check_Dispatching_Context): When checking to se
The front-end drops the declaration of a temporary on the floor because
Insert_Actions fails to climb up out of an N_Iterated_Component_Association
when the temporary is created during the analysis of its Discrete_Choices.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_
Fix the escaping of the loop variable from the loop scope in both forms
of iterated element associations (i.e. "for J in ..." and "for J of
..."). Create a dedicated scope around the analyses of both loops. Also
create a copy of the Loop_Parameter_Specification instead of analyzing
(and modifying)
bzero is marked as legacy in POSIX.1-2001, and using it triggers a
deprecation warnings on some systems such as QNX. This change adjusts
the one place where we use it in terminals.c to use memset instead.
This, in turns, allows us to get rid of a hack for HP/UX and Solaris.
Tested on x86_64-pc-lin
The functions in subpackage Storage_Model_Support (apart from the
Has_*_Aspect functions) are revised to have assertions that will fail
when passed a parameter that doesn't specify the appropriate aspect
(either aspect Storage_Model_Type or Designated_Storage_Model), instead
of returning Empty for
When building the GNAT runtime for QNX, we get the following warning:
| cstreams.c: In function '__gnat_full_name':
| cstreams.c:209:5: warning: implicit declaration of function 'realpath'
| [-Wimplicit-function-declaration]
| 209 | realpath (nam, buffer);
| | ^~~
On QNX, the sigaction handler is incorrectly installed via the
sa_handler field of struct sigaction, rather than the sa_sigaction
field. This triggers a compilation warning due to a mismatch between the
function's signature and the field's type.
| init.c:2614:18: warning: assignment to 'void (
The QNX version of __gnat_install_handler calls sigaction for a number
of signals, and then prints an error message when the the call failed.
But unfortunately, except for the first call, we forgot to store
sigaction's return value, so the check that ensues uses a potentially
uninitialized variable
Setting this parameter to zero when calling the Configure procedure has
the effect of disabling completely the tracking of the biggest memory
users, which wasn't clear from the current documentation. So this patch
enhances the documentation of both the Configure procedure as well as
the Dump proce
Before this commit, a GNAT compiled with assertions would crash when
attempting to emit CUDA symbols in ALI files for spark_mode/ghost
packages, whose content is a single null statement.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.adb (Output_CUDA_Symbols): Chec
Proof of an assertion is not automatic anymore. Add two assertions
before it to guide the prover.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb (Double_Divide): Add intermediate
assertions.diff --git a/gcc/ada/libgnat/s-aridou.adb b/gcc/ada/lib
An object declaration (other than a deferred constant declaration)
causes freezing where it occurs (13.14(6)), which means every name
occurring within it causes freezing (13.14(4/1)), and when the name in a
subtype_mark causes freezing, the denoted subtype is frozen (13.14(11)).
Hence, one needs to
This patch corrects an error in the compiler whereby a function
requiring the generation of a postconditions procedure may cause an
uninitialized memory read when the return type
Has_Unconstrained_Elements or is an unconstrained array.
The error occurs because evaluation of postconditions happens
The current value propagation applies only to assignable objects and
doesn't make sense for subprogram entities. This was a mistake
introduced when extending the current value propagation years ago.
Cleanup related to fixing interference between expansion of attribute
Loop_Entry and current value
2801 - 2900 of 3426 matches
Mail list logo