This makes sure that the objects present in instantiations always have the
actual type instead of a local variant of the formal type in the debugging
information generated by the compiler (this was already the case when the
actual type is a record, a protected or a task type).
Tested on x86_64-pc-
This happens when there is a size mismatch, but this must be accepted.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/utils.cc (unchecked_convert): Also pad in most cases
if the source is not a scalar type but the destination is.diff --git a/gcc/ada/gc
Originally bodies-to-inline created for the frontend inlining were
analyzed with expansion disabled. Then, to facilitate inlining in
GNATprove mode, the analysis was changed to preanalysis.
However, preanalysis in this context works badly for calls in prefix
notation, because preanalysis assigns e
This reports violations for 4 units from gigi.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/trans.cc (gigi): Report a violation of No_Dependence
on System.Stack_Checking if Stack_Check_Probes_On_Target is not set
and -fstack-check is specifie
It comes from an overzealous assertion.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/utils2.cc (build_binary_op) : Also accept
pointer-to-function types that are not variant of each other.diff --git a/gcc/ada/gcc-interface/utils2.cc b/gcc/ada/gcc-int
The current implementation may create dangling references from a superset
of the alias set of the dummy pointer-to-array type when it exists.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) : Save
and restore the alias set o
This is consistent with the other kinds of subtypes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) : Do
not reuse the TYPE_DECL of the base type.diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
--
It lost too much useful information.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity): Do not set the debug
type for vector types.diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
--- a/gcc/ada/gcc-in
When a generic unit contains references to global entities (i.e.
entities declared outside of this generic unit), those references are
saved: from the analyzed copy of a generic unit (which is then
discarded) into a generic template (which is then instantiated, possibly
many times). To save those r
When a formal generic type is marked as Ghost, the instantiation of that
generic will contain a generic subtype for the actual with the Ghost
pragma. Recognize this case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma): Recognize a generated sub
The compiler currently rejects a Storage_Model_Type aspect that is not
specified with an aggregate, or that has an aggregate that does not
specify all defined "subaspects" (Address_Type, Null_Address, Allocate,
etc.). The RFC for this feature defines the aspect to fully default to
the native memory
It no longer serves any useful purpose at this point.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/utils.cc (gnat_pushdecl): Build DECL_ORIGINAL_TYPE
only for pointer types.diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc
In Ada 2012, the RM 4.5.2(9.8) clause prevents an equality operator for an
untagged record type from being declared after the type is frozen. While
the clause is implemented in GNAT, the implementation has a loophole which
lets subprogram bodies that are not the completion of a declaration pass
th
When examining expression of the first declaration of the inlined body
make sure that this declaration is in fact an object declaration.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* inline.adb (Has_Single_Return): Add guard for the subsequent
call to Expression.di
Prefixes -fzero-call-used-regs and -fstrub could be mistaken for full
command-line options with the references to them in the GNAT RM. Make
it clearer that they require explicit choices.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/security_hardening_features
After the binding interpretation issued under AI12-0413, a user-defined
primitive equality operator of an untagged record type hides the predefined
equality operator in an instantiation, but this does not apply if the
instantiation appears in the same declarative region as the type and
before the d
The compiler incorrectly assumed the prefix for a slice returned in one
branch of an if expression has its bounds known at compile time and would
crash when this is not true.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_If_Expression): Test for compi
After changes in provers and Why3, changes are needed to recover
automatic proof of System.Arith_64. This is the first part of it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb (Lemma_Mult_Div, Lemma_Powers): New
lemmas.
(Prove_Sign_Quo
This patch fixes various redundant constructs or uninitialized variables
identified by CodePeer in the GNAT frontend and runtime sources.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Add default
initialization for
Code cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-prag.adb (Check_Arg_Count): Change parameter type from Int
to Nat, because this parameter is compared to Arg_Count variable
which is of type Nat. Also, it wouldn't make sense to check for
If the flag Opt.Expand_Nonbinary_Modular_Ops is set (which occurs if
-gnateg is specified) then we implement predefined operations for a
modular type whose modulus is not a power of two by converting the
operands to some other type (either a signed integer type or a modular
type with a power-of-two
This patch corrects an error in the compiler whereby a spurious
redundant use_type_clause warning gets issued when the clause appears in
the context_clause of a package preceding a with_clause for a package
with an identical use_clause in its specification.
Tested on x86_64-pc-linux-gnu, committed
This makes it possible to report violations of the No_Dependence restriction
during code generation, in other words outside of the Ada front-end proper.
These violations are supposed to be only for child units of System, so the
implementation is restricted to these cases.
Tested on x86_64-pc-linux
This plugs a small loophole in the Needs_Secondary_Stack predicate for
some protected types and record types containing protected components.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Caller_Known_Size_Record): Make entry assertion
more robust and
The Has_Enough_Free_Memory was not correctly reporting a completely full
chunk in the case of a 0-sized allocation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-secsta.adb (Has_Enough_Free_Memory): Check for full
chunk before computing the available size
Code cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch11.adb (Expand_N_Exception_Declaration): Sync comment
with declaration in System.Standard_Library.diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp
When looking for a misspelling of a restriction identifier we should
ignore the Not_A_Restriction_Id literal, because it doesn't represent
any restriction.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
Fi
This patch implements a syntactic language extension that allows
declarative items to appear in a sequence of statements. For example:
for X in S'Range loop
Item : Character renames S (X);
Item := Transform (Item);
end loop;
Previously, declare/begin/end was required, whi
This patch annotates SPARK-annotated libraries with returning
annotations (Always_Return, Might_Not_Return) to remove the warnings
raised by GNATprove about missing annotations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnarl/a-reatim.ads, libgnat/a-cfdlli.ads,
When pragma Restriction is used with an unknown restriction identifier,
it is better to not process the restriction expression, as it will
likely produce confusing error message.
In particular, an odd message appeared when there was a typo in the
restriction identifier whose expression requires sp
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Set_Boolean_Result): Simplify using
Boolean_Literals.diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@
Follow-on to previous change, which missed the vxworks version of this
package.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-socthi__vxworks.adb (C_Connect): Suppress new warning.diff --git a/gcc/ada/libgnat/g-socthi__vxworks.adb b/gcc/ada/libgnat/g-socthi__vxwo
Fix an inconsistency, where GNAT was warning about references to unset
objects inside generic packages with no bodies but not inside ordinary
packages with no bodies.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch7.adb (Analyze_Package_Declaration): Check references
Also move -P switch description to the top of the switches list.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* makeusg.adb,
doc/gnat_ugn/building_executable_programs_with_gnat.rst: Move -P
to the top of switches list and make it clear that gnatmake
A small fix for the aspect Yield defined in AI12-0279 for Ada 2022, to
accept aspect given for a subprogram body which acts as its own spec.
For example:
procedure Switch with Yield => True is
begin
...
end Switch;
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Only smp runtimes are built for vxworks7*, even though the -smp suffix
is removed during install. This change removes unused system packages
for rtp runtimes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-ppc-rtp.ads: Remove
* libgnat/system
This patch refines the heuristics for when we warn about unreachable
code, to avoid common false alarms.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Check_Unreachable_Code): Refine heuristics.
* sem_util.ads, sem_util.adb (Is_Static_Constant_Name): R
In the special mode for GNATprove, ignore switches controlling frontend
warnings, like already done for the control of style checks warnings.
Also remove special handling of warning mode in Errout to make up for
the previous division of control between -gnatw (GNAT) and --warnings
(GNATprove).
Tes
The concatenation routines may read too much data on the source side when
the destination buffer is larger than the final result. This change makes
sure that this does not happen any more and also removes obsolete stuff.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* rtsfi
This patch renames Next and Previous in a-convec.ads and other
containers to be _Next and _Previous, to avoid namespace pollution. The
compiler now uses the leading-underscore names to look them up.
The scanner is changed to allow this.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
This patch removes a warning in examples like this:
if cond then
return; -- or other jump
end if;
X := ...; -- where the value is out of range
where cond is known at compile time. It could, for example, be a generic
formal parameter that is known to be True in some instances.
This patch removes a spurious warning, saying that an internal entity of
a generic formal package is unreferenced. The immediate cause of this
warning is that the internal entity is explicitly flagged as coming from
source.
The explicit flagging was added decades ago to fix a missing
cross-referen
In the case of an expression function that is a primitive function of a
tagged type, freezing the tagged type needs to freeze the function (and
its return expression). A bug in this area could result in incorrect
behavior both at compile time and at run time. At compile time, freezing
rule violatio
While doing Preanalysis (as is the case during ghost code handling),
some range and/or overflow checks can be saved (see Saved_Checks in
checks.adb) and later one omitted as they would be redundant (see
Find_Check in checks.adb). In the case of ghost code, the node being
Preanalyzed is a temporary
For the sake of consistency with other runtime units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-stchop.ads: Use a double underscore prefix for symbols.diff --git a/gcc/ada/libgnat/s-stchop.ads b/gcc/ada/libgnat/s-stchop.ads
--- a/gcc/ada/libgnat/s-stchop.ads
This patch fixes a bug in which if the environment task has a specific
termination handler, and that handler raises an exception, the handler
is called recursively, causing infinite recursion. The RM requires such
exceptions to be ignored.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada
Before this patch, the only formal doubly linked lists were bounded and
definite. This means that it is necessary to provide their maximum
length or capacity at instantiation and that they can only be used with
definite element types.
The formal lists added by this patch are unbounded and indefini
This patch removes some obsolete code in the scanner and related files,
and corrects some comments. Tok_Special is used only by the
preprocessor, and uses only the two characters '#' and '$'.
It might be simpler to have a single flag indicating we're scanning for
preprocessing, instead of the Spec
GNAT was already warning about unreachable code after raise/goto/exit
statements, but not after calls to procedures with No_Return. Now this
warning is extended.
Also, previously the warning was suppressed for unreachable RETURN after
RAISE statements. Now this suppression is narrowed to functions
It is safe to call Is_Access_Variable without calling
Is_Access_Object_Type before. Compiler cleanup only; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Variable): Remove excessive guard.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/
This adds support in GNAT for ghost generic formal parameters, as
included in SPARK RM 6.9.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ghost.adb (Check_Ghost_Context): Delay checking for generic
associations.
(Check_Ghost_Context_In_Generic_Association):
Makefile cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Make-lang.in (ada/generated/gnatvsn.ads):
Simplify regular expression. The "interval expression",
i.e. \{8\} is part of the POSIX regular expressions, so
Fix detection of non-preelaborable constructs for checking SPARK
elaboration rules, which was tagging deferred constant declarations as
not preelaborable.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Non_Preelaborable_Construct): Fix for
deferred
This patch corrects an error in the compiler whereby a buffer sizing
error fails to get raised when compiling a regex expression with an
insufficiently sized Pattern_Matcher as the documentation indicated.
This, in turn, could lead to indexing errors when attempting to call
Match with the malformed
This patch corrects an error in the compiler whereby a function call in
prefix notation within a class condition causes a spurious error
claiming the name in the call is a non-callable entity when there exists
a type extension in the same unit extended with a component featuring
the same name as th
This avoids using a full access for constants internally generated from
assignments of aggregates with a Volatile_Full_Access type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/gigi.h (simple_constant_p): Declare.
* gcc-interface/decl.cc (gnat_to_gnu
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Constify a
local variable and move a couple of others around.diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
--- a/gcc/
To accomodate cases where objects allocated on the secondary stack
needed a more constrained alignement than Standard'Maximum_Alignement,
the alignment for all allocations in the full runtime were forced on to
be aligned on Standard'Maximum_Alignement*2. This changes removes this
workaround and cor
The compiler does not report an error on a type conversion to/from a
tagged type whose parent type is an interface type and there is no
relationship between the source and target types. This bug has been
dormant since January/2016.
This patch also improves the text of errors reported on interface
It comes from the Volatile_Full_Access (or Atomic) aspect: the aggregate is
effectively analyzed/resolved twice and this does not work. It is fixed by
calling Is_Full_Access_Aggregate before resolution.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Expand_Re
The powerpc e500 port has been LTS'd
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-e500-kernel.ads: Remove.
* libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-e500-rtp.ads: Likewise.diff --git a/gcc/ada/l
A cleanup opportunity spotted while working on improved detection of
uninitialised local scalar objects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-socket.adb (Get_Address_Info): Reduce scope of the
Found variable; avoid repeated assignment inside the
Only smp runtimes are built for vxworks7*, even though the -smp suffix
is removed during install. Therefore, in general, the build macros for
the non-smp runtimes are superfluous except on the legacy ppc-vxworks6
target where both the smp and non-smp runtime are built. Lastly, an
error message is
Fix an unintentionally removed comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_Actuals): Restore first sentence of a
comment.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -4
The compiler aborts with an internal error in gigi, but the problem is an
itype incorrectly shared between several branches of an if_statement that
has been created for a Build-In-Place return.
Three branches of this if_statement contain an allocator statement and
the latter two have been obtained
This patch corrects an error in the compiler whereby no
Corresponding_Spec was set for emptied CUDA global subprograms - leading
to a malformed tree.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnat_cuda.adb (Empty_CUDA_Global_Subprogram): Set
Specification and C
Respect a comment in sinfo.ads, which says: "Unchecked type conversion
nodes should be created by calling Tbuild.Unchecked_Convert_To, rather
than by directly calling Nmake.Make_Unchecked_Type_Conversion."
No test appears to be affected by this change, so this is just a
cleanup.
Tested on x86_64-
Ada 83 packages like Unchecked_Conversion or Text_IO are obsolete since
Ada 95. GNAT now warns about their uses when warnings on obsolescent
featured (Annex J) is active.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Make_Subtype_From_Expr): Do not set field to Empty.
* sem_util.adb (Visit_Itype): Remove ??? comment.diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
--- a/gcc/ada/exp_util.a
This patch reverts a fix for a spurious warning for validity checks on
type Long_Float. This fix was dubious (as it was only affecting
Long_Float and not Float) and apparently is no longer needed.
Cleanup related to improved detection of uninitialised scalar objects.
Tested on x86_64-pc-linux-gnu
Formal parameters have their flag Never_Set_In_Source set at the
beginning of Process_Formals routine (regardless of the parameter mode).
There is no need to set it again when Process_Formals calls
Set_Formal_Mode (for parameters of mode IN OUT and OUT).
Code cleanup related to improved detection
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.adb (Locate_File): Use Name_Find with a parameter and
not with a global buffer.diff --git a/gcc/ada/osint.adb b/gcc/ada/osint.adb
--- a/gcc/ada/osint.adb
+++ b/gcc/ada/osint.
Code cleanup related to looking at pragma Thread_Local_Storage.
Semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Init_Statements): Reuse Get_Pragma_Arg.
* exp_prag.adb (Arg_N): Likewise.diff --git a/gcc/ada/exp_ch3.adb b/gcc
Renaming of an object of ghost type leads to a spurious error. Now
fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ghost.adb (Is_OK_Ghost_Context): Detect ghost type inside object
renaming.diff --git a/gcc/ada/ghost.adb b/gcc/ada/ghost.adb
--- a/gcc/ada/ghost
Code cleanup related to improved detection of uninitialised objects;
semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Process_Formals): Avoid repeated calls to
Expression.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
---
Flag May_Be_Modified under go a series of renamings between 1996 and
2002. It was changed to Not_Assigned, then to Not_Source_Assigned and
finally to Never_Set_In_Source. Fix remaining references in comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Not
The implementation of __gnat_full_name uses the CRTL realpath, however
this function returns a null string so use the default implementation
instead.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* cstreams.c (__gnat_full_name) [QNX]: Remove block.diff --git a/gcc/ada/cstrea
The implementation of the build-in-place return protocol for functions
whose result type is an unconstrained array type generates dangling
references to local bounds built on the stack for the result as soon as
these bounds are not static. The reason is that the implementation
treats the return ob
Calls to First on No_List intentionally return Empty node, so explicit
guards against No_List are unnecessary. Code cleanup; semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_code.adb (Setup_Asm_IO_Args): Remove guard against No_List.
* par
This patch cleans up some code issues found while working on
finalization, and adds some debugging aids.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch7.adb: Change two constants Is_Protected_Body and
Is_Prot_Body to be Is_Protected_Subp_Body; these are not t
A new warning about unreachable code that follows calls to procedures
with No_Return would flag many unnecessary return statements. Those
returns statements were applied inconsistently, so this patch is
actually more a style cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Opportunity for extra annotations spotted while fixing detection of
unreachable code that follows calls to procedures annotated with
No_Return.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-socket.adb (Raise_Host_Error): Add No_Return aspect.
(Raise_GAI_E
When analysing pragma Thread_Local_Storage its argument is analysed by
the call to Check_Arg_Is_Library_Level_Local_Name. There is no need to
reanalyse it. Code cleanup; behaviour is not affected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Analyze_Pragma):
A new warning about unreachable code that follows calls to procedures
with No_Return would flag some dead defensive code. Comments next to
this code suggest that it was added to please some ancient version of
the compiler, but recent releases of GNAT do not require such a code.
Tested on x86_64-pc
To help the bootstrap path, we want to keep the compiler free from any
exception propagation during bootstrap. This has been broken recently in
various places.
Also introduce a way to more easily detect such breakage via the
-DNO_EXCEPTION_PROPAGATION which can now be used as part of BOOT_CFLAGS.
Code cleanup related to examining uses of Check_Unset_Reference for
improved detection of uninitialised scalar objects. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Aggregate_Constraint_Checks): Fix whitespace;
refactor repea
When using a qualified name such as Pack.Func as the prefix of a 'Result
attribute reference, the prefix is not fully resolved and may contain a
chain of homonyms. Look for the expected function in the homonym chain
instead of issuing an error if the first one is not the expected one.
Tested on x8
Cleanup only; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Check_Unreachable_Code): Avoid explicit use of
Sloc; this should also help when we finally use Source_Span for
prettier error messages.diff --git a/gcc/ada/sem
Code cleanup related to a new detection of uninitialised local scalar
objects; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Analyze_Block_Statement): Call to List_Length with
No_List is safe and will return zero.diff --git a/g
The rewriting as renaming optimization for object declarations is done
partly during analysis, guarded with Expander_Active, and partly during
expansion, so it makes sense to do it entirely during expansion.
This merges the two cases and removes obsolete or unnecessary conditions
guarding the tran
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks-ppc-kernel.ads (Word_Size): Compute
based on Standard'Word_Size.
Add comment to explain why we have an error and not just a warning.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Check_Missing_Return): Add reference to an RM rule.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/
Remove outdated a comment about the very first SPARK experiments
in GNAT.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Check_Missing_Return): Remove outdated comment.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ad
Routine Check_Unreachable_Code is only called on nodes belonging to a
list of statements (and it wouldn't make sense to call it on anything
else).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Check_Unreachable_Code): Remove redundant guard;
the call t
A new warning about unreachable code that follows calls to procedures
with No_Return would flag a clearly unintentional dead call to
Set_Address_Taken in analysis of Code_Address attribute.
This patch resurrects the dead code, which is worth fixing regardless of
the new warning.
Tested on x86_64-
convert_addresses is declared in adaint.h but is never referenced, so
remove it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* adaint.h (convert_addresses): Remove function declaration.diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
--- a/gcc/ada/adaint.h
+++ b/gcc/ada/ad
Pre vxworks7 code excepting legacy vxworks6 code is removed from
Makefile.rtl and unused files are deleted.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (*vxworks*): Remove most pre-vxworks7 code.
* vxworks-arm-link.spec: Remove.
* vxworks-e50
This changes the expanded code generated for if-expressions of 1-dimensional
arrays to create a static temporary on the stack if a small upper bound can
be computed for the length of a subtype covering the result. Static stack
allocation is preferred over dynamic allocation for code generation pur
If a constrained subtype is given when a deferred constant is declared,
then the subtype given in the completion is required (at compile time)
to be subject to a statically matching constraint. This rule was not
properly enforced in some cases and constructs that should have been
rejected were inco
For X'Access, the designated subtype of the access type must statically
match the nominal subtype of X. This patch fixes a bug where the error
was not detected when there is an unrelated declaration of the form "Y :
T := X;", where T is an unconstrained array subtype.
Tested on x86_64-pc-linux-gn
1 - 100 of 1001 matches
Mail list logo