Age | Commit message (Collapse) | Author | Files | Lines |
|
For instance: 6 months where Duration is 64bits. Heretofore LynxOS was unique
in having an approximately 12 days max delay. By experimentation the actual
maximum was determined and all relevant delay and sleep procedures rewritten to
incrementally wait if necessary.
2018-05-25 Doug Rupp <rupp@adacore.com>
gcc/ada/
* libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
(Relative_Timed_Wait): Remove.
* libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
for incremental looping. Remove references to Rel_Time and
Relative_Timed_Wait.
* libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
(Timed_Delay): Make separate.
* libgnat/s-optide.adb: New separate procedure.
* libgnat/s-osprim.ads (Max_System_Delay): New constant.
* libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
(Max_System_Delay): New constant.
From-SVN: r260724
|
|
This change the type Interfaces.C.Extensions.bool to be fully compatible
with the C99 and C++ standard boolean types by making it a fully-fledged
boolean type with convention C.
The following C+Ada program must compile quietly in LTO mode:
bool b;
struct S {};
bool foo (struct S *s) { return true; }
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Extensions;
package t_c is
b : aliased Extensions.bool; -- t.c:3
pragma Import (C, b, "b");
type S is record
null;
end record;
pragma Convention (C_Pass_By_Copy, S); -- t.c:5
function foo (the_s : access S) return Extensions.bool; -- t.c:7
pragma Import (C, foo, "foo");
end t_c;
with t_c; use t_c;
procedure P_C is
Dummy : aliased S;
begin
b := foo (Dummy'Access);
end;
2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
boolean type with convention C.
* libgnat/i-cexten.ads (bool): Change to boolean with convention C.
* gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
FOREIGN and use it throughout the function.
<E_Enumeration_Type>: Set precision 1 on boolean types with foreign
convention.
<E_Enumeration_Subtype>: Likewise for subtypes.
<E_Record_Type>: Force the size of a storage unit on empty classes.
* gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
boolean types with precision 1 if the size is the expected one.
From-SVN: r260721
|
|
Procedures Initialize and Adjust in the Ada.[Wide_[Wide_]]Strings.Unbounded
package are now inlined for nondispatching calls. No test available (efficiency
issue only).
2018-05-25 Bob Duff <duff@adacore.com>
gcc/ada/
* libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
From-SVN: r260719
|
|
2018-05-24 Raphael Amiard <amiard@adacore.com>
gcc/ada/
* libgnat/a-cohama.ads: Add documentation.
From-SVN: r260656
|
|
2018-05-24 Raphael Amiard <amiard@adacore.com>
gcc/ada/
* libgnat/a-convec.ads: Add documentation.
From-SVN: r260655
|
|
2018-05-24 Doug Rupp <rupp@adacore.com>
gcc/ada/
* argv-lynxos178-raven-cert.c: New file.
* libgnat/system-lynxos178-x86.ads: New file.
From-SVN: r260641
|
|
2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
gcc/ada/
* libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
From-SVN: r260595
|
|
This patch fixes a bug in which if Ada.Containers.Vectors is instantiated with
an Index_Type such that Index_Type'Base'Last is less than Count_Type'Last, and
the -gnatwE switch is used, the compiler gives spurious error messages.
The following test should compile quietly with -gnatwE:
gnatmake short_vectors.ads -gnatwa -gnatwE -gnatf
with Ada.Containers.Vectors;
package Short_Vectors is
type Index_Type is range 1 .. 256;
package Map_Pkg is new Ada.Containers.Vectors
(Index_Type => Index_Type,
Element_Type => Integer);
end Short_Vectors;
2018-05-23 Bob Duff <duff@adacore.com>
gcc/ada/
* libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
code in question is not reachable in the case where Count_Type'Last is
out of range.
From-SVN: r260590
|
|
Useful to check if an occurrence caught by a "when others" choice originates
from a foreign language, e.g. C++.
2018-05-23 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
* libgnat/g-excact.adb: Implement.
From-SVN: r260588
|
|
In a sequence like
(d) (c) (b) (a)
c++ raises <-- Ada calls c++, <-- c++ call Ada <-- Ada calls
exception others handler and handles c++
gets foreign c++ exception
exception and
re-raises
the original exception raised on the C++ world at (d) couldn't be caught
as a regular c++ exception at (b) when the re-raise performed at (c) is
done with an explicit call to Ada.Exceptions.Reraise_Occurrence.
Indeed, the latter just re-crafted a new Ada-ish occurence and the
nature and contents of the original exception object were lost.
This patch fixes this by refining Reraise_Occurrence to be more careful
with exceptions in the course of a propagation, just resuming propagation
of the original object.
From the set of soures below, compilation and execution with:
g++ -c bd.cc && gnatmake -f -g a.adb -largs bd.o --LINK=g++ && ./a
is expected to output:
foreign exception caught, reraising ...
b() caught x = 5
----
// bd.cc
extern "C" {
extern void c();
void b ();
void d ();
}
void b ()
{
try {
c();
} catch (int x) {
printf ("b() caught x = %d\n", x);
}
}
void d ()
{
throw (5);
}
-- a.adb
with C;
procedure A is
procedure B;
pragma Import (Cpp, B);
begin
B;
end;
-- c.ads
procedure C;
pragma Export (C, C, "c");
-- c.adb
with Ada.Exceptions; use Ada.Exceptions;
with System.Standard_Library;
with Ada.Unchecked_Conversion;
with Ada.Text_IO; use Ada.Text_IO;
procedure C is
package SSL renames System.Standard_Library;
use type SSL.Exception_Data_Ptr;
function To_Exception_Data_Ptr is new
Ada.Unchecked_Conversion (Exception_Id, SSL.Exception_Data_Ptr);
procedure D;
pragma Import (Cpp, D);
Foreign_Exception : aliased SSL.Exception_Data;
pragma Import
(Ada, Foreign_Exception, "system__exceptions__foreign_exception");
begin
D;
exception
when E : others =>
if To_Exception_Data_Ptr (Exception_Identity (E))
= Foreign_Exception'Unchecked_access
then
Put_Line ("foreign exception caught, reraising ...");
Reraise_Occurrence (E);
end if;
end;
2018-05-22 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
Expect an Exception_Occurence object, not an Access.
(Complete_And_Propagate_Occurrence): Adjust accordingly.
(Raise_From_Signal_Handler): Likewise.
(Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
available in the provided occurrence object, just re-propagate the
latter as a bare "raise;" would do.
* libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
* libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
to null, to mark that the occurrence we're crafting from the stream
contents is not being propagated (yet).
From-SVN: r260533
|
|
We now only have the executable code section boundaries at hand,
so can only infer offsets for symbols within those boundaries.
Symbols outside of this region are non-text symbols, pointless for
traceback symbolization anyway.
2018-05-22 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
executable code section boundaries.
From-SVN: r260510
|
|
This patch adds generic support for the Ada.Locales package that
relies on the setlocale() C service.
2018-05-22 Javier Miranda <miranda@adacore.com>
gcc/ada/
* locales.c: New implementation for the Ada.Locales package.
* libgnat/a-locale.ads: Remove comment indicating that this is not
implemented.
* doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
that this is not implemented.
* gnat_rm.texi: Regenerate.
From-SVN: r260509
|
|
Any program calling Gnat.Traceback.Symbolic.Enable_Cache for
dwarf based symbolization fails with a segmentation violation
when spawned with an inaccurate argv[0] such that it couldn't
be found on PATH.
argv[0] is most often found on PATH. One plausible case where
it isn't is when argv[0] is a mere file name and . isn't on PATH,
which might happen out of imprecise exec calls.
This change robustifies the Traceback.Symbolic implementation
to work in this case as well, by just trying to work with argv[0]
untouched as the executable file to fetch dwarf info from.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
of empty string when argv[0] couldn't be found on PATH.
(Enable_Cache): Raise Program_Error instead of attempting a null
pointer dereference when the Exec_Module initialization failed.
From-SVN: r260456
|
|
Explicit External aspect was an equivalant to an implicit default. It was only
needed as a workaround for a frontend bug. (If it meant to serve as
documentation, there should be explicit Effective_Reads and Effective_Writes
set to False too.)
No test, because these changes are semantically neutral.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
* libgnarl/a-taside.ads (Tasking_State): Likewise.
* libgnat/a-calend.ads (Clock_Time): Likewise.
From-SVN: r260455
|
|
Symbolization of traceback entries from dwarf info was
failing in some cases with shared libraries on ELF targets,
from unexpected overlapping of what we believed were code
regions for distinct modules.
This is caused by the inclusion of all SHF_ALLOC sections in
the set of sections of possible relevance to determine the span
of possible code addresses for a module.
This change renames the Get_memory_Bound subprogram to better
convey that we really care about sections hosting executable code
in particular, matching what the spec comments already claims.
It also renames the boolean flag conveying the info of relevance
in the Object_Section record, and adjusts the ELF implementation
of Get_Section to feed this flag from SHF_EXECINSTR instead of
SHF_ALLOC.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
(Object_Section): Rename Flag_Alloc component as Flag_Xcode.
* libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
component name.
(Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
* libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
change.
From-SVN: r260451
|
|
Symbolization of traceback entries from dwarf info is
failing in multiple cases for addresses originating from
shared libraries.
Part of the problem is a confusion across different functions
regarding the kind of "address" at hand, sometimes full process
runtime addresses (e.g. in traceback entries), sometimes module
relative (e.g. in dwarf info segments).
This change fixes this by introducing the use of distinct types
for the two kinds of addresses, resorting to System.Address
for runtime addresses and to Storage_Elements.Storage_Offset
for module relative values. The accompanying code changes
tidy a few places where we can now use standard operators
to combine offets & addresses, and include a few corrections
of consistency problems at spots where comparisons were done
between runtime addresses and relative offsets.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
Address, and type of Low, High to Storage_Offset.
(Low): Rename as Low_Address and convey that the return value is a
runtime reference accounting for a load address.
* libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
address/offset type changes.
(Aranges_Lookup): Likewise.
(Symbolic_Address): Likewise.
(Symbolic_Traceback): Likewise.
(Dump_Cache): Likewise.
(Is_Inside): Likewise.
(Open): Likewise.
(Set_Load_Address): Likewise.
(Low_Address): Likewise, and account for C.Load_Address.
* libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
(Multi_Module_Symbolic_Traceback): Compare address in traceback
with module Low_Address instead of Low.
From-SVN: r260450
|
|
Load_Address is just more consistent with the overall use of the component.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
Load_Address.
* libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
(Set_Load_Address): Likewise.
(Symbolic_Traceback): Likewise.
From-SVN: r260449
|
|
Symbolization of traceback addresses through shared libraries
requires information on the shared libraries load addresses, which
was at hand on Linuxbut not propagated through the runtime when
caching is enabled. This change fixes this.
2018-05-21 Olivier Hainque <hainque@adacore.com>
gcc/ada/
* libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
Load_Address argument and pass it down to Init_Module.
* libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
lm.l_addr as the Load_Address to Add_Module_To_Cache.
From-SVN: r260448
|
|
These are GNAT style violations detected with a trivial Libadalang checker.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* ada_get_targ.adb: Fix subprogram body headers.
* adabkend.adb: Likewise.
* checks.adb: Likewise.
* exp_ch3.adb: Likewise.
* exp_ch5.adb: Likewise.
* exp_ch9.adb: Likewise.
* exp_dist.adb: Likewise.
* exp_tss.adb: Likewise.
* inline.adb: Likewise.
* lib-writ.adb: Likewise.
* lib-xref-spark_specific.adb: Likewise.
* libgnarl/s-osinte__darwin.adb: Likewise.
* libgnarl/s-stusta.adb: Likewise.
* libgnarl/s-taprop__solaris.adb: Likewise.
* libgnarl/s-tposen.adb: Likewise.
* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
* libgnarl/s-vxwext__kernel.adb: Likewise.
* libgnat/a-btgbso.adb: Likewise.
* libgnat/a-cfdlli.adb: Likewise.
* libgnat/a-cfhama.adb: Likewise.
* libgnat/a-cfinve.adb: Likewise.
* libgnat/a-cimutr.adb: Likewise.
* libgnat/a-coboho.adb: Likewise.
* libgnat/a-cofove.adb: Likewise.
* libgnat/a-cofuve.adb: Likewise.
* libgnat/a-comutr.adb: Likewise.
* libgnat/a-exexda.adb: Likewise.
* libgnat/a-tags.adb: Likewise.
* libgnat/a-tideau.adb: Likewise.
* libgnat/a-wtdeau.adb: Likewise.
* libgnat/a-ztdeau.adb: Likewise.
* libgnat/g-alleve.adb: Likewise.
* libgnat/s-excdeb.adb: Likewise.
* libgnat/s-parint.adb: Likewise.
* libgnat/s-shasto.adb: Likewise.
* libgnat/s-traceb__hpux.adb: Likewise.
* prepcomp.adb: Likewise.
* sem_ch4.adb: Likewise.
* sem_ch6.adb: Likewise.
* sem_dist.adb: Likewise.
* sem_prag.adb: Likewise.
* sem_util.adb: Likewise.
* sinfo.adb: Likewise.
* switch.adb: Likewise.
From-SVN: r260442
|
|
ada/
* libgnat/i-cexten.ads (Float_128): New type.
c-family/
* c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
<REAL_TYPE>: Deal specifically with _Float128/__float128.
From-SVN: r258068
|
|
2018-01-11 Arnaud Charlet <charlet@adacore.com>
gcc/ada/
Bump copyright notices to 2018.
From-SVN: r256519
|
|
2018-01-11 Jerome Lambourg <lambourg@adacore.com>
gcc/ada/
* libgnat/g-soliop__qnx.ads: New.
* adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
for QNX.
From-SVN: r256512
|
|
GNATprove was emitting spurious checks about objects of the File_Type being
uninitialized and there was no easy to fix that (those checks could only be
silenced by pragma Annotate or by hiding File_Type behind as SPARK wrapper).
Now the full view of File_Type is annotated with Default_Initial_Condition
and GNATprove knows that objects of that type are default-initialized. The
default initialization is implicitly defined in the Ada RM (as indeed
there is no procedure that would take an IN OUT parameter of that type).
Semantics of Ada programs shall not be affected by these annotations,
so no frontend test is provided. It only affects GNATprove.
2018-01-11 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
(File_Type): Add Default_Initial_Condition aspect.
From-SVN: r256502
|
|
This implementation fixes an issue on Windows where a single drive letter
was not followed by a directory separator. On Windows the following
program:
with Ada.Text_IO; use Ada.Text_IO;
with GNAT.OS_Lib; use GNAT.OS_Lib;
procedure Main is
begin
Put_Line (Normalize_Pathname ("c:\"));
Put_Line (Normalize_Pathname ("c:\toto\.."));
end Main;
Must output:
C:\
C:\
2018-01-11 Pascal Obry <obry@adacore.com>
gcc/ada/
* libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
From-SVN: r256501
|
|
This patch imposes a new check and rewrites existing ones to ensure operations
involving SS_Ptr do not cause an Integer overflow. The Default_Sec_Stack_Size
function was removed in the process to simplify System.Parameter.
SS_Ptr was derived from the integer System.Parameters.Size_Type to ease the
creation of objects of type SS_Stack by the binder and imposes a maximum
secondary stack size of 2GB. In most cases, the user will not hit this limit as
they cannot specify task stack sizes of more than 2GB via the Storage_Size and
Secondary_Stack_Size pragmas. Additionally, most operating systems limit the
primary stack size to less than 2GB, with defaults under 10MB. Linux is the
rare exception where the user can unbound the primary stack.
Executing the following:
gnatmake -q overflow
./overflow
must yield:
raised STORAGE_ERROR : s-secsta.adb:140 explicit raise
-- overflow.adb:
with String_Pack;
procedure Overflow is
begin
null;
end Overflow;
-- string_pack.ads:
package String_Pack is
function Return_Big_String return String;
end String_Pack;
-- string_pack.adb:
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
package body String_Pack is
function Return_Big_String return String is
begin
return Integer'Last * "P";
end Return_Big_String;
S : String := Return_Big_String;
end String_Pack;
2018-01-11 Patrick Bernardi <bernardi@adacore.com>
gcc/ada/
* libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
Default_Sec_Stack_Size.
* libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
limit check so that the integer index does not overflow. Check the
dynamic stack allocation does not cause the secondary stack pointer to
overflow.
(SS_Info): Align colons.
(SS_Init): Cover the case when bootstraping with an old compiler that
does not set Default_SS_Size.
From-SVN: r256492
|
|
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Initialization_Item): Remove the specialized
processing for a null initialization item. Such an item is always
illegal.
2017-12-15 Bob Duff <duff@adacore.com>
* types.ads, types.h, libgnat/a-except.adb, exp_ch11.adb
(PE_Build_In_Place_Mismatch): New reason code for raising when the
BIPalloc formal parameter is incorrect. This can happen if a compiler
bug causes a mismatch of build-in-place between caller and callee.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Use
PE_Build_In_Place_Mismatch.
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.ads, exp_ch4.adb (Expand_N_Reduction_Expression): New
procedure.
* exp_util.adb (Insert_Actions): Handle N_Reduction_Expression.
* expander.adb (Expand): Call Expand_N_Reduction_Expression
* par-ch4.adb (P_Reduction_Expression): New procedure.
(P_Iterated_Component_Assoc_Or_Reduction): New precedure, extension of
P_Iterated_Component_Association.
(OK_Reduction_Expression_Parameter): New procedure.
(P_Aggregate_Or_Paren_Expr): Improve error message for malformed delta
aggregate.
* sem.adb (Analyze): Call Analyze_Reduction_Expression and
Analyze_Reduction_Expression_Parameter
* sinfo.ads, sinfo.adb: New node kinds N_Reduction_Expression and
N_Reduction_Expression_Parameter.
* sem_ch4.ads, sem_ch4.adb (Analyze_Reduction_Expression,
Analyze_Reduction_Expression_Parameter): New procedures.
* sem_res.adb (Resolve): Handle Reduction_Expression and
Reduction_Expression_Parameter
* sem_spark.adb: Dummy entries for Reduction_Expression and
Reduction_Expression_Parameter
* sprint.adb (Sprint_Node_Actual): Print Reduction_Expression,
Reduction_Expression_Parameter
From-SVN: r255693
|
|
gcc/ada/
2017-12-15 Bob Duff <duff@adacore.com>
* einfo.ads: Comment fix.
2017-12-15 Piotr Trojanek <trojanek@adacore.com>
* s-vercon.adb: Minor style fixes.
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): Do not emit a freeze node for an
itype that is the type of a discriminant-dependent component.
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Part_Of): The context-specific portion of the
analysis is now directed to several specialized routines.
(Check_Part_Of_Abstract_State): New routine.
(Check_Part_Of_Concurrent_Type): New routine. Reimplement the checks
involving the item, the single concurrent type, and their respective
contexts.
* sem_res.adb (Resolve_Entity_Name): Potential constituents of a single
concurrent type are now recorded regardless of the SPARK mode.
* sem_util.adb (Check_Part_Of_Reference): Split some of the tests in
individual predicates. A Part_Of reference is legal when it appears
within the statement list of the object's immediately enclosing
package.
(Is_Enclosing_Package_Body): New routine.
(Is_Internal_Declaration_Or_Body): New routine.
(Is_Single_Declaration_Or_Body): New routine.
(Is_Single_Task_Pragma): New routine.
gcc/testsuite/
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/expr_func2.ads, gnat.dg/expr_func2.adb: New testcase.
From-SVN: r255690
|
|
generic package body.
gcc/ada/
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
a generic package body. Unnesting is only an issue when generating
code, and if the main unit is generic then nested instance bodies have
not been created and analyzed, and unnesting will crash in the absence
of those bodies,
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* inline.adb (Add_Inlined_Body): Do not add a function which is
completed by an expression function defined in the same context as the
initial declaration because the completing body is not in a package
body.
(Is_Non_Loading_Expression_Function): New routine.
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* debug.adb: Move the functionality of -gnatdL to -gnatd_i. Restore
the behavior of -gnatdL from before revision 255412.
* sem_elab.adb: Update the section of compiler switches.
(Build_Call_Marker): Do not create a marker for a call which originates
from an expanded spec or body of an instantiated gener, does not invoke
a generic formal subprogram, the target is external to the instance,
and -gnatdL is in effect.
(In_External_Context): New routine.
(Process_Conditional_ABE_Activation_Impl): Update the uses of -gnatdL
and associated flag.
(Process_Conditional_ABE_Call): Update the uses of -gnatdL and
associated flag.
* switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
-gnatd_i.
* exp_unst.adb: Minor typo fixes and edits.
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Possible_Freeze): Do not set Delayed_Freeze on an
subprogram instantiation, now that the enclosing wrapper package
carries an explicit freeze node. THis prevents freeze nodes for the
subprogram for appearing in the wrong scope. This is relevant when the
generic subprogram has a private or incomplete formal type and the
instance appears within a package that declares the actual type for the
instantiation, and that type has itself a delayed freeze.
2017-12-15 Patrick Bernardi <bernardi@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Removed references to
the environment variable GNAT_STACK_LIMIT from the Stack Overflow
Checking section as it is no longer used by any of our supported
targets.
gcc/testsuite/
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/expr_func_main.adb, gnat.dg/expr_func_pkg.ads,
gnat.dg/expr_func_pkg.adb: New testcase.
2017-12-15 Hristian Kirtchev <kirtchev@adacore.com>
* gnat.dg/abe_pkg.adb, gnat.dg/abe_pkg.ads: New testcase.
2017-12-15 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/subp_inst.adb, gnat.dg/subp_inst_pkg.adb,
gnat.dg/subp_inst_pkg.ads: New testcase.
From-SVN: r255683
|
|
2017-12-15 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
Init_Assignment is rewritten, we need to set Assignment_OK on the new
node. Otherwise, we will get spurious errors when initializing via
assignment statement.
2017-12-15 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Visit_Node): Refine handling of 'Access to ignore non
relevant nodes.
(Has_Non_Null_Statements): Moved to sem_util for later reuse.
2017-12-15 Eric Botcazou <ebotcazou@adacore.com>
* exp_attr.adb (Is_Inline_Floating_Point_Attribute): Fix comment.
* libgnat/s-fatgen.adb (Model): Use Machine attribute.
(Truncation): Likewise.
2017-12-15 Bob Duff <duff@adacore.com>
* exp_ch7.adb (Expand_Cleanup_Actions): Make sure the block and handled
statement sequence generated for certain extended return statements
have a Sloc that is not No_Location. Otherwise, the back end doesn't
set any location and ends up reading uninitialized variables.
From-SVN: r255680
|
|
2017-12-15 Bob Duff <duff@adacore.com>
* types.ads, exp_ch6.adb, libgnat/s-regexp.ads, opt.ads: Partly revert
r255414, committed by mistake.
From-SVN: r255679
|
|
gcc/ada/
2017-12-05 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Contains_Refined_State): Remove.
2017-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case Predicate): A
predicate cannot apply to a formal type.
2017-12-05 Arnaud Charlet <charlet@adacore.com>
* exp_unst.ads: Fix typos.
2017-12-05 Jerome Lambourg <lambourg@adacore.com>
* libgnarl/s-taprop__qnx.adb: Better detect priority ceiling bug in
QNX. At startup, the first mutex created has a non-zero ceiling
priority whatever its actual policy. This makes some tests fail
(c940013 for example).
2017-12-05 Bob Duff <duff@adacore.com>
* exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Call
Expand_Cleanup_Actions for N_Extended_Return_Statement.
* exp_ch7.adb (Expand_Cleanup_Actions): Handle
N_Extended_Return_Statement by transforming the statements into a
block, and (indirectly) calling Expand_Cleanup_Actions on the block.
It's too hard for Expand_Cleanup_Actions to operate directly on the
N_Extended_Return_Statement, because it has a different structure than
the other node kinds that Expand_Cleanup_Actions.
* exp_util.adb (Requires_Cleanup_Actions): Add support for
N_Extended_Return_Statement. Change "when others => return False;" to
"when others => raise ...;" so it's clear what nodes this function
handles. Use named notation where appropriate.
* exp_util.ads: Mark incorrect comment with ???.
2017-12-05 Javier Miranda <miranda@adacore.com>
* exp_ch9.adb (Install_Private_Data_Declarations): Add missing
Debug_Info_Needed decoration of internally generated discriminal
renaming declaration.
2017-12-05 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Add handling of 'Access on
nested subprograms.
2017-12-05 Sergey Rybin <rybin@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Add description of '--ignore'
option for gnatmetric, gnatpp, gnat2xml, and gnattest.
2017-12-05 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Contains_Refined_State): Remove.
2017-12-05 Piotr Trojanek <trojanek@adacore.com>
* rtsfind.ads: Add new enumeration literals: RE_Clock_Time (for
Ada.Real_Time.Clock_Time) and RO_CA_Clock_Time (for
Ada.Calendar.Clock_Time).
2017-12-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Is_Private_Overriding): If the candidate private
subprogram is overloaded, scan the list of homonyms in the same
scope, to find the inherited operation that may be overridden
by the candidate.
* exp_ch11.adb, exp_ch7.adb: Minor reformatting.
2017-12-05 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): If the
Init_Assignment is rewritten, we need to set Assignment_OK on the new
node. Otherwise, we will get spurious errors when initializing via
assignment statement.
gcc/testsuite/
2017-12-05 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/private_overriding.adb: New testcase.
From-SVN: r255414
|
|
2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb: Update the terminology and switch sections.
(Check_SPARK_Model_In_Effect): New routine.
(Check_SPARK_Scenario): Verify the model in effect for SPARK.
(Process_Conditional_ABE_Call_SPARK): Verify the model in effect for
SPARK.
(Process_Conditional_ABE_Instantiation_SPARK): Verify the model in
effect for SPARK.
(Process_Conditional_ABE_Variable_Assignment_SPARK): Verify the model
in effect for SPARK.
2017-12-05 Nicolas Setton <setton@adacore.com>
* terminals.c (__gnat_setup_child_communication): As documented,
__gnat_setup_child_communication should not terminate - it is intended
to be used as the child process of a call to fork(). However, execvp
might actually return in some cases, for instance when attempting to
run a 32-bit binary on a 64-bit Linux distribution when the
compatibility packages are not installed. In these cases, exit the
program to conform to the documentation.
2017-12-05 Olivier Hainque <hainque@adacore.com>
* libgnat/s-tsmona.adb: Fix for oversight in the tsmona interface
update.
2017-12-05 Gary Dismukes <dismukes@adacore.com>
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Minor typo fix
and reformatting.
* gnat_ugn.texi: Regenerate.
2017-12-05 Olivier Hainque <hainque@adacore.com>
* sem_util.adb (Set_Convention): Always clear Can_Use_Internal_Rep
on access to subprogram types with foreign convention.
2017-12-05 Yannick Moy <moy@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix User's
Guide description of default settings of warnings.
From-SVN: r255413
|
|
2017-12-05 Olivier Hainque <hainque@adacore.com>
* s-dwalin.adb (Read_And_Execute_Isn): Adjust test checking for the end
of section. Add comments explaining the rationale of the computation.
2017-12-05 Bob Duff <duff@adacore.com>
* exp_ch11.adb: Minor refactoring.
2017-12-05 Hristian Kirtchev <kirtchev@adacore.com>
* debug.adb: Add debug switches d_a, d_e, and d_p, along with
documentation.
(Set_Underscored_Debug_Flag): New routine.
* debug.ads: Add the flags for all underscore switches.
(Set_Underscored_Debug_Flag): New routine.
* einfo.adb: Flag303 is now Suppress_Elaboration_Warnings.
(Suppress_Elaboration_Warnings): New routine.
(Set_Suppress_Elaboration_Warnings): New routine.
(Write_Entity_Flags): Add output for Suppress_Elaboration_Warnings.
* einfo.ads: Add new flag Suppress_Elaboration_Warnings.
(Suppress_Elaboration_Warnings): New routine along with pragma Inline.
(Set_Suppress_Elaboration_Warnings): New routine along with pragma
Inline.
* exp_ch3.adb (Build_Init_Procedure): Restore the behavior of the
legacy elaboration model.
(Default_Initialize_Object): Restore the behavior of the legacy
elaboration model.
* exp_ch9.adb: Add with and use clause for Sem_Elab.
(Build_Task_Activation_Call): Restore the behavior of the legacy
elaboration model.
* frontend.adb (Frontend): Restore the behavior of the legacy
elaboration model.
* opt.ads: Add new flags Legacy_Elaboration_Checks and
Relaxed_Elaboration_Checks, along with documentation.
* sem_attr.adb (Analyze_Access_Attribute): Restore the behavior of the
legacy elaboration model.
* sem_ch5.adb (Analyze_Assignment): Restore the behavior of the legacy
elaboration model.
* sem_ch7.adb (Analyze_Package_Declaration): Restore the behavior of
the legacy elaboration model.
* sem_ch8.adb (Attribute_Renaming): Restore the behavior of the legacy
elaboration model.
* sem_ch12.adb (Analyze_Instance_And_Renamings): Restore the behavior
of the legacy elaboration model.
(Analyze_Package_Instantiation): Restore the behavior of the legacy
elaboration model.
(Analyze_Subprogram_Instantiation): Restore the behavior of the legacy
elaboration model.
* sem_elab.adb: Update the documentation of the Processing phase.
Update the documentation on elaboration-related compilation
switches. Update the documentation on adding a new target. Add
Processing_Attributes which represent the state of the Processing
phase. Resurrect the previous elaboration model as "legacy elaboration
model".
(Build_Call_Marker): This routine does not function when the legacy
elaboration model is in effect. Do not consider entry calls and requeue
statements when debug flag d_e is in effect. Do not consider calls to
subprograms which verify the runtime semantics of certain assertion
pragmas when debug flag d_p is in effect.
(Build_Variable_Reference_Marker): This routine does not function when
the legacy elaboration model is in effect.
(Check_Elaboration_Scenarios): This routine does not function when the
legacy elaboration model is in effect.
(Ensure_Prior_Elaboration): The various flags have now been replaced
with a state. Do not generate implicit Elaborate[_All] pragmas when
their creation has been suppressed.
(Ensure_Prior_Elaboration_Static): The with clause is marked based on
the requested pragma, not on the nature of the scenario.
(In_External_Context): Removed.
(Is_Assertion_Pragma_Target): New routine.
(Is_Potential_Scenario): Stop the traversal of a task body when
reaching an accept or select statement, and debug switch d_a is in
effect.
(Kill_Elaboration_Scenario): This routine does not function when the
legacy elaboration model is in effect.
(Process_Activation_Generic): The various flags have now been replaced
with a state.
(Process_Conditional_ABE): The various flags have now been replaced
with a state.
(Process_Conditional_ABE_Access): The various flags have now been
replaced with a state.
(Process_Conditional_ABE_Activation_Impl): The various flags have now
been replaced with a state. Do not process an activation call which
activates a task whose type is defined in an external instance, and
debug switch dL is in effect. Suppress the generation of implicit
Elaborate[_All] pragmas once a conditional ABE check has been
installed.
(Process_Conditional_ABE_Call): The various flags have now been
replaced with a state. Do not process a call which invokes a subprogram
defined in an external instance, and debug switch dL is in effect.
(Process_Conditional_ABE_Call_Ada): The various flags have now been
replaced with a state. Suppress the generation of implicit
Elaborate[_All] pragmas once a conditional ABE check has been
installed.
(Process_Conditional_ABE_Call_SPARK): The various flags have now been
replaced with a state.
(Process_Conditional_ABE_Instantiation): The various flags have now
been replaced with a state.
(Process_Conditional_ABE_Instantiation_Ada): The various flags have now
been replaced with a state. Suppress the generation of implicit
Elaborate[_All] pragmas once a conditional ABE check has been
installed.
(Process_Conditional_ABE_Instantiation_SPARK): The various flags have
now been replaced with a state.
(Process_Guaranteed_ABE_Activation_Impl): The various flags have now
been replaced with a state.
(Process_Single_Activation): The various flags have now been replaced
with a state.
(Record_Elaboration_Scenario): This routine does not function when the
legacy elaboration model is in effect.
(Traverse_Body): The various flags have now been replaced with a state.
* sem_elab.ads: Resurrect the pre-18.x elaboration model as "legacy
elaboration model".
* sem_prag.adb (Analyze_Pragma): Restore the behavior of the legacy
elaboration model.
* sem_res.adb (Resolve_Call): Restore the behavior of the legacy
elaboration model.
(Resolve_Entity_Name): Restore the behavior of the legacy elaboration
model.
* sem_util.adb (Mark_Elaboration_Attributes): This routine does not
function when the legacy elaboration model is in effect.
* sinfo.adb (Is_Known_Guaranteed_ABE): Update the assertion check.
(No_Elaboration_Check): New routine.
(Set_Is_Known_Guaranteed_ABE): Update the assertion check.
(Set_No_Elaboration_Check): New routine.
* sinfo.ads: Update the documentation of flag Is_Known_Guaranteed_ABE
along with occurrences in nodes. Add new flag No_Elaboration_Check
along with occurrences in nodes.
* switch-c.adb (Scan_Front_End_Switches): Add processing for debug
switches with underscores. Add processing for switches -gnatH and
-gnatJ.
* usage.adb (Usage): Add output for switches -gnatH and -gnatJ.
* doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the
documentation to include the legacy and relaxed elaboration models.
* gnat_ugn.texi: Regenerate.
2017-12-05 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/platform_specific_information.rst: Minor edit.
Improve doc on required packages for linux 32bits.
2017-12-05 Doug Rupp <rupp@adacore.com>
* tracebak.c (ppc64-vx7): USE_GCC_UNWINDER for 64bit.
2017-12-05 Javier Miranda <miranda@adacore.com>
* checks.adb (Generate_Range_Check): Force evaluation of the node in
more cases. This patch was written to improve the code generated by
the CCG compiler but it is enabled for all targets since double
evaluation is always a potential source of inefficiency.
2017-12-05 Gary Dismukes <dismukes@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Remove reference to obsolete
-fdump-xref switch.
From-SVN: r255412
|
|
2017-12-05 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Use the SLOC of the
iteration scheme throughout, except for the new loop statement(s).
2017-12-05 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Gen_Assign): Do not analyze the expressionn of the
assignment if it is part of an Iterated_Component_Association: the
analysis needs to take place once the loop structure is analyzed and
the loop parameter made visible, because references to it typically
appear in the corresponding expression. This is necessary if the
expression is an aggregate, because previous pre-analysis of the
expression does not handle nested aggregates properly.
2017-12-05 Bob Duff <duff@adacore.com>
* sem_res.adb (Resolve_Allocator): Avoid coextension processing for an
allocator that is the expansion of a build-in-place function call.
2017-12-05 Olivier Hainque <hainque@adacore.com>
libgnat/
* s-trasym__dwarf.adb (spec of Module_Name.Get): Instead of
possibly adjusting the lookup address by a load address, expect
a extra argument through which the load address can be conveyed
separately.
(Multi_Module_Symbolic_Traceback): Adjust accordingly. Pass the
retrieved load address to Init_Module.
* s-tsmona__linux.adb (Get): Honor the new interface.
* s-tsmona__mingw.adb (Get): Likewise.
* s-dwalin.ads: Adjust comments to be explicit about which
addresses are from module info and which are run-time addresses,
offsetted by the module load address.
* s-dwalin.adb (Set_Load_Address): Simply set C.Load_Slide.
Do not alter the module Low and High (relative) addresses.
(Is_Inside): Improve documentation regarding the kinds of addresses
at hand and correct the test.
(Symbolic_Traceback): Use separate variables with explicit names
for the address in traceback (run-time value) and the address to
lookup within the shared object (module-relative). Adjust the
computation of address passed to Symbolic_Address for symbolization.
From-SVN: r255411
|
|
The Newlib time_t has now 64 bits for RTEMS.
gcc/ada
* gcc-interface/Makefile.in (RTEMS): Use s-osprim__rtems.adb.
* libgnat/s-osprim__rtems.adb: New file.
* libgnarl/s-osinte__rtems.adb (pthread_cond_t): Fix alignment.
(pthread_mutexattr_t): Likewise.
(pthread_rwlockattr_t): Likewise.
(pthread_rwlock_t): Likewise.
(time_t): Use 64-bit integer.
From-SVN: r255380
|
|
2017-11-16 Yannick Moy <moy@adacore.com>
* sem_elab.adb (Include): Fix mode of parameter Curr to out.
2017-11-16 Piotr Trojanek <trojanek@adacore.com>
* sem_util.ads, sem_util.adb (Is_CCT_Instance): Allow calls where
Context_Id denotes a record type.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Check_SPARK_Primitive_Operation): Enable the check in
instantiations.
2017-11-16 Doug Rupp <rupp@adacore.com>
Initial gnat port to aarch64-wrs-vxworks7
* libgnarl/s-vxwork__aarch64.ads,
libgnat/system-vxworks7-aarch64-rtp-smp.ads,
libgnat/system-vxworks7-aarch64.ads: New files
* sigtramp-vxworks-target.inc (aarch64): New section.
* tracebak.c (USE_ARM_UNWINDING): Disable for ARMARCH8A.
From-SVN: r254805
|
|
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Include): Including a node which is also a compilation
unit terminates the search because there are no more lists to examine.
2017-11-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Ensure that a renaming
declaration does not define a primitive operation of a tagged type for
SPARK.
(Check_SPARK_Primitive_Operation): New routine.
2017-11-16 Arnaud Charlet <charlet@adacore.com>
* libgnat/a-elchha.adb (Last_Chance_Handler): Display Argv (0) in
message when using -E binder switch.
2017-11-16 Piotr Trojanek <trojanek@adacore.com>
* errout.ads: Fix minor typo in comment.
From-SVN: r254804
|
|
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Handle properly
the pragma Compile_Time_Error when it appears in a generic package
declaration and uses an expanded name to denote the current unit.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* libgnarl/s-taprop__qnx.adb: Fix incorrect casing for pthread_self.
* tracebak.c: Add support for tracebacks in QNX.
2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Aggr_Size_OK): Bump base limit from 50000 to 500000.
2017-11-09 Yannick Moy <moy@adacore.com>
* erroutc.adb, set_targ.adb: Remove pragma Annotate for CodePeer
justification.
2017-11-09 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/platform_specific_information.rst: Document packages
needed on GNU/Linux by GNAT.
* gnat_ugn.texi: Regenerate.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Contracts): Remove the three parameter
version. This routine now only analyzes contracts and does not perform
any freezing actions.
(Analyze_Previous_Contracts): Removed.
(Freeze_Previous_Contracts): New routine.
* contracts.ads (Analyze_Previous_Contracts): Removed.
(Freeze_Previous_Contracts): New routine.
* sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
enclosing package spec regardless of whether the list denotes the
visible or private declarations. Fix the removal of partial state
refinements when the context is a package spec.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Freeze previous
contracts.
* sem_ch7.adb (Analyze_Package_Body_Helper): Freeze previous contracts.
* sem_ch9.adb (Analyze_Entry_Body): Freeze previous contracts.
(Analyze_Protected_Body): Freeze previous contracts.
(Analyze_Task_Body): Freeze previous contracts.
* sem_prag.adb: Comment reformatting.
2017-11-09 Bob Duff <duff@adacore.com>
* libgnarl/g-thread.ads, libgnarl/g-thread.adb: (Make_Independent):
Export this so users can use it without importing
System.Tasking.Utilities.
* libgnarl/s-tassta.adb (Vulnerable_Complete_Task): Relax assertion
that fails when Make_Independent is called on a user task.
* libgnarl/s-taskin.ads (Master_Of_Task): Avoid unusual
capitalization style ((style) bad casing of "Master_of_Task").
From-SVN: r254580
|
|
2017-11-09 Pascal Obry <obry@adacore.com>
* libgnarl/s-taprop__mingw.adb: On Windows, initialize the thead handle
only for foreign threads. We initialize the thread handle only if not
yet initialized. This happens in Enter_Task for foreign threads only.
But for native threads (Ada tasking) we do want to keep the real
handle (from Create_Task) to be able to free the corresponding
resources in Finalize_TCB (CloseHandle).
2017-11-09 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Analyze_Attribute): Default initialize P_Type,
P_Base_Type.
(Error_Attr_P): Fix name in pragma No_Return.
(Unexpected_Argument): Add pragma No_Return.
(Placement_Error): Add pragma No_Return.
2017-11-09 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Elab_Flag_Needed): Elaboration flag not needed when the
dispatch table is statically built.
(Make_DT): Declare constant the Interface_Table object associated with
an statically built dispatch table. For this purpose the Offset_To_Top
value of each interface is computed using the dummy object.
* exp_ch3.adb (Build_Init_Procedure): Do not generate code initializing
the Offset_To_Top field of secondary dispatch tables when the dispatch
table is statically built.
(Initialize_Tag): Do not generate calls to Register_Interface_Offset
when the dispatch table is statically built.
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
Document the new GNAT restriction Static_Dispatch_Tables.
* gnat_rm.texi: Regenerate.
2017-11-09 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reorder declarations
to avoid a dormant bug.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* init.c: Define missing __gnat_alternate_stack for QNX. Set it to 0,
as such capability is not available on the OS.
* link.c: Make sure linker options for QNX are correct.
* libgnarl/s-osinte__qnx.ads: Add some missing bindings to pthread.
* libgnarl/s-taprop__qnx.adb: New, derived from s-taprop__posix.adb. This brings
in particular a workaround with locks priority ceiling where a higher
priority task is allowed to lock a lower ceiling priority lock. This
also fixes the scheduling of FIFO tasks when the priority of a task is
lowered.
* libgnat/system-qnx-aarch64.ads: Fix priority ranges.
2017-11-09 Yannick Moy <moy@adacore.com>
* erroutc.adb (Output_Error_Msgs): Justify CodePeer false positive
message.
* gnatbind.adb (Scan_Bind_Arg): Simplify test to remove always true
condition.
* namet.adb (Copy_One_Character): Add assumption for static analysis,
as knowledge that Hex(2) is in the range 0..255 is too complex for
CodePeer.
(Finalize): Add assumption for static analysis, as the fact that there
are symbols in the table depends on a global invariant at this point in
the program.
* set_targ.adb (Check_Spaces): Justify CodePeer false positive message.
* stylesw.adb (Save_Style_Check_Options): Rewrite to avoid test always
true.
From-SVN: r254573
|
|
2017-11-09 Javier Miranda <miranda@adacore.com>
* libgnat/s-rident.ads (Static_Dispatch_Tables): New restriction name.
* exp_disp.adb (Building_Static_DT): Check restriction.
(Building_Static_Secondary_DT): Check restriction.
(Make_DT): Initialize the HT_Link to No_Tag.
* opt.ads (Static_Dispatch_Tables): Rename flag...
(Building_Static_Dispatch_Tables): ... into this. This will avoid
conflict with the restriction name.
* gnat1drv.adb: Update.
* exp_aggr.adb (Is_Static_Dispatch_Table_Aggregate): Update.
* exp_ch3.adb (Expand_N_Object_Declaration): Update.
2017-11-09 Pascal Obry <obry@adacore.com>
* libgnarl/s-taprop__mingw.adb: Minor code clean-up. Better using a
named number.
From-SVN: r254572
|
|
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-qnx.c: Fix obvious typo.
2017-11-09 Doug Rupp <rupp@adacore.com>
* libgnarl/s-taprop__linux.adb (Monotonic_Clock): Minor reformatting.
2017-11-09 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve): If expression is an entity whose type has
implicit dereference, generate reference to it, because no reference is
generated for an overloaded entity during analysis, given that its
identity may not be known.
2017-11-09 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Thunk): Replace substraction of
offset-to-top field by addition.
(Make_Secondary_DT): Initialize the offset-to-top field with a negative
offset.
* exp_ch3.adb (Build_Offset_To_Top_Function): Build functions that
return a negative offset-to-top value.
(Initialize_Tag): Invoke runtime services Set_Dynamic_Offset_To_Top and
Set_Static_Offset_To_Top passing a negative offet-to-top value;
initialize also the offset-to-top field with a negative offset.
* libgnat/a-tags.adb (Base_Address): Displace the pointer by means of
an addition since the offset-to-top field is now a negative value.
(Displace): Displace the pointer to the object means of a substraction
since it is now a negative value.
(Set_Dynamic_Offset_to_top): Displace the pointer to the object by
means of a substraction since it is now a negative value.
2017-11-09 Eric Botcazou <ebotcazou@adacore.com>
* gnat1drv.adb (Gnat1drv): Call Errout.Finalize (Last_Call => True)
before Errout.Output_Messages also in the case of compilation errors.
2017-11-09 Javier Miranda <miranda@adacore.com>
* doc/gnat_ugn/the_gnat_compilation_model.rst (Interfacing with C++ at
the Class Level): Fix error interfacing with C strings.
* gnat_ugn.texi: Regenerate.
2017-11-09 Jerome Lambourg <lambourg@adacore.com>
* system-qnx-aarch64.ads: Fix the priority constants.
* s-osinte__qnx.ads: Fix constants for handling the locking protocols
and scheduling.
* s-osinte__qnx.adb: New file , prevents the use of priority 0 that
corresponds to an idle priority on QNX.
2017-11-09 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb, sem_util.adb, sem_elab.adb: Fix minor typos in
comments.
From-SVN: r254566
|
|
2017-11-08 Piotr Trojanek <trojanek@adacore.com>
* lib-xref.ads, lib-xref-spark_specific.adb
(Traverse_Compilation_Unit): Move declaration to package body.
2017-11-08 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Obtain
the type of the renaming from its defining entity, rather then the
subtype mark as there may not be a subtype mark.
2017-11-08 Jerome Lambourg <lambourg@adacore.com>
* adaint.c, s-oscons-tmplt.c, init.c, libgnat/system-qnx-aarch64.ads,
libgnarl/a-intnam__qnx.ads, libgnarl/s-intman__qnx.adb,
libgnarl/s-osinte__qnx.ads, libgnarl/s-qnx.ads,
libgnarl/s-taprop__qnx.adb, s-oscons-tmplt.c, sigtramp-qnx.c,
terminals.c: Initial port of GNAT for aarch64-qnx
2017-11-08 Elisa Barboni <barboni@adacore.com>
* exp_util.adb (Find_DIC_Type): Move...
* sem_util.ads, sem_util.adb (Find_DIC_Type): ... here.
2017-11-08 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Allocator): Add info messages corresponding to
the owner and corresponding coextension.
2017-11-08 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Delta_Aggregate): Divide into the
following separate procedures.
(Resolve_Delta_Array_Aggregate): Previous code form
Resolve_Delta_Aggregate.
(Resolve_Delta_Record_Aggregate): Extend previous code to cover latest
ARG decisions on the legality rules for delta aggregates for records:
in the case of a variant record, components from different variants
cannot be specified in the delta aggregate, and this must be checked
statically.
From-SVN: r254547
|
|
array aggregate if...
gcc/ada/
2017-10-20 Bob Duff <duff@adacore.com>
* exp_aggr.adb (Initialize_Array_Component): Avoid adjusting a
component of an array aggregate if it is initialized by a
build-in-place function call.
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Use -gnatd.9 to disable
bip for nonlimited types.
* debug.adb: Document -gnatd.9.
2017-10-20 Bob Duff <duff@adacore.com>
* sem_ch12.adb: Remove redundant setting of Parent.
2017-10-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch4.adb (Find_Concatenation_Types): Filter out operators if one
of the operands is a string literal.
2017-10-20 Bob Duff <duff@adacore.com>
* einfo.ads: Comment fix.
2017-10-20 Clement Fumex <fumex@adacore.com>
* switch-c.adb: Remove -gnatwm from the switches triggered by -gnateC.
2017-10-20 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Extract_Power): Accept dimension values that are not
non-negative integers when the dimensioned base type is an Integer
type.
gcc/testsuite/
2017-10-20 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/dimensions.adb, gnat.dg/dimensions.ads: New testcase.
From-SVN: r253941
|
|
2017-10-14 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Is_Build_In_Place_Result_Type): Include code for
enabling b-i-p for nonlimited controlled types (but disabled).
2017-10-14 Justin Squirek <squirek@adacore.com>
* sem_elab.adb (Is_Suitable_Variable_Assignment): Replace call to
Has_Warnings_Off with Warnings_Off.
2017-10-14 Piotr Trojanek <trojanek@adacore.com>
* sinfo.ads (Generic_Parent): Remove wrong (possibly obsolete) comment.
2017-10-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Declarations): Analyze the contract of an
enclosing package at the end of the visible declarations.
* sem_prag.adb (Analyze_Initialization_Item): Suppress the analysis of
an initialization item which is undefined due to some illegality.
2017-10-14 Patrick Bernardi <bernardi@adacore.com>
* ali.adb: Add new ALI line 'T' to read the number of tasks contain
within each unit that require a default-sized primary and secondary
stack to be generated by the binder.
(Scan_ALI): Scan new 'T' lines.
* ali.ads: Add Primary_Stack_Count and Sec_Stack_Count to Unit_Record.
* bindgen.adb (Gen_Output_File): Count the number of default-sized
stacks within the closure that are to be created by the binder.
(Gen_Adainit, Gen_Output_File_Ada): Generate default-sized secondary
stacks and record these in System.Secodnary_Stack.
(Resolve_Binder_Options): Check if System.Secondary_Stack is in the
closure of the program being bound.
* bindusg.adb (Display): Add "-Q" switch. Remove rouge "--RTS" comment.
* exp_ch3.adb (Count_Default_Sized_Task_Stacks): New routine.
(Expand_N_Object_Declaration): Count the number of default-sized stacks
used by task objects contained within the object whose declaration is
being expanded. Only performed when either the restrictions
No_Implicit_Heap_Allocations or No_Implicit_Task_Allocations are in
effect.
* exp_ch9.adb (Create_Secondary_Stack_For_Task): New routine.
(Expand_N_Task_Type_Declaration): Create a secondary stack as part of
the expansion of a task type if the size of the stack is known at
run-time and the restrictions No_Implicit_Heap_Allocations or
No_Implicit_Task_Allocations are in effect.
(Make_Task_Create_Call): If using a restricted profile provide
secondary stack parameter: either the statically created stack or null.
* lib-load.adb (Create_Dummy_Package_Unit, Load_Unit,
Load_Main_Source): Include Primary_Stack_Count and Sec_Stack_Count in
Unit_Record initialization expressions.
* lib-writ.adb (Add_Preprocessing_Dependency,
Ensure_System_Dependency): Include Primary_Stack_Count and
Sec_Stack_Count in Unit_Record initialization expression.
(Write_ALI): Write T lines.
(Write_Unit_Information): Do not output 'T' lines if there are no
stacks for the binder to generate.
* lib-writ.ads: Updated library information documentation to include
new T line entry.
* lib.adb (Increment_Primary_Stack_Count): New routine.
(Increment_Sec_Stack_Count): New routine.
(Primary_Stack_Count): New routine.
(Sec_Stack_Count): New routine.
* lib.ads: Add Primary_Stack_Count and Sec_Stack_Count components to
Unit_Record and updated documentation.
(Increment_Primary_Stack_Count): New routine along with pragma Inline.
(Increment_Sec_Stack_Count): New routine along with pragma Inline.
(Primary_Stack_Count): New routine along with pragma Inline.
(Sec_Stack_Count): New routine along with pragma Inline.
* opt.ads: New constant No_Stack_Size. Flag Default_Stack_Size
redefined. New flag Default_Sec_Stack_Size and
Quantity_Of_Default_Size_Sec_Stacks.
* rtfinal.c Fixed erroneous comment.
* rtsfind.ads: Moved RE_Default_Secondary_Stack_Size from
System.Secondary_Stack to System.Parameters. Add RE_SS_Stack.
* sem_util.adb (Number_Of_Elements_In_Array): New routine.
* sem_util.ads (Number_Of_Elements_In_Array): New routine.
* switch-b.adb (Scan_Binder_Switches): Scan "-Q" switch.
* libgnarl/s-solita.adb (Get_Sec_Stack_Addr): Removed routine.
(Set_Sec_Stack_Addr): Removed routine.
(Get_Sec_Stack): New routine.
(Set_Sec_Stack): New routine.
(Init_Tasking_Soft_Links): Update System.Soft_Links reference to
reflect new procedure and global names.
* libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb,
libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__solaris.adb,
libgnarl/s-taprop__vxworks.adb (Register_Foreign_Thread): Update
parameter profile to allow the secondary stack size to be specified.
* libgnarl/s-tarest.adb (Create_Restricted_Task): Update the parameter
profile to include Sec_Stack_Address. Update Tasking.Initialize_ATCB
call to remove Secondary_Stack_Size reference. Add secondary stack
address and size to SSL.Create_TSD call.
(Task_Wrapper): Remove secondary stack creation.
* libgnarl/s-tarest.ads (Create_Restricted_Task,
Create_Restricted_Task_Sequential): Update parameter profile to include
Sec_Stack_Address and clarify the Size parameter.
* libgnarl/s-taskin.adb (Initialize_ATCB): Remove Secondary_Stack_Size
from profile and body.
(Initialize): Remove Secondary_Stack_Size from Initialize_ATCB call.
* libgnarl/s-taskin.ads: Removed component Secondary_Stack_Size from
Common_ATCB.
(Initialize_ATCB): Update the parameter profile to remove
Secondary_Stack_Size.
* libgnarl/s-tassta.adb (Create_Task): Updated parameter profile and
call to Initialize_ATCB. Add secondary stack address and size to
SSL.Create_TSD call, and catch any storage exception from the call.
(Finalize_Global_Tasks): Update System.Soft_Links references to reflect
new subprogram and component names.
(Task_Wrapper): Remove secondary stack creation.
(Vulnerable_Complete_Master): Update to reflect TSD changes.
* libgnarl/s-tassta.ads: Reformat comments.
(Create_Task): Update parameter profile.
* libgnarl/s-tporft.adb (Register_Foreign_Thread): Update parameter
profile to include secondary stack size. Remove secondary size
parameter from Initialize_ATCB call and add it to Create_TSD call.
* libgnat/s-parame.adb, libgnat/s-parame__rtems.adb,
libgnat/s-parame__vxworks.adb (Default_Sec_Stack_Size): New routine.
* libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove type
Percentage. Remove constants Dynamic, Sec_Stack_Percentage and
Sec_Stack_Dynamic. Add constant Runtime_Default_Sec_Stack_Size and
Sec_Stack_Dynamic.
(Default_Sec_Stack_Size): New routine.
* libgnat/s-secsta.adb, libgnat/s-secsta.ads: New implementation. Is
now Preelaborate.
* libgnat/s-soflin.adb: Removed unused with-clauses. With
System.Soft_Links.Initialize to initialize non-tasking TSD.
(Create_TSD): Update parameter profile. Initialize the TSD and
unconditionally call SS_Init.
(Destroy_TSD): Update SST.SS_Free call.
(Get_Sec_Stack_Addr_NT, Get_Sec_Stack_Addr_Soft, Set_Sec_Stack_Addr_NT,
Set_Sec_Stack_Addr_Soft): Remove routines.
(Get_Sec_Stack_NT, Get_Sec_Stack_Soft, Set_Sec_Stack_NT,
Set_Sec_Stack_Soft): Add routines.
(NT_TSD): Move to private part of package specification.
* libgnat/s-soflin.ads: New types Get_Stack_Call and Set_Stack_Call
with suppressed access checks. Renamed *_Sec_Stack_Addr_* routines and
objects to *_Sec_Stack_*. TSD: removed warning suppression and
component intialization. Changed Sec_Stack_Addr to Sec_Stack_Ptr.
(Create_TSD): Update parameter profile.
(NT_TSD): Move to private section from body.
* libgnat/s-soliin.adb, libgnat/s-soliin.ads: New files.
* libgnat/s-thread.ads (Thread_Body_Enter): Update parameter profile.
* libgnat/s-thread__ae653.adb (Get_Sec_Stack_Addr, Set_Sec_Stack_Addr):
Remove routine.
(Get_Sec_Stack, Set_Sec_Stack): Add routine.
(Thread_Body_Enter): Update parameter profile and body to adapt to new
System.Secondary_Stack.
(Init_RTS): Update body for new System.Soft_Links names.
* gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
s-soliin.o.
From-SVN: r253754
|
|
if BIPAlloc is not passed in...
gcc/ada/
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Add self-checking
code so if BIPAlloc is not passed in, it will likely raise
Program_Error instead of cause miscellaneous chaos.
(Is_Build_In_Place_Result_Type): Return False if not Expander_Active,
as for the other Is_B-I-P... functions.
* sem_aggr.adb (Resolve_Extension_Aggregate): For an extension
aggregate whose ancestor part is a build-in-place call returning a
nonlimited type, transform the assignment to the ancestor part to use a
temp.
* sem_ch3.adb (Build_Itype_Reference): Handle the case where we're
creating an Itype for a library unit entity.
(Check_Initialization): Avoid spurious error message on
internally-generated call.
* sem_ch5.adb (Analyze_Assignment): Handle the case where the
right-hand side is a build-in-place call. This didn't happen when b-i-p
was only for limited types.
* sem_ch6.adb (Create_Extra_Formals): Remove assumption that b-i-p
implies >= Ada 2005.
* sem_ch7.adb (Scan_Subprogram_Refs): Avoid traversing the same nodes
repeatedly.
* sem_util.adb (Next_Actual): Handle case of build-in-place call.
2017-10-09 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Minor edit.
2017-10-09 Piotr Trojanek <trojanek@adacore.com>
* libgnarl/s-taprob.adb: Minor whitespace fix.
2017-10-09 Bob Duff <duff@adacore.com>
* namet.ads: Minor comment fix.
2017-10-09 Piotr Trojanek <trojanek@adacore.com>
* sem_aux.adb (Unit_Declaration_Node): Detect protected declarations,
just like other program units listed in Ada RM 10.1(1).
2017-10-09 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Update_Chain_In_Scope): Modify warning messages.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations, Check_Generic_Parent): If an
actual for a formal package is an instantiation of a child unit, create
a freeze node for the instance of the parent if it appears in the same
scope and is not frozen yet.
2017-10-09 Pierre-Marie de Rodat <derodat@adacore.com>
* exp_atag.ads, libgnat/a-tags.adb, libgnat/a-tags.ads: Enhance
in-source documentation for tagged types's Offset_To_Top.
2017-10-09 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Build_Assignment): Parameter name N was somewhat
confusing. Same for N_Loc. Remove assumption that b-i-p implies
limited. This is for the case of a function call that occurs as the
default for a record component.
(Expand_N_Object_Declaration): Deal with the case where expansion has
created an object declaration initialized with something like
F(...)'Reference.
* exp_ch3.adb: Minor reformatting.
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_Attribute_Reference, case 'Valid): The prefix of
the attribute is an object, but it may appear within a conversion. The
object itself must be retrieved when generating the range test that
implements the validity check on a scalar type.
gcc/testsuite/
2017-10-09 Ed Schonberg <schonberg@adacore.com>
* gnat.dg/validity_check2.adb, gnat.dg/validity_check2_pkg.ads:
New testcase.
From-SVN: r253548
|
|
2017-09-29 Bob Duff <duff@adacore.com>
* exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to
what we had before.
(Make_Build_In_Place_Call_In_Object_Declaration): Back out previous
change. Set the Etype in the class-wide case. This fixes a regression
in the libadalang test suite.
2017-09-29 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon
in comment markup.
* gnat_ugn.texi: Regenerate.
2017-09-29 Justin Squirek <squirek@adacore.com>
* ali-util.adb, comperr.adb, cprint.adb, errout.adb, fmap.adb,
fname-sf.adb, frontend.adb, lib-xref-spark_specific.adb, gnat1drv.adb,
gnatls.adb, lib.adb, lib-load.adb, lib-writ.adb, prepcomp.adb,
sinput-d.adb, sinput-l.adb, sprint.adb, targparm.adb: Update comparison
for checking source file status and error message and/or call to
Read_Source_File.
* libgnat/s-os_lib.ads: Add new potential value constant for
uninitialized file descriptors.
* osint.adb, osint.ads (Read_Source_File): Add extra parameter to
return result of IO to encompass a read access failure in addition to a
file-not-found error.
From-SVN: r253294
|
|
2017-09-29 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Use_Package): Add sanity check to avoid
circularities in the use-clause chain.
2017-09-29 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Replace_Components): Update references to discriminants
located in variant parts inherited from the parent type.
2017-09-29 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_Assign_Record): Do not generate code to copy
discriminants if the target is an Unchecked_Union record type.
2017-09-29 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): Reject the use of an
iterated component association in an aggregate for a record type.
2017-09-29 Piotr Trojanek <trojanek@adacore.com>
* make.adb: Minor whitespace fixes.
* libgnat/s-resfil.ads: Minor reformatting.
From-SVN: r253288
|
|
2017-09-25 Justin Squirek <squirek@adacore.com>
* aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
exp_dbug.adb, exp_unst.adb, exp_util.adb, frontend.adb, gnat1drv.adb,
gnatdll.adb, gnatlink.adb, gnatls.adb, gnatname.adb, gnatxref.adb,
gnatfind.adb, libgnat/a-cfhama.ads, libgnat/a-exetim__mingw.adb,
libgnat/a-strmap.adb, libgnat/a-teioed.adb, libgnat/g-alvety.ads,
libgnat/g-expect.adb, libgnat/g-regist.adb, libgnat/g-socket.adb,
libgnat/g-socthi__mingw.ads, libgnat/s-stausa.adb,
libgnat/s-tsmona__linux.adb, libgnat/s-tsmona__mingw.adb,
libgnarl/s-taenca.adb, libgnarl/s-tassta.adb, libgnarl/s-tarest.adb,
libgnarl/s-tpobop.adb, make.adb, makeusg.adb, namet.adb, output.ads,
put_scos.adb, repinfo.adb, rtsfind.adb, scn.ads, sem_attr.adb,
sem_aux.ads, sem_warn.ads, targparm.adb, xr_tabls.adb, xref_lib.adb:
Removal of ineffective use-clauses.
* exp_ch9.adb (Is_Simple_Barrier_Name): Check for false positives with
constant folded barriers.
* ghost.adb, sprint.adb, sem_ch10.adb, sem_warn.adb: Change access to
Subtype_Marks and Names list in use-clause nodes to their new singular
counterparts (e.g. Subtype_Mark, Name).
* par.adb, par-ch8.adb (Append_Use_Clause): Created to set
Prev_Ids and More_Ids in use-clause nodes.
(P_Use_Clause): Modify to take a list as a parameter.
(P_Use_Package_Clause, P_Use_Type_Clause): Divide names and
subtype_marks within an aggregate use-clauses into individual clauses.
* par-ch3.adb, par-ch10.adb, par-ch12.adb: Trivally modify call to
P_Use_Clause to match its new behavior.
* sem.adb (Analyze): Mark use clauses for non-overloaded entities.
* sem_ch4.adb (Try_One_Interp): Add sanity check to handle previous
errors.
* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
Analyze_Subprogram_Body_Helper): Update use clause chain at the end of
the declarative region.
* sem_ch7.adb (Analyze_Package_Body_Helper): Update use clause chain
after analysis (Analyze_Package_Specification): Update use clause chain
when there is no body.
* sem_ch8.ads, sem_ch8.adb (Analyze_Use_Package, Analyze_Use_Type): Add
parameter to determine weither the installation of scopes should also
propagate on the use-clause "chain".
(Mark_Use_Clauses): Created to traverse use-clause chains and determine
what constitutes a valid "use" of a clause.
(Update_Use_Clause_Chain): Created to aggregate common machinary used
to clean up use-clause chains (and warn on ineffectiveness) at the end
of declaritive regions.
* sem_ch8.adb (Analyze_Package_Name): Created to perform analysis on a
package name from a use-package clause.
(Analyze_Package_Name_List): Created to perform analysis on a list of
package names (similar to Analyze_Package_Name).
(Find_Most_Prev): Created to traverse to the beginning of a given
use-clause chain.
(Most_Decendant_Use_Clause): Create to identify which clause from a
given set is highest in scope (not always the most prev).
(Use_One_Package, Use_One_Type): Major cleanup and reorganization to
handle the new chaining algorithm, also many changes related to
redundant clauses. A new parameter has also been added to force
installation to handle certain cases.
* sem_ch9.adb (Analyze_Entry_Body, Analyze_Protected_Body,
Analyze_Task_Body): Mark use clauses on relevant entities.
* sem_ch10.adb, sem_ch10.ads (Install_Context_Clauses,
Install_Parents): Add parameter to determine weither the installation
of scopes should also propagate on the use-clause "chain".
* sem_ch12.adb (Inline_Instance_Body): Add flag in call to
Install_Context to avoid redundant chaining of use-clauses.
* sem_ch13.adb: Minor reformatting.
* sem_res.adb (Resolve): Mark use clauses on operators.
(Resolve_Call, Resolve_Entity_Name): Mark use clauses on relevant
entities.
* sinfo.adb, sinfo.ads (Is_Effective_Use_Clause,
Set_Is_Effective_Use_Clause): Add new flag to N_Use_Clause nodes to
represent any given clause's usage/reference/necessity.
(Prev_Use_Clause, Set_Prev_Use_Clause): Add new field to N_Use_Clause
nodes to allow loose chaining of redundant clauses.
(Set_Used_Operations, Set_Subtype_Mark, Set_Prev_Ids, Set_Names,
Set_More_Ids, Set_Name): Modify set procedure calls to reflect
reorganization in node fields.
* types.ads (Source_File_Index): Adjust index bounds.
(No_Access_To_Source_File): New constant.
2017-09-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_One_Aspect): In ASIS mode make a full copy of
the expression to be used in the generated attribute specification
(rather than relocating it) to avoid resolving a potentially malformed
tree when the expression is resolved through an ASIS-specific call to
Resolve_Aspect_Expressions. This manifests itself as a crash on a
function with parameter associations.
From-SVN: r253144
|
|
2017-09-25 Yannick Moy <moy@adacore.com>
* exp_spark.adb (Expand_SPARK_Indexed_Component,
Expand_SPARK_Selected_Component): New procedures to insert explicit
dereference if required.
(Expand_SPARK): Call the new procedures.
2017-09-25 Patrick Bernardi <bernardi@adacore.com>
* libgnat/a-stwiun.adb, libgnat/s-stchop__vxworks.adb,
libgnat/g-socthi__vxworks.ads, libgnat/a-stzunb.adb,
libgnat/a-strunb.adb, libgnarl/s-osinte__lynxos178.adb,
libgnarl/s-intman__vxworks.adb, libgnarl/s-osinte__darwin.adb,
libgnarl/a-exetim__darwin.adb: Removed ineffective use-clauses.
2017-09-25 Vasiliy Fofanov <fofanov@adacore.com>
* adaint.c (win32_wait): Properly handle error and take into account
the WIN32 limitation on the number of simultaneous wait objects.
2017-09-25 Yannick Moy <moy@adacore.com>
* sem_ch3.adb (Constant_Redeclaration): Do not insert a call to the
invariant procedure in GNATprove mode.
* sem_ch5.adb (Analyze_Assignment): Likewise.
From-SVN: r253143
|
|
2017-09-18 Bob Duff <duff@adacore.com>
Alternate fix for PR ada/71358
* libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
Instead, make a local copy of Config, and if it's null, allocate an
empty Command_Line_Configuration_Record, so we won't crash on null
pointer dereference.
From-SVN: r252909
|