gcc/gcc/ada/ChangeLog-2018
Jakub Jelinek 3f27508ce4 gcc.c (process_command): Update copyright notice dates.
* gcc.c (process_command): Update copyright notice dates.
	* gcov-dump.c (print_version): Ditto.
	* gcov.c (print_version): Ditto.
	* gcov-tool.c (print_version): Ditto.
	* gengtype.c (create_file): Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/fortran/
	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
gcc/ada/
 	* gnat_ugn.texi: Bump @copying's copyright year.
 	* gnat_rm.texi: Likewise.
gcc/d/
	* gdc.texi: Bump @copyrights-d year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.

From-SVN: r267492
2019-01-01 12:34:49 +01:00

5716 lines
222 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* adaint.c [__APPLE__] (__gnat_lwp_self): Ensure that the system
interface used is available on the target.
2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (rm_size): Take into account the padding in
the case of a record type containing a template.
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Likewise.
Do not subtract the padded size for Max_Size_In_Storage_Elements.
<Attr_Descriptor_Size>: Tweak comment.
2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (choices_to_gnu): Directly use a naked boolean
discriminant if the value is the boolean true.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
PR ada/88429
* gcc-interface/Makefile.in (./stamp-gnatlib1-$(RTSDIR)): Also pass
MULTISUBDIR to sub-make and add quotes around $(THREAD_KIND).
(gnatlib-shared-dual): Also pass PICFLAG_FOR_TARGET to sub-make.
(gnatlib-sjlj): Also pass MULTISUBDIR to sub-make, but do not pass
PICFLAG_FOR_TARGET.
(gnatlib-zcx): Likewise.
2018-12-11 Piotr Trojanek <trojanek@adacore.com>
* libgnat/a-calend.ads: Add "Global => null" contract to pure routines.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Check_Pragma_Thread_Local_Storage): Use the
violating set to diagnose detect an illegal initialization,
rather than the complement of the OK set.
(Freeze_Object_Declaration): Factorize code in
Has_Default_Initialization.
(Has_Default_Initialization, Has_Incompatible_Initialization):
New routines.
2018-12-11 Dmitriy Anisimkov <anisimko@adacore.com>
* libgnat/g-socket.ads (Family_Type): Add new enumerated value
Family_Unspec to be able to use it in Get_Address_Info parameter
and find IPv4 together with IPv6 addresses.
(Inet_Addr_Bytes_Length): Zero length for Family_Unspec. New
IPv6 predefined constant addresses.
(IPv4_To_IPv6_Prefix): IPv4 mapped to IPv6 address prefix.
(Is_IPv4_Address): Rename from Is_IP_Address and published.
(Is_IPv6_Address): New routine.
(Image of Inet_Addr_Type): Fix description about IPv6 address
text representation.
(Level_Type): New propocol level IP_Protocol_For_IPv6_Level.
(Add_Membership_V4): New socket option equal to Add_Membership.
(Drop_Membership_V4): New socket option equal to
Drop_Membership.
(Multicast_If_V4): New socket option equal to Multicast_If.
(Multicast_Loop_V4, Add_Membership_V6, Drop_Membership_V6,
Multicast_If_V6, Multicast_Loop_V6, Multicast_Hops, IPv6_Only):
New socket option for IPv6.
(Address_Info): New record to keep address info.
(Address_Info_Array): Array to keep address info records.
(Get_Address_Info): Routine to get address info records by host
and service names.
(Host_Service): Record to keep host and service names.
(Get_Name_Info): New routine to get host and service names by
address.
(Create_Socket): Add Level parameter, IP_Protocol_For_IP_Level
default.
(Name_Array, Inet_Addr_Array): Change array index to Positive.
* libgnat/g-socket.adb (IPV6_Mreq): New record definition for
IPv6.
(Hex_To_Char): Remove.
(Short_To_Network, Network_To_Short): Move to package
GNAT.Sockets.Thin_Common.
(Is_IP_Address): Remove.
(To_In_Addr, To_Inet_Addr): Move to package
GNAT.Sockets.Thin_Common.
(Get_Socket_Option): Get value of Multicast_Loop option as
integer boolean, process IPv6 options. Don't try to get
Add_Membership_V4, Add_Membership_V6, Drop_Membership_V4, and
Drop_Membership_V6 as not supported by the socket API.
(Set_Socket_Option): Set value of Multicast_Loop option as
integer boolean, process IPv6 options.
* gsocket.h
(IPV6_ADD_MEMBERSHIP): Define from IPV6_JOIN_GROUP if necessary
for VxWorks.
(IPV6_DROP_MEMBERSHIP): Define from IPV6_LEAVE_GROUP if
necessary for VxWorks
(HAVE_INET_NTOP): New definition.
(HAVE_INET_PTON): Includes VxWorks now.
* socket.c (__gnat_getaddrinfo, __gnat_getnameinfo,
__gnat_freeaddrinfo, __gnat_gai_strerror, __gnat_inet_ntop): New
routines.
* libgnat/g-sothco.ads, libgnat/g-sothco.adb
(socklen_t, In6_Addr, To_In6_Addr): New.
(To_In_Addr, To_Inet_Addr): Move from package body GNAT.Sockets.
(To_Inet_Addr): New overload with In6_Addr type parmeter.
(In_Addr_Access_Array): Remove.
(Sockaddr): Unchecked_Union instead of Sockaddr_In and old
defined generic Sockaddr.
(Set_Address): Use it to set family, port and address into
Sockaddr.
(Get_Address): New routine to get Socket_Addr_Type from
Sockaddr.
(Addrinfo): Structure to use with getaddrinfo.
(C_Getaddrinfo, C_Freeaddrinfo, C_Getnameinfo, C_GAI_Strerror,
Inet_Ntop): New routine import.
(Short_To_Network, Network_To_Short): Move from package body
GNAT.Sockets.
* libgnat/g-stsifd__sockets.adb: Use Sockaddr instead of
Sockaddr_In.
* s-oscons-tmplt.c (AF_UNSPEC, EAI_SYSTEM, SOCK_RAW,
IPPROTO_IPV6, IP_RECVERR, SIZEOF_socklen_t, IF_NAMESIZE): New
constants.
(AI_xxxx_OFFSET): Constants to consider platform differences in
field positions and sizes for addrinfo structure.
(AI_xxxxx): Flags for getaddrinfo.
(NI_xxxxx): Flags for getnameinfo.
(IPV6_xxxxx): Socket options for IPv6.
(Inet_Ntop_Linkname): New routine.
2018-12-11 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Deactivate
expansion in ignored ghost subprogram body.
* sem_ch7.adb (Analyze_Package_Body_Helper): Deactivate
expansion in ignored ghost package body.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Register_Subprogram): A subprogram whose address
is taken (through attribute Address or Access) is reachable and
cannot be eliminated, even if there is no explicit call to it:
the address may be used in an indirect call or in some
address-related operation.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Get_Actual_Subtype): Function can return type
mark.
(Get_Cursor_Type): Improve recovery and error message on a
misplaced First aspect for an iterable type.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb: Add with and use clauses for Sem_Mech.
(Ensure_Valid): Update the "annoying special case" to include
entry and function calls. Use Get_Called_Entity to obtain the
entry or subprogram being invoked, rather than retrieving it
manually. Parameters passed by reference do not need a validity
check.
2018-12-11 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Global_Item): Refine error message.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_In_Declarations): Extend
subprogram so that it is usable for visible and private
declarations of a package declaration, not just for declarations
in the pakage body.
* exp_ch13.adb (Expand_Freeze_Entity): Handle properly the
freezing of a finalizer routine generated for a controlled objet
declaration. Special processing already applies to finalizers
because they are usually displaced into another construct.
2018-12-11 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Ensure Current_Subprogram is
always initialized.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Add
gnat_annotate_type local variable initialized to Empty.
<E_Record_Subtype>: Set it to the Cloned_Subtype, if any. For
types, back-annotate alignment and size values earlier and only
if the DECL was created here; otherwise, if gnat_annotate_type
is present, take the values from it.
(gnat_to_gnu_field): Add gnat_clause local variable. If a
component clause is present, call validate_size only once on the
Esize of the component. Otherwise, in the packed case, do not
call validate_size again on the type of the component but
retrieve directly its RM size.
(components_to_record): Minor tweak.
(set_rm_size): Remove useless test.
* gcc-interface/trans.c (gnat_to_gnu): Do not wrap the instance of
a boolean discriminant attached to a variant part.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Array_Aggr_Subtype. Resolve_Aggr_Expr): Indicate
that aggregate subtype has a predicate if the component type has
a predicate; do not rely on exisatence of predicate function for
component, in case component is a type no yet frozen, for which
predicate function has not been created yet.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Packed_Array_Aggregate_Handled): Bail out for
any non-scalar type as component type of the array.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Is_Bit_Packed_Array): Fix values of component size.
(Is_Packed): Likewise.
* gcc-interface/utils.c (convert): Do not extract the value of a
justified modular type if the destination type is a regular
array.
* gcc-interface/decl.c (gnat_to_gnu_component_type): Pass
TYPE_DECL to validate_size wherever the array has packed
components.
2018-12-11 Bob Duff <duff@adacore.com>
* gnat1drv.adb (gnat1drv): Pass the correct Object value when
calling Write_ALI in the case of -gnatQ.
* gnatbind.adb (Gnatbind): Avoid silent failure; give an error
message.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Needs_Fat_Pointer): A fat pointer is required if
the entity has a private type whose full view is an
unconstrained array type.
(Rewrite_One_Ref): If the reference is to a static constant, use
its value rather than create a reference through the activation
record. This is more efficient, and furthermore indispensable if
the context requires a static constant, such as in a branch of a
case statement.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Apply
Dynamic_Predicate check to an object of an array type
initialized with an aggregate.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Add_To_Result): Move the ignored Ghost-specific
handling of freeze nodes to...
(Freeze_Entity): ...here. This ensures that the freeze nodes of
constructs that have recursive freezing are preserved when the
context is ignored Ghost, and the top level construct being
frozen is non-Ghost.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* uintp.ads, uintp.adb (UI_From_Integral): New generic function,
to simplify construction of Universal_Integer representations
from any Integer type. If type is small enough the code is
equivalent to a call to UI_To_Int with appropriate conversions;
otherwise the routine uses the existing mechanism of building a
vector of suitable integer values and calling Vector_To_Uint.
The routine must not be applied to a biased type.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Itype_Reference): Handle properly an itype
reference created for a function that is a compilation unit, for
example if the function builds in place an object of a limited
type.
2018-12-11 Dmitriy Anisimkov <anisimko@adacore.com>
* libgnat/g-socket.ads, libgnat/g-socket.adb: Fix duration
computations to be compatible with the type for socket timeouts
on Windows.
2018-12-11 Gary Dismukes <dismukes@adacore.com>
* exp_util.ads: Use preferred U.S. spelling of "honored".
* sem_spark.adb: Remove extra whitespace.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Insert_Action): Add new formal parameter
Spec_Expr_OK.
(Insert_Actions): Add new formal parameter Spec_Expr_OK. Update
all calls to Insert_Actions where relevant. Honour an insertion
from a spec expression context when requested by the caller.
* exp_util.ads (Insert_Action): Add new formal parameter
Spec_Expr_OK.
(Insert_Actions): Add new formal parameter Spec_Expr_OK.
* freeze.adb (Add_To_Result): Force the insertion of the freeze
node even when the context is a spec expression.
2018-12-11 Jerome Lambourg <lambourg@adacore.com>
* vxaddr2line.adb, vxlink-bind.adb, vxlink-bind.ads,
vxlink-link.adb, vxlink-link.ads, vxlink-main.adb, vxlink.adb,
vxlink.ads: Remove.
* gcc-interface/Make-lang.in, gcc-interface/Makefile.in: Remove
bits for vxaddr2line.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, exp_ch7.adb, gnat1drv.adb, sem_ch10.adb,
sem_ch13.adb, sem_ch6.adb, sem_ch7.adb, sem_util.adb: Minor
reformatting.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* fe.h (Is_Atomic_Object): Declare.
(Is_Volatile_Object): Likewise.
* gcc-interface/trans.c (atomic_or_volatile_copy_required_p): New.
(Call_to_gnu): Generate a copy for an actual parameter passed by
reference if the conditions set forth by RM C.6(19) are met and
specificially deal with an atomic actual parameter.
2018-12-11 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Is_Subprogram_Stub_Without_Prior_Declaration):
Return False on stubs that complete a generic subprogram.
* sem_util.ads: Update corresponding comment.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): In GNATprove mode build a
subtype declaration if the allocator has a subtype indication
with a constraint. This allows additional proofs to be applied
to allocators that designate uninitialized constrained objects.
2018-12-11 Yannick Moy <moy@adacore.com>
* sem_util.adb (Has_Full_Default_Initialization): Consider
access types as having full default initialization.
2018-12-11 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Gnat1drv): Issue specific error message in
GNATprove mode when multiple file names on the command line.
* osint.adb, osint.ads (Dump_Command_Line_Source_File_Names):
New procedure to print file names on the command line.
2018-12-11 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Convert_To_Assignments): When gnerating C, do
not declare a temporary to initialize an aggregate assigned to
Out or In_Out parameters whose type has no discriminants. This
avoids stack overflow errors at runtime.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Extend
algorithm to cover subprograms generated in nested loops and in
exception handlers, in order to build an explicit elaboration
procedure in more complex cases.
2018-12-11 Jerome Lambourg <lambourg@adacore.com>
* Makefile.rtl, gcc-interface/Makefile.in: Remove crtbe bits for
VxWorks.
* libgnat/system-vxworks-arm-rtp-smp.ads,
libgnat/system-vxworks-arm-rtp.ads,
libgnat/system-vxworks-arm.ads,
libgnat/system-vxworks-e500-kernel.ads,
libgnat/system-vxworks-e500-rtp-smp.ads,
libgnat/system-vxworks-e500-rtp.ads,
libgnat/system-vxworks-ppc-kernel.ads,
libgnat/system-vxworks-ppc-rtp-smp.ads,
libgnat/system-vxworks-ppc-rtp.ads,
libgnat/system-vxworks-ppc.ads,
libgnat/system-vxworks-x86-kernel.ads,
libgnat/system-vxworks-x86-rtp-smp.ads,
libgnat/system-vxworks-x86-rtp.ads,
libgnat/system-vxworks7-aarch64-rtp-smp.ads,
libgnat/system-vxworks7-aarch64.ads,
libgnat/system-vxworks7-arm-rtp-smp.ads,
libgnat/system-vxworks7-e500-kernel.ads,
libgnat/system-vxworks7-e500-rtp-smp.ads,
libgnat/system-vxworks7-e500-rtp.ads,
libgnat/system-vxworks7-ppc-kernel.ads,
libgnat/system-vxworks7-ppc-rtp-smp.ads,
libgnat/system-vxworks7-ppc-rtp.ads,
libgnat/system-vxworks7-ppc64-kernel.ads,
libgnat/system-vxworks7-ppc64-rtp-smp.ads,
libgnat/system-vxworks7-x86-kernel.ads,
libgnat/system-vxworks7-x86-rtp-smp.ads,
libgnat/system-vxworks7-x86-rtp.ads,
libgnat/system-vxworks7-x86_64-kernel.ads,
libgnat/system-vxworks7-x86_64-rtp-smp.ads: Remove pragma
Linker_Options for --specs.
* vx_crtbegin.c, vx_crtbegin.inc, vx_crtbegin_array.c,
vx_crtbegin_attr.c, vx_crtend.c, vxworks-gnat-crtbe-link.spec:
Remove.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations,
Freeze_Entity_Checks): Process aspect Predicate in the same
fashion as aspect Dynamic_Predicate.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (elaborate_all_entities_for_package):
Skip aliasing subprograms.
2018-12-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Update gnatmetric
documentation for the Libadalang-based version.
2018-12-11 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (In_Object_Declaration): Removed.
(Is_CCG_Supported_Aggregate): New subprogram that replaces
In_Object_Declaration extending its functionality to indicate if
an aggregate is in a context supported by the CCG backend.
2018-12-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Update gnatstub
documentation for the Libadalang-based version.
* gnat_ugn.texi: Regenerate.
2018-12-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Push_Type, Pop_Type): New procedures, used for
analysis of aspect expressions for record types, whose
components (not only discriminants) may be referenced in aspect
expressions.
(Analyze_Aspect_Specifications, Analyze_Aspects_At_Freeze_Point,
Analyze_Aspect_At_End-Of_Declarations,
Resolve_Aspect_Expressions): Use the new subprograms.
(Check_Aspect_At_End_Of_Declarations): Improve error message.
(Build_Predicate_Functions): Do not build their bodies in a
generic unit.
(Is_Derived_Type_With_Constraint): New subprogram to uncover and
reject aspect specificationss on types that appear after the
type is frozen.
* sem_ch13.ads (Push_Scope_And_Install_Discriminants,
Uninstall_Discriminants_And_Pop_Scope): Remove.
* sem_ch6.adb, sem_ch6.ads (Fully_Conformant_Expressions):
Additional parameter to improve error message on illegal aspect
specifications whose resolution differ between aspect
specification and freeze point.
* freeze.adb: Remove references to
Install/Uninstall_Discriminants.
2018-12-11 Pierre-Marie de Rodat <derodat@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Document the -fgnat-encodings switch.
* gnat_ugn.texi: Regenerate.
2018-12-11 Justin Squirek <squirek@adacore.com>
* sem_ch10.adb (Analyze_Subunit): Modify conditional to fully
remove parent contexts from library-level subprogram bodies in
addition to package bodies.
2018-12-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb (Expand_Pragma_Initial_Condition): Do not
generate an Initial_Condition procedure and a call to it when
the associated pragma is ignored.
* sem_ch10.adb (Analyze_Compilation_Unit): Minor cleanup.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* fe.h (Debug_Generated_Code): Declare.
* gcc-interface/gigi.h (enum inline_status_t): Rename
is_disabled to is_default, is_enabled to is_requested and add
is_prescribed.
* gcc-interface/decl.c (inline_status_for_subprog): New function.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Use it to get the
inlining status of the subprogram.
* gcc-interface/trans.c (gigi): Adjust to above renaming.
(build_raise_check): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.c (create_subprog_decl): Likewise. Deal
with is_prescribed status by setting
DECL_DISREGARD_INLINE_LIMITS. Do not set the
DECL_NO_INLINE_WARNING_P flag if Debug_Generated_Code is true.
2018-12-03 Gary Dismukes <dismukes@adacore.com>
* sem_aux.adb (Object_Type_Has_Constrained_Partial_View): Return
True for an untagged discriminated formal derived type when
referenced within a generic body (augments existing test for
formal private types).
* sem_util.adb (Is_Dependent_Component_Of_Mutable_Type): If the
prefix of the name is a qualified expression, retrieve the
operand of that. Add a test of whether the (possible)
dereference prefix is a variable, and also test whether that
prefix might just be of an access type (occurs in some implicit
dereference cases) rather than being an explicit dereference.
Retrieve the Original_Node of the object name's main prefix and
handle the possibility of that being a qualified expression.
Remove special-case code for explicit dereferences that don't
come from source. Add test for the renaming not being within a
generic body for proper determination of whether a formal access
type is known to be constrained (it is within a generic spec,
but not in the body). Fix an existing incorrect test for
renaming of a discriminant-dependent component of a untagged
generic formal type being within a generic body, adding test of
taggedness and calling In_Generic_Body (now properly checks for
cases where the renaming is in a nongeneric body nested within a
generic). Return False in cases where the selector is not a
component (or discriminant), which can occur for
prefixed-notation calls.
2018-12-03 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Apply_Check): For array types, apply a length
check rather than a qualification, to avoid spurious errors when
the value of a dependend expression has a matching length but
different bounds from those of the type of the contect.
2018-12-03 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/a-calend.adb: Update the number of leap seconds. Add
the hard time values for year 2015 and 2016.
2018-12-03 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb, libgnarl/s-taasde.adb, libgnarl/s-taenca.adb,
libgnarl/s-tarest.adb, libgnarl/s-tasini.adb,
libgnarl/s-taskin.ads, libgnarl/s-tasren.adb,
libgnarl/s-tassta.adb, libgnarl/s-tasuti.adb: Spelling fixes and
minor reformatting.
2018-12-03 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Convert_To_Positional): Use
Static_Array_Aggregate to decide whether to set
Compile_Time_Known_Aggregate on an already flat aggregate.
(Expand_Array_Aggregate): Remove test on
Compile_Time_Known_Aggregate that turns out to be dead and
simplify.
(Is_Static_Component): New predicate extracted from...
(Static_Array_Aggregate): ...here. Test neither Is_Tagged_Type
nor Is_Controlled for the type, but test whether the component
type has discriminants. Use the Is_Static_Component predicate
consistently for the positional and named cases.
2018-12-03 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Freeze_Entity): Do not freeze the partial view of
a private subtype if its base type is also private with delayed
freeze before the full type declaration of the base type has
been seen.
* sem_ch7.adb (Preserve_Full_Attributes): Add assertion on
freeze node.
2018-12-03 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Build_Record_Init_Proc): Inherit an
initialization procedure if it is present, even if it is null.
2018-12-03 Patrick Bernardi <bernardi@adacore.com>
* libgnarl/s-taskin.ads (ATC_Level_Base): Redefine to span from
-1 to Max_ATC_Nesting so that 0 represents no ATC nesting and -1
represented a completed task. To increase readability, new
constants are introduced to represent key ATC nesting levels.
Consequently, Level_No_Pending_Abort replaces
ATC_Level_Infinity. ATC_Level related definitions now
documented.
(Ada_Task_Control_Block): The default initialization of
components ATC_Nesting_Level and Pending_ATC_Level now use new
ATC_Level_Base constants. Comments improved
* libgnarl/s-taskin.adb (Initialize): Improve the initialisation
of the first element of the Entry_Calls array to facilitate
better maintenance.
* libgnarl/s-taasde.ads: Update comment.
* libgnarl/s-taasde.adb, libgnarl/s-taenca.adb,
libgnarl/s-tasren.adb, libgnarl/s-tassta.adb,
libgnarl/s-tasuti.ads, libgnarl/s-tasuti.adb: Use new
ATC_Level_Base constants.
* libgnarl/s-tarest.adb (Create_Restricted_Task): Improve the
initialisation of the first element of the task's Entry_Calls
array to facilitate better maintenance.
* libgnarl/s-tasini.ads (Locked_Abort_To_Level): Update
signature to accept ATC_Level_Base.
* libgnarl/s-tasini.adb (Locked_Abort_To_Level): Update
signature to accept ATC_Level_Base. Use new ATC_Level_Base
constants and only modify the aborting task's Entry_Calls array
if any entry call is happening.
* libgnarl/s-tposen.adb (Protected_Single_Entry_Call): Reference
the first element of the task's Entry_Calls array via 'First
attribute to facilitate better maintenance.
2018-12-03 Eric Botcazou <ebotcazou@adacore.com>
* einfo.adb (Write_Entity_Info): Don't take Scope of Standard
package.
* sem_ch4.adb (Remove_Abstract_Operations): Add missing blank
lines to -gnatdv output.
* sem_type.adb (Write_Overloads): Take Entity of entity names
only.
2018-12-03 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, exp_aggr.adb, exp_attr.adb, exp_ch3.adb,
exp_util.adb, exp_util.ads, repinfo.adb, sem_attr.adb,
sem_ch3.adb, sem_res.adb, sem_util.adb: Minor reformatting.
2018-12-03 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Complete_Private_Subtype): Enhance comment.
2018-12-03 Olivier Hainque <hainque@adacore.com>
* gcc-interface/lang.opt (fopenacc): New option for Ada.
* gcc-interface/misc.c (gnat_handle_option): Handle it.
* gcc-interface/trans.c (struct loop_info_d): Add OMP
attributes.
(Iterate_Acc_Clause_Arg, Acc_gnat_to_gnu): New functions,
helpers for OpenACC pragmas processing in Pragma_to_gnu.
(Acc_Var_to_gnu, Acc_Reduc_Var_to_gnu, Acc_Reduc_to_gnu):
Likewise.
(Acc_Size_Expr_to_gnu, Acc_Size_List_to_gnu): Likewise.
(Pragma_Acc_Data_to_gnu): Likewise.
(Pragma_to_gnu): Handle Pragma_Acc_Loop, Pragma_Acc_Data,
Pragma_Acc_Kernels and Pragma_Acc_Parallel.
(Acc_Loop_to_gnu, Regular_Loop_to_gnu): New functions. Helpers
for ...
(Loop_Statement_to_gnu): Rework to handle OpenACC loops.
2018-12-03 Olivier Hainque <hainque@adacore.com>
* gcc-interface/targtyps.c (MALLOC_OBSERVABLE_ALIGNMENT): Set to
2 * POINTER_SIZE.
2018-12-03 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Set_Slice_Subtype): The index type of a slice is
constrained.
2018-11-26 Matthias Klose <doko@ubuntu.com>
PR ada/88191
* libgnarl/s-linux__alpha.ads: Define SIGSYS.
2018-11-19 Alexandre Oliva <oliva@adacore.com>
PR ada/81878
* gcc-interface/config-lang.in (lang_requires): Set to "c c++"
when gnattools wants it.
2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/cuintp.c (UI_From_gnu): Remove code for 32-bit hosts.
2018-11-15 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_init_gcc_eh): Do not override the switch
-fnon-call-exceptions passed on the command line in -gnatp mode.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb: Change the profile of
Silly_Boolean_Array_Xor_Test, adding a formal that can be a copy
of the right opersnd. This prevents unnesting anomalies when
that operand contains uplevel references.
* exp_ch4.adb (Expand_Boolean_Operation): Use this new profile.
* exp_pakd.adb (Expand_Packed_Boolean_Operator): Ditto.
2018-11-14 Patrick Bernardi <bernardi@adacore.com>
* libgnarl/a-intnam__linux.ads: Add SIGSYS.
* libgnarl/s-linux__alpha.ads, libgnarl/s-linux__android.ads,
libgnarl/s-linux__hppa.ads, libgnarl/s-linux__mips.ads,
libgnarl/s-linux__riscv.ads, libgnarl/s-linux__sparc.ads,
libgnarl/s-linux__x32.ads: Rename SIGLTHRRES, SIGLTHRCAN and
SIGLTHRDBG to SIG32, SIG33 and SIG34 as their names are
implementation specific.
* libgnarl/s-osinte__linux.ads, libgnarl/s-linux.ads: Add
SIGSYS. Move SIG32, SIG33 and SIG34 from the unmasked list to
the reserved list.
2018-11-14 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Is_Static_Element): New predicate extracted
from...
(Check_Static_Components): ...here. Call Is_Static_Element on
each element of the component association list, if any.
(Flatten): Duplicate the expression of an others choice only if
it is static or is an aggregate which can itself be flattened.
2018-11-14 Olivier Hainque <hainque@adacore.com>
* sigtramp-vxworks-target.inc: Fix stack checking test errors in
ACATS, now that GCC can emit CFI rules referring to sp in
absence of a frame pointer.
2018-11-14 Eric Botcazou <ebotcazou@adacore.com>
* exp_aggr.adb (Check_Static_Components): Remove dead test.
(Flatten): Likewise. Move comment around.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Null_Procedure): Capture Ghost and
SPARK-related global state at the start of the routine. Set the
Ghost mode of the completed spec if any. Restore the saved
Ghost and SPARK-related global state on exit from the routine.
2018-11-14 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst
(-gnatR): Document new -gnatR4 level.
* gnat_ugn.texi: Regenerate.
* opt.ads (List_Representation_Info): Bump upper bound to 4.
* repinfo.adb: Add with clause for GNAT.HTable.
(Relevant_Entities_Size): New constant.
(Entity_Header_Num): New type.
(Entity_Hash): New function.
(Relevant_Entities): New set implemented with GNAT.HTable.
(List_Entities): Also list compiled-generated entities present
in the Relevant_Entities set. Consider that the Component_Type
of an array type is relevant.
(List_Rep_Info): Reset Relevant_Entities for each unit.
* switch-c.adb (Scan_Front_End_Switches): Add support for -gnatR4.
* switch-m.adb (Normalize_Compiler_Switches): Likewise
* usage.adb (Usage): Likewise.
2018-11-14 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Thunk): Extend handling of
renamings of the predefined equality primitive.
(Make_Secondary_DT): When calling Expand_Interface_Thunk() pass
it the primitive, instead of its Ultimate_Alias; required to
allow the called routine to identify renamings of the predefined
equality operation.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Check_Pragma_Thread_Local_Storage): New routine. A
variable with suppressed initialization has no initialization
for purposes of the pragma.
(Freeze_Object_Declaration): Remove variable
Has_Default_Initialization as it is no longer used. Use routine
Check_Pragma_Thread_Local_Storage to verify the semantics of
pragma Thread_Local_Storage.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_If_Expression): Verify that the subtypes
of all dependent expressions obey the constraints of the
expected type for the if-expression.
(Analyze_Expression): Only add qualificiation to the dependent
expressions when the context type is constrained. Small
adjustment to previous patch.
2018-11-14 Eric Botcazou <ebotcazou@adacore.com>
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Don't
register a compile-time warning or error for 'Alignment or 'Size
of an entity declared in a generic unit.
2018-11-14 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Use_One_Package): Add test for out-of-scope
homonyms.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb: (Expand_N_Object_Declaration): If the expression
is a limited aggregate its resolution is delayed until the
object declaration is expanded.
* sem_ch3.adb: (Analyze_Object_Declaration): If the expression
is a limited aggregate and the declaration has a following
address clause indicate that resolution of the aggregate (which
must be built in place) must be delayed.
2018-11-14 Bob Duff <duff@adacore.com>
* sem_attr.adb (To_Address): Simplify setting of
Is_Static_Expression. Remove second (unconditional) call to
Set_Is_Static_Expression -- surely it's not static if the
operand is not. Initialize Static on declaration. Do not try
to fold 'To_Address, even though it's static.
* exp_attr.adb (To_Address): Preserve Is_Static_Expression.
* sinfo.ads, sem_eval.ads, sem_eval.adb (Is_Static_Expression,
Is_OK_Static_Expression, Raises_Constraint_Error): Simplify
documentation. There was too much repetition and redundancy.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Use the
Actual_Subtype to preserve information about a constant
initialized with a non-static entity that is known to be valid,
when the type of the entity has a narrower range than that of
the nominal subtype of the constant.
* checks.adb (Determine_Range): If the expression is a constant
entity that is known-valid and has a defined Actual_Subtype, use
it to determine the actual bounds of the value, to enable
additional optimizations.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* back_end.adb, checks.adb, exp_ch3.adb, exp_ch4.adb,
exp_ch7.adb, exp_disp.adb, exp_unst.adb, exp_util.adb,
freeze.adb, sem_ch13.adb, sem_ch6.adb, sem_ch7.adb,
sem_prag.adb, sem_spark.adb, sem_util.adb: Minor reformatting.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Find_Aliased_Equality): New routine.
(Find_Equality): Reimplemented.
(Is_Equality): New routine.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* ghost.adb (Ghost_Entity): New routine.
(Mark_And_Set_Ghost_Assignment): Reimplemented.
* sem_ch5.adb (Analyze_Assignment): Assess whether the target of
the assignment is an ignored Ghost entity before analyzing the
left hand side.
* sem_ch8.adb (Find_Direct_Name): Update the subprogram
signature. Do not generate markers and references when they are
not desired.
(Nvis_Messages): Do not execute when errors are not desired.
(Undefined): Do not emit errors when they are not desired.
* sem_ch8.ads (Find_Direct_Name): Update the subprogram
signature and comment on usage.
* sem_util.adb (Ultimate_Prefix): New routine.
* sem_util.ads (Ultimate_Prefix): New routine.
2018-11-14 Justin Squirek <squirek@adacore.com>
* sem_ch7.adb (Uninstall_Declarations): Add conditional to avoid
uninstalling potential visibility during freezing on enumeration
literals.
2018-11-14 Jerome Lambourg <lambourg@adacore.com>
* env.c: Do not include crt_externs.h on iOS, as it does not
exist there. This is also true for the iPhone Simulator SDK.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure
to transform blocks that appear in the declarative part of a
package body into subprograms if they contain generated
subprograms (such as finalization routines). Needed to generate
the proper upward references in unnesting mode.
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Fixed_Point_Type): If the given low bound
of the type is less than the nearest model number, do not expand
the range of the type to include the model number below the
bound. Similar adjustment if the upper bound is larger than the
nearest model number.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb (Install_Primitive_Elaboration_Check): Do not
create the check when exceptions cannot be used.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Do not raise
Program_Errror when exceptions cannot be used. Analyze the
generated code with all checks suppressed.
* exp_ch7.adb (Build_Finalizer): Remove the declaration of
Exceptions_OK.
(Make_Deep_Array_Body): Remove the declaration of Exceptions_OK.
(Make_Deep_Record_Body): Remove the declaration of
Exceptions_OK.
(Process_Transients_In_Scope): Remove the declaration of
Exceptions_OK.
* exp_util.adb (Exceptions_In_Finalization_OK): Renamed to
Exceptions_OK.
* exp_util.ads (Exceptions_In_Finalization_OK): Renamed to
Exceptions_OK.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Op_Eq): Remove duplicated code and use
routine Find_Equality instead.
(Find_Equality): New routine.
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (First_From_Global_List): Do not expect
N_Selected_Component in the Global contract; simplify assertion
with Nam_In.
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
* sem_ch12.adb (Instantiate_Object): Set
Corresponding_Generic_Association on generic actuals with
default expression.
* sinfo.ads (Corresponding_Generic_Association): Update comment.
2018-11-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Concatenate): Use the proper routine to
set the need for debug info.
* exp_dbug.adb (Build_Subprogram_Instance_Renamings): Use the
proper routine to set the need for debug info.
* exp_prag.adb (Expand_Pragma_Initial_Condition): Use the proper
routine to set the need for debug info.
* exp_util.adb (Build_DIC_Procedure_Declaration): Use the proper
routine to set the need for debug info.
(Build_Invariant_Procedure_Declaration): Use the proper routine
to set the need for debug info.
* ghost.adb (Record_Ignored_Ghost_Node): Add statements as a
whole class to the list of top level ignored Ghost nodes.
* sem_util.adb (Set_Debug_Info_Needed): Do not generate debug
info for an ignored Ghost entity.
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
* bindgen.adb, exp_cg.adb, repinfo.adb, sprint.adb: Minor reuse
Cancel_Special_Output where possible.
2018-11-14 Piotr Trojanek <trojanek@adacore.com>
* exp_dbug.ads, sem_util.ads: Minor fixes in comments.
2018-11-14 Arnaud Charlet <charlet@adacore.com>
* adabkend.adb (Scan_Back_End_Switches): Handle -gx switches
explicitly.
2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
for the runtime on platforms where System.Machine_Overflow is true.
2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
* fe.h (Suppress_Checks): Declare.
* gcc-interface/misc.c (gnat_init_gcc_eh): Set -fnon-call-exceptions
only if checks are not suppressed and -faggressive-loop-optimizations
only if they are.
* gcc-interface/trans.c (struct loop_info_d): Remove has_checks and
warned_aggressive_loop_optimizations fields.
(gigi): Do not clear warn_aggressive_loop_optimizations here.
(Raise_Error_to_gnu): Do not set has_checks.
(gnat_to_gnu) <N_Indexed_Component>: Remove support for aggressive
loop optimizations.
2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Remove obsolete kludge.
* gcc-interface/utils.c (make_packable_type): Set TYPE_PACKED on the
new type but do not take into account the setting on the old type for
the new fields. Rename a local variable.
(finish_record_type): Clear DECL_BIT_FIELD_TYPE on a variant part at
offset 0, if any.
(create_field_decl): Tweak comment.
2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (unchecked_convert): Use local variables for
the biased and reverse SSO attributes of both types.
Further extend the processing of integral types in the presence of
reverse SSO to all scalar types.
2018-10-22 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Inspection_Point>: Use
a simple memory constraint in all cases.
* gcc-interface/lang-specs.h: Bump copyright year.
2018-10-17 David Malcolm <dmalcolm@redhat.com>
* gcc-interface/Make-lang.in (selftest-ada): New.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Is_Null_Statement_List): New predicate.
(Build_Array_Init_Proc): Use it to find out whether the
initialization procedure Is_Null_Init_Proc; if so, set
Warnings_Off on the parameter.
(Build_Init_Procedure): Likewise.
(Init_Formals): Use an in/out first parameter only for
unconstrained arrays and for records either containing or built
for proteced types or task types; use an out parameter in all
the other cases.
* fe.h (Is_Init_Proc): Declare.
* gcc-interface/decl.c (type_requires_init_of_formal): Do not
return true for a discriminant in an unchecked union.
(gnat_to_gnu_param): Do not create a PARM_DECL for the Out
parameter of an initialization procedure.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If
this is not a definition, retrieve the expression in all cases
even if we are just annotating types.
* gcc-interface/trans.c (gnat_to_gnu): Also translate Size
attribute for constrained types in this mode.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* adaint.c (__gnat_get_executable_suffix_ptr): Add new line.
(__gnat_locate_exec): Check that HOST_EXECUTABLE_SUFFIX is not
empty before doing a string search for it.
* socket.c (ATTRIBUTE_UNUSED): Define.
(__gnat_disable_sigpipe): Add ATTRIBUTE_UNUSED on parameter.
* terminals.c (ATTRIBUTE_UNUSED): Move around.
(__gnat_setup_child_communication): Add ATTRIBUTE_UNUSED on
parameter.
(__gnat_send_header): Add ATTRIBUTE_UNUSED on parameters.
2018-10-09 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Rewrite
pragmas as null statements in GNATprove mode.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Add_Call_By_Copy_Code): Initialize the temporary
made for an Out parameter if the formal type has discriminants.
2018-10-09 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb (Check_Declaration): fix bug related to non
access object permissions.
2018-10-09 Doug Rupp <rupp@adacore.com>
* libgnat/a-ncelfu.ads: Fix name in header to match package.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Set
Warnings_Off on the B out parameter.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Small comment fix.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch7.adb (Has_Referencer): Add comment for the
N_Freeze_Entity case. Do not rely on
Has_Referencer_Of_Non_Subprograms to clear the Is_Public flag on
subprogram entities.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (In_Synchronized_Call): Handle properly private
types whose full views are synchronized types, in order to
recognize generated subprograms whose bodies must be considered
reachable even if no direct calls to them are visible in the
source.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Modular_Op): When expanding an operation
on nonbinary modular types, convert the opersnds to an integer
type that is large enough to hold the modulus of the type, which
may be larger than Integer'Last.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): When an uplevel reference
is to an unconstrained formal, the 'Access reference that is
created to initialize the corresponding component of the
activation record must be wrapped in an unchecked conversion to
the generated type of the component. Otherwise, spurious suvtype
conformance errors will be generated when the code is within an
instantiation and the type of the formal is a formal type of the
enclosing generic. Note that during unnesting there is no simple
way to determine that the code appears within an instance
because ther is no scope stack.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (type_requires_init_of_formal): New
predicate.
(gnat_to_gnu_param): Use it to determine whether a PARM_DECL
must be created for an Out parameter passed by copy.
2018-10-09 Arnaud Charlet <charlet@adacore.com>
* libgnat/a-coboho.ads (Storage_Element): Fix a typo.
2018-10-09 Claire Dross <dross@adacore.com>
* libgnat/a-cfinve.ads: Remove default value for
Max_Size_In_Storage_Elements as it was not supported in SPARK.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Add_Call_By_Copy_Node,
Add_Simple_Call_By_Copy_Node, Expand_Call_Helper): Reset
Is_True_Constant on entities used as Out or In_Out parameters in
calls.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Do not load System to obtain
the Address entity unless an activation record is being built.
Removes useless with_clauses for System when nested subprograms
do not have uplevel references, and therefore do not need
activation records.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
the conformance check on an aspect expression that includes a
call to an instance of Unchecked_Conversion, or more generally a
call to an intrinsic operation.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb: Remove with/use clause for Stand.
(List_Mechanisms): List the mechanism of functions only.
2018-10-09 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Correct spelling of
--eol switch. Document the language-version switches. Update
description for --no-exception.
2018-10-09 Vasiliy Fofanov <fofanov@adacore.com>
* libgnat/s-os_lib.ads (Normalize_Pathname): Fix incorrect
comment.
2018-10-09 Arnaud Charlet <charlet@adacore.com>
* vxlink.adb: Remove pragma Annotate, no longer needed.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Type_Conversion_Checks): Use GNATprove_Mode
rather than SPARK_mode in order to preserve the Do_Range_Check
flag for verification purposes.
2018-10-09 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): If it is not possible
to build in place an aggregate with component associations, set
the Warnings_Off flag on the generated temporary, to prevent
spurious warnings from the backend when compiling with the
-Wuninitialized gcc flag.
2018-09-30 Alexandre Oliva <oliva@adacore.com>
* gcc-interface/lang-specs.h (default_compilers): When given
fcompare-debug-second, adjust auxbase like cc1, and pass
gnatd_A.
* gcc-interface/misc.c (flag_compare_debug): Remove variable.
(gnat_post_options): Do not set it.
* lib-writ.adb (flag_compare_debug): Remove import.
(Write_ALI): Do not test it.
2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (is_cplusplus_method): Do not require C++
convention on Interfaces.
* gcc-interface/trans.c (Subprogram_Body_to_gnu): Try to create a
bona-fide thunk and hand it over to the middle-end.
(get_controlling_type): New function.
(use_alias_for_thunk_p): Likewise.
(thunk_labelno): New static variable.
(make_covariant_thunk): New function.
(maybe_make_gnu_thunk): Likewise.
* gcc-interface/utils.c (finish_subprog_decl): Set DECL_CONTEXT of the
result DECL here instead of...
(end_subprog_body): ...here.
2018-09-27 Martin Sebor <msebor@redhat.com>
* gcc-interface/utils.c (make_packable_type): Introduce a temporary
to avoid -Wnonnull.
(unchecked_convert): Same.
2018-09-26 Elisa Barboni <barboni@adacore.com>
* sem_prag.adb (Check_Refined_Global_Item): Improve error
message.
2018-09-26 Thomas Quinot <quinot@adacore.com>
* sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a
representation item that is an N_Aspect_Definition, retrieve the
entity it applies to using the Entity attribute.
2018-09-26 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Analyze_Subprogram_Renaming): Add extra condition
to check for unmarked subprogram references coming from
renamings.
2018-09-26 Arnaud Charlet <charlet@adacore.com>
* back_end.adb (Scan_Compiler_Arguments): Store -G xxx switches.
2018-09-26 Yannick Moy <moy@adacore.com>
* errout.ads: Update comment for insertion character '?'.
* inline.adb: Use simple insertion character '?' for GNATprove
info messages.
* sem_res.adb (Resolve_Call): Issue an info message on inlining
in GNATprove mode.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Type_Conversion_Checks): Do not generate a
range check on the expression of the conversion if it involves a
fixed-point type, as such conversions are handled specially
during expansion.
* exp_ch4.adb (Expand_N_Type_Conversion): In a conversion from
Fixed to Integer, use the base type of the expression to ensure
that the caller will generate the proper constraint check when
needed.
2018-09-26 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb (Check_Loop_Statement): Fix a bug related to
loop exit environment.
(Check_Statement): fixing a bug when comparing the source and
target in an assignment statement.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Instantiate_Package_Body): Capture and restore
the full compilation context.
(Instantiate_Subprogram_Body): Capture and restore the full
compilation context.
2018-09-26 Yannick Moy <moy@adacore.com>
* debug.adb: Add use for -gnatd_f switch.
* inline.adb (Cannot_Inline): Only issue info message for
failure to inline in GNATprove mode when switch -gnatd_f is
used.
2018-09-26 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): No displacement of
the pointer needed when the type of the operand is an interface
type that maches the target type and we are compiling under
configurable runtime. Adding also documentation explaining why
this cannot be done when compiling with the full runtime.
* exp_intr.adb: Update comment.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch5.adb (Wrap_Loop_Statement): Annotate as No_Return.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Make_Predicate_Call): Use OK_Convert_To when
applying a predicate check to prevent spurious errors when
private ancestors are involved.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): Ensure that the use of the
secondary stack does not clash with restriction
No_Secondary_Stack.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Ensure that
the use of the secondary stack does not clash with restriction
No_Secondary_Stack.
* sem_ch5.adb (Analyze_Loop_Statement): Wrap the loop in a block
prior to analysis in order to either provide a local scope for
an iterator, or ensure that the secondary stack is properly
managed.
(Check_Call): Account for the case where the tree may be
unanalyzed or contain prior errors.
(Has_Call_Using_Secondary_Stack): Renamed to Has_Sec_Stack_Call.
Update all uses of the subprogram.
(Prepare_Loop_Statement): New routine.
2018-09-26 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Actuals): If the formal is a class-wide
type conversion then do not skip resolving and expanding the
conversion; required to displace the pointer to the object and
reference the dispatch table associated with the target
interface type.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/g-dynhta.adb (Prepend_Or_Replace): Update the number
of key-value pairs in the hash table only when adding a brand
new pair.
2018-09-26 Sergey Rybin <rybin@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Add note about
processing of aggregate projects in gnatmetric and gnatstub.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb, exp_unst.adb, exp_util.adb, gnat1drv.adb,
opt.ads, par-prag.adb, sem_ch3.adb, sem_ch5.adb, sem_prag.adb,
sinfo.ads, snames.ads-tmpl: Minor reformatting.
2018-09-26 Hristian Kirtchev <kirtchev@adacore.com>
* gcc-interface/Make-lang.in: Add unit GNAT.Sets to the list of
front end sources.
* impunit.adb: Add unit GNAT.Sets to the list of predefined
units.
* Makefile.rtl: Add unit GNAT.Sets to the list of non-tasking
units.
* libgnat/g-sets.adb: New unit.
* libgnat/g-sets.ads: New unit.
* libgnat/g-dynhta.adb (Minimum_Size): Decrease to 8 in order to
allow for small sets. Update all occurrences of Table_Locked to
Iterated.
(Ensure_Unlocked): Query the number of iterators.
(Find_Node): Use the supplied equality.
(Is_Empty): New routine.
(Lock): Update the number of iterators.
(Prepend_Or_Replace): Use the supplied equality.
(Size): Update the return type.
(Unlock): Update the number of iterators.
* libgnat/g-dynhta.ads: Update all occurrences of Table_Locked
to Iterated. Rename formal subprogram Equivalent_Keys to "=".
(Bucket_Range_Type, Pair_Count_Type): Remove types.
(Not_Created, Table_Locked, Iterator_Exhausted): Remove
exceptions.
(Hash_Table): Update to store the number of iterators rather
than locks.
(Is_Empty): New routine.
(Size): Update the return type.
* libgnat/g-lists.adb: Update all occurrences of List_Locked to
Iterated.
(Ensure_Unlocked): Query the number of iterators.
(Length): Remove.
(Lock): Update the number of iterators.
(Size): New routine.
(Unlock): Update the number of iterators.
* libgnat/g-lists.ads: Update all occurrences of List_Locked to
Iterated.
(Element_Count_Type): Remove type.
(Not_Created, Table_Locked, Iterator_Exhausted): Remove
exceptions.
(Linked_List): Update type to store the number of iterators
rather than locks.
(Length): Remove.
(Size): New routine.
* libgnat/gnat.ads (Bucket_Range_Type): New type.
(Iterated, Iterator_Exhausted, and Not_Created): New exceptions.
2018-09-26 Javier Miranda <miranda@adacore.com>
* checks.adb (Install_Null_Excluding_Check): Do not add
null-excluding checks when the tree may not be fully decorated.
This patch cascade errors.
2018-09-26 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Remove test for
Comes_From_Source, which prevented implicit conversions from
being applied to anonymous access-to-subprogram formals in
constant declartions that arise from instance associations for
generic formal objects. Add RM and AARM references to comment.
2018-09-26 Olivier Hainque <hainque@adacore.com>
* opt.ads (OpenAcc_Enabled): New flag. False by default. True
when OpenACC pragmas are requested to be honored, when -fopenacc
is found on the command line.
* back_end.adb (Scan_Compiler_Arguments): Set OpenACC_Enabled if
-fopenacc is seen on the command line.
* sinfo.adb, sinfo.ads (Is_OpenAcc_Environment): New
flag/predicate on Loop statements which embed an Acc_Kernels,
Acc_Parallel or Acc_Data pragma.
(Is_OpenAcc_Loop): New flag/predicate on Loop statements which
embed an Acc_Loop pragma.
(Set_Is_OpenAcc_Environment, Set_Is_OpenAcc_Loop): Setters for
the new flags.
* par-prag.adb (Prag): Handle Acc_Data, Acc_Loop, Acc_Parallel
and Acc_Kernels pragmas. Nothing to do here, all handled by
sem_prag.
* sem_prag.adb (Acc_First, Acc_Next,
Validate_Acc_Condition_Clause, Validate_Acc_Data_Clause,
Validate_Acc_Int_Expr_Clause, Validate_Acc_Int_Expr_List_Clause,
Validate_Acc_Loop_Collapse, Validate_Acc_Loop_Gang,
Validate_Acc_Loop_Vector, Validate_Acc_Loop_Worker,
Validate_Acc_Name_Reduction, Validate_Acc_Size_Expressions): New
helper for Analyze_Pragma, to handle OpenACC pragmas.
(Analyze_Pragma): Handle Acc_Data, Acc_Loop, Acc_Parallel and
Acc_Kernels pragmas.
* sem_ch5.adb (Disable_Constant): Unset Is_True_Constant on
variable entity, action for ...
(Disable_Constants): Helper for Analyze_Loop_Statement, to ...
(Analyze_Loop_Statement): Disable True_Constant on variables
referenced within an OpenACC environment.
* snames.ads-tmpl: Declare Name_Ids for the OpenACC directives
and clauses we can handle. Remove an exraneous whitespace before
columns, preventing line length overflow in the generated spec
with Ids now reaching beyond 999.
* doc/gnat_rm/implementation_defined_pragmas.rst: Document
pragma Acc_Parallel, Acc_Loop, Acc_Kernels and Acc_Data.
* gnat_rm.texi: Regenerate.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Is_Onown_Limited): A derived type whose parent P
is a derived limited record is not itself limited if P is a
derived limited interface.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch7.adb (Has_Referencer): Remove Top_Level parameter and
add In_Nested_Instance and
Has_Outer_Referencer_Of_Non_Subprograms parameters. Rename
Has_Non_Subprograms_Referencer variable into
Has_Referencer_Of_Non_Subprograms and initialize it with the new
third parameter. Adjust recursive calls and to the renaming.
Replace test on Top_Level with test on In_Nested_Instance to
decide whether to clear the Is_Public flag on entities.
(Hide_Public_Entities): Adjust call to Has_Referencer.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* exp_disp.adb (Expand_Interface_Conversion): Use Present test.
(Expand_Interface_Thunk): Propagate debug info setting from
target.
* exp_util.ads (Find_Interface_Tag): Adjust comment.
* exp_util.adb (Find_Interface_Tag): Remove assertions of
success.
* sem_util.adb (Is_Variable_Size_Record): Only look at
components and robustify the implementation.
* fe.h (Find_Interface_Tag): Declare.
(Is_Variable_Size_Record): Likewise.
2018-09-26 Thomas Quinot <quinot@adacore.com>
* exp_util.adb (Make_CW_Equivalent_Type): Propagate bit order
and scalar storage order from root type to classwide equivalent
type, to prevent rejection of the equivalent type by the
freezing circuitry.
2018-09-26 Justin Squirek <squirek@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Add conditional
to freeze called functions within iterator specifications during
full analysis.
(Preanalyze_Range): Minor typo fix.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): If the return type has
a dynamic_predicate, apply a Predicate_Check to the expression,
given that it is implicitly converted to the return type.
Exclude case expressions from the check, because in this context
the expression is expanded into individual return statements.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: In
-gnatct mode, process the discriminants only for a definition.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Record_Layout): Be prepared for JSON output.
(List_Record_Info): Use the flat representation for record
subtypes in the JSON format.
2018-09-26 Justin Squirek <squirek@adacore.com>
* lib-writ.adb, lib-writ.ads (Write_With_Lines): Add
documentation and an extra conditional check for RCI units so
that generated ali files will list the spec only instead of a
body when a body is not found.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (error_gnat_node): Delete.
* gcc-interface/trans.c (error_gnat_node): Likewise.
(gigi): Replace it with Current_Error_Node.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.c (rest_of_subprog_body_compilation):
Likewise.
* gcc-interface/misc.c (internal_error_function): Do not set it.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Adjust
code retrieving the address when a clause has already been
processed.
* gcc-interface/trans.c (gnat_to_gnu)
<N_Attribute_Definition_Clause>: For an object with a Freeze
node, build a meaningful expression.
2018-09-26 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): -gnatd_A sets
Opt.Disable_ALI_File.
* debug.adb: Update debug flags documentation.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* contracts.adb (Analyze_Entry_Or_Subprogram_Contract): The
analysis of preconditions specified by pragmas (rather than
aspects) is not delayed, and therefore expressions functions
that are completions do not need special handling during
expansion.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb: Fix handling of up level references for entries.
2018-09-26 Ed Schonberg <schonberg@adacore.com>
* contracts.adb (Expand_Subprogram_Contract,
Process_Preconditions_For): Apply Freeze_Expr_Types to the
expression for a precondition of an expression function that is
a completion, when the completion appears in the private part
and the declaration it completes is in the visible part of the
same package.
* freeze.adb (Freeze_Expr_Types): Do not establish the scope of
the operation if it is already installed, as will be the case
when called to analyze the contract oc the subprogram (which
happens when generating code inside the subprogram body).
2018-09-26 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb (Check_Param_In, Setup_Parameter_Or_Global):
Change the operation associated to assigning to an IN parameter.
In SPARK, IN access-to-variable is an observe operation for a
function, and borrow operation for a procedure.
2018-09-26 Arnaud Charlet <charlet@adacore.com>
* vxlink.adb: Minor reformatting.
2018-09-26 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb, layout.adb, sem_attr.adb, sem_res.adb: Fix
miscellaneous typos.
2018-09-26 Jerome Lambourg <lambourg@adacore.com>
* vxlink.adb: Kill a CodePeer warning.
2018-09-24 Eric Botcazou <ebotcazou@adacore.com>
PR ada/87396
* fe.h (Get_Attribute_Definition_Clause): Use 'unsigned char' instead
of 'char' as the type of the second parameter.
2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
* Makefile.rtl (arm% linux-gnueabi%): Always set EH_MECHANISM to -arm.
2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
PR ada/81103
* terminals.c: Do not include termio.h.
2018-08-27 Martin Liska <mliska@suse.cz>
* gcc-interface/decl.c (update_profile): Use new function
fndecl_built_in_p and remove check for FUNCTION_DECL if
possible.
* gcc-interface/gigi.h (call_is_atomic_load): Likewise.
* gcc-interface/utils.c (gnat_pushdecl): Likewise.
2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
* exp_unst.ads: Fix typo 'exapnded' to 'expanded'.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, contracts.adb, exp_aggr.adb, exp_attr.adb,
exp_ch6.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb,
exp_util.adb, freeze.adb, gnatlink.adb, layout.adb,
lib-writ.adb, lib-xref-spark_specific.adb, sem_ch13.adb,
sem_ch3.adb, sem_ch6.adb, sem_res.adb, sem_util.adb, sinfo.ads,
sprint.adb: Minor reformatting.
2018-08-21 Jerome Lambourg <lambourg@adacore.com>
* vxlink-bind.adb, vxlink-bind.ads, vxlink-link.adb,
vxlink-link.ads, vxlink-main.adb, vxlink.adb, vxlink.ads: Add a
new tool vxlink to handle VxWorks constructors in DKMs.
* gcc-interface/Makefile.in: add rules to build vxlink
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper, Mask_Type):
Refine the handling of freezing types for expression functions
that are not completions, when analyzing the generated body for
the function: the body is inserted at the end of the enclosing
declarative part, and its analysis may freeze types declared in
the same scope that have not been frozen yet.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Remove Freeze_Expr_Types.
* freeze.ads, freeze.adb (Freeze_Expr_Types): Moved from
sem_ch6.adb, and extended to handle other expressions that may
contain unfrozen types that must be frozen in their proper
scopes.
* contracts.adb (Analyze_Entry_Or_Subprogram_Contract): If the
contract is for the generated body of an expression function
that is a completion, traverse the expressions for pre- and
postconditions to freeze all types before adding the contract
code within the subprogram body.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb: Remove the with and use clause for unit Ghost.
(Analyze_With_Clause): Do not mark a with clause which mentions
an ignored Ghost code for elimination.
2018-08-21 Javier Miranda <miranda@adacore.com>
* lib-writ.adb (Write_Unit_Information): Handle pragmas removed
by the expander.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Synchronized_Overriding): The conformance
between an overriding protected operation and the overridden
abstract progenitor operation requires subtype conformance;
requiring equality of return types in the case of a function is
too restrictive and leads to spurious errors when the return
type is a generic actual.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Expand_N_Timed_Entry_Call,
Expand_Conditional_Entry_Call): Use Reset_Scopes_Of to set
properly the scope of all entities created in blocks generated
by the expansion of these constructs.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Build_Predicate_Functioss): Apply
Reset_Quantified_Variables_Scope after predicate function has
been analyzed, so that the scope can be reset on the generated
loop statements that have replaced the quantified expressions.
2018-08-21 Bob Duff <duff@adacore.com>
* einfo.ads, einfo.adb (Private_View, Shadow_Entities): Remove
obsolete code.
2018-08-21 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb (Check_Call_Statement): Check global and formal
parameter permissions at call sites.
(Check_Callable_Body): Assume permissions on globals and
parameters depending on their modes then analyse the body
operations.
(Check_Declaration): Consider both deep (including elementary
access) object declarations and normal variables. First check
whether the deep object is of Ownership Aspec True or not, then,
depending on its initialization, assign the appropriate state.
Check related to non access type variables deal with
initialization value permissions.
(Check_Expression): Check nodes used in the expression being
analyzed.
(Check_Globals): Call by Check_Call_Statement to perform the
check on globals.
(Check_List): Call Check_Node on each element of the list.
(Check_Loop_Statement): Check the Iteration_Scheme and loop
statements.
(Check_Node): Main traversal procedure to check safe pointer usage.
(Check_Package_Body): Check subprogram's body.
(Check_Param_In): Take a formal and an actual parameter and
Check the permission of every in-mode parameter.
(Check_Param_Out): Take a formal and an actual parameter and
check the state of out-mode and in out-mode parameters.
(Check_Statement): Check statements other than procedure call.
(Get_Perm, Get_Perm_Or_Tree, Get_Perm_Tree): Find out the state
related to the given name.
(Is_Deep): Return True if an object is of access type or has
subfields of access type.
(Perm_Error, Perm_Error_Subprogram_End): Add an error message
whenever the found state on the given name is different from the
one expected (in the statement being analyzed).
(Process_Path): Given an operation and a current state, call
Perm_Error if there is any mismatch.
(Return_Declarations, Return_Globals, Return_The_Global): Check
the state of a given name at the end of the subprogram. These
procedures may change depending on how we shall finally deal
with globals and the rhs state in a move operation.
(Set_Perm_Extensions, Set_Perm_Prefixes_Borrow,
Set_Perm_Prefixes, Setup_Globals, Setup_Parameter_Or_Global,
Setup_Parameters): Set up the new states to the given node and
up and down the tree after an operation.
(Has_Ownership_Aspect_True): This function may disappear later
when the Ownership Aspect will be implemented in the FE.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Call): Resolve correctly a parameterless
call that returns an access type whose designated type is the
component type of an array, when the function has no defaulted
parameters.
2018-08-21 Yannick Moy <moy@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Document entries of the target parametrization file.
* gnat_ugn.texi: Regenerate.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb: Set scope of elaboration flag for 'Access.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sprint.adb: Add guard on printing aspects.
2018-08-21 Javier Miranda <miranda@adacore.com>
* exp_cg.adb (Generate_CG_Output): Handle calls removed by the
expander.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* layout.adb: Do not set size of access subprogram if unnesting.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* freeze.adb: Remove warnings for access to subprograms when
unnesting is active.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): If the component type
is limited, the array must be constructed in place, so set flag
In_Place_Assign_OK_For_Declaration accordingly. This prevents
improper copying of an array of tasks during initialization.
2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Always suppress an
unchecked conversion around the actual for an In parameter
passed by copy.
2018-08-21 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a
selected component inherited in a record extension and subject
to a representation clause, retrieve the position and size from
the original record component.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_util.adb (New_External_Entity): Type of
Suffix_Index must be Int, not Nat, so that a negative value can
be used to generate a unique name for an external object, as
specified in Tbuild.New_External_Name.
(Scope_Within): Handle private type whose completion is a
synchronized type (For unnesting).
* itypes.ads, itypes.adb (Create_Itype): Ditto
* sem_ch3.adb (Constrain_Corresponding_Record): Generate a
unique name for the created subtype, because there may be
several discriminated tasks present in the same scope, and each
needs its distinct corresponding record subtype.
2018-08-21 Yannick Moy <moy@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Update
documentation of dimensionality analysis.
* gnat_ugn.texi: Regenerate.
* Makefile.rtl, impunit.adb: Consider the new units.
* libgnat/s-dfmkio.ads, libgnat/s-dfmopr.ads,
libgnat/s-diflmk.ads: New units based on Float.
* libgnat/s-dilomk.ads, libgnat/s-dlmkio.ads,
libgnat/s-dlmopr.ads: New units based on Long_Float.
* libgnat/s-dmotpr.ads: Rename to libgnat/s-dgmgop.ads and turn
into an instance of
System.Dim.Generic_Mks.Generic_Other_Prefixes.
* libgnat/s-dimmks.ads: Rename to libgnat/s-digemk.ads and turn
into an instance of System.Dim.Generic_Mks.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
* impunit.adb: Add g-lists to the set of non-implementation
units.
* libgnat/g-lists.adb, libgnat/g-lists.ads: New unit.
* Makefile.rtl: Add g-lists to the set of non-tasking units.
* gcc-interface/Make-lang.in: Add g-lists to the set of files
used by gnat1.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* exp_ch9.adb (Reset_Scopes): Do not recurse into type
declarations when resetting the scope of entities declared the
procedures generated for entry bodies and accept alternatives.
Use the entity of the procedure declaration, not its body, as
the new scope.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Elaboration_Entity): Include entries and entry
families in the set of legal entities.
(Elaboration_Entity_Required): Include entries and entry
families in the set of legal entities.
(Set_Elaboration_Entity): Include entries and entry families in
the set of legal entities.
(Set_Elaboration_Entity_Required): Include entries and entry
families in the set of legal entities.
(Write_Field13_Name): Update the output of attribute
Elaboration_Entity.
* einfo.ads: Attributes Elaboration_Entity and
Elaboration_Entity_Required now apply to entries and entry
families.
2018-08-21 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb: Mark some CodePeer message as Intentional.
2018-08-21 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Call): Force the freezing of an
expression function that is called to provide a default value
for a defaulted discriminant in an object initialization.
2018-08-21 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/g-dynhta.adb, libgnat/g-dynhta.ads: New package
Dynamic_HTable.
2018-08-21 Javier Miranda <miranda@adacore.com>
* checks.ads (Determine_Range): Adding documentation.
* checks.adb (Determine_Range): Don't deal with enumerated types
with non-standard representation.
(Convert_And_Check_Range): For conversion of enumeration types
with non standard representation to an integer type perform a
direct conversion to the target integer type.
2018-08-21 Piotr Trojanek <trojanek@adacore.com>
* lib-xref.ads, lib-xref-spark_specific.adb
(Enclosing_Subprogram_Or_Library_Package): Now roughtly works
for pragmas that come from aspect specifications.
2018-08-21 Pierre-Marie de Rodat <derodat@adacore.com>
* sa_messages.ads, sa_messages.adb: New source files.
2018-08-03 Pierre-Marie de Rodat <derodat@adacore.com>
Reverts
2018-07-06 Jim Wilson <jimw@sifive.com>
* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
* gcc-interface/Makefile.in (xoscons): Likewise.
2018-07-31 Alexandre Oliva <oliva@adacore.com>
Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c: Include debug.h.
(file_map): New static variable.
(gigi): Set it. Create decl_to_instance_map when needed.
(Subprogram_Body_to_gnu): Pass gnu_subprog_decl to...
(Sloc_to_locus): ... this. Add decl parm, map it to instance.
* gcc-interface/gigi.h (Sloc_to_locus): Adjust declaration.
2018-07-31 Arnaud Charlet <charlet@adacore.com>
* clean.adb, gnatchop.adb, gnatfind.adb, gnatls.adb,
gnatmake.ads, gnatxref.adb, make.adb, make.ads, make_util.ads,
sfn_scan.adb, vxaddr2line.adb, xeinfo.adb, xoscons.adb,
xr_tabls.adb, xref_lib.adb: Address CodePeer messages.
2018-07-31 Arnaud Charlet <charlet@adacore.com>
* gnatlink.adb: Fix potential Constraint_Error if
Library_Version is too long.
2018-07-31 Arnaud Charlet <charlet@adacore.com>
* sem_elab.adb: Remove duplicate condition detected by CodePeer.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Subp_Index): In the case of a protected
operation, the relevant entry is the generated
protected_subprogram_body into which the original body is
rewritten. Assorted cleanup and optimizations.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* exp_attr.adb (Expand_Attribute, case Fixed_Value): Set the
base type of the result to ensure that proper overflow and range
checks are generated. If the target is a fixed-point tyoe,
generate the required overflow and range checks explicitly,
rather than relying on Apply_Type_Conversion_Checks, which might
simply set the Do_Range_Check flag and rely on the backend to
add the check.
2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Resolve_Call): Establish a transient scope to
manage the secondary stack when the designated type of an
access-to-subprogram requires it.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): To find local
subprograms in the elaboration code for a package body, recurse
through nested statement sequences because a compiler-generated
procedure may appear within a condition statement.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Protected_Subprogram_Call): Handle
properly a protected call that includes a default parameter that
is a call to a protected function of the same type.
2018-07-31 Justin Squirek <squirek@adacore.com>
* lib-writ.adb (Write_With_Lines): Modfiy the generation of
dependencies within ali files so that source unit bodies are
properly listed even if said bodies are missing. Perform legacy
behavior in GNATprove mode.
* lib-writ.ads: Modify documentation to reflect current behavior.
2018-07-31 Eric Botcazou <ebotcazou@adacore.com>
* libgnarl/s-osinte__solaris.ads (upad64_t): New private type.
(mutex_t): Use it for 'lock' and 'data' components.
(cond_t): Likewise for 'data' and use single 'flags' component.
2018-07-31 Justin Squirek <squirek@adacore.com>
* exp_ch5.adb (Make_Field_Assign): Force temporarily generated
objects for assignment of overlaid user objects to be renamings
instead of constant declarations.
2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb (Analyze_Pragmas): New routine.
(Build_Private_Protected_Declaration): Code clean up. Relocate
relevant aspects and pragmas from the stand-alone body to the
newly created spec. Explicitly analyze any pragmas that have
been either relocated or produced by the analysis of the
aspects.
(Move_Pragmas): New routine.
* sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the
case where a pragma applies to the internally created spec for a
stand-along subprogram body declared in a protected body.
2018-07-31 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace
calls to Current_Scope in three assertions with calls to
Current_Subprogram.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* sem_eval.adb (Check_Non_Static_Context): Do not warn on an
integer literal greater than the upper bound of
Universal_Integer'Last when expansion is disabled, to avoid a
spurious warning over ranges involving 64-bit modular types.
2018-07-31 Arnaud Charlet <charlet@adacore.com>
* einfo.adb (Write_Entity_Flags): Also print
Is_Activation_Record flag.
2018-07-31 Piotr Trojanek <trojanek@adacore.com>
* exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
with a wrapper routine.
2018-07-31 Piotr Trojanek <trojanek@adacore.com>
* ali.adb (Known_ALI_Lines): Remove 'F' as a prefix for lines
related to the FORMAL analysis done by GNATprove.
2018-07-31 Javier Miranda <miranda@adacore.com>
* sem.ads (Inside_Preanalysis_Without_Freezing): New global
counter.
* sem.adb (Semantics): This subprogram has now the
responsibility of resetting the counter before analyzing a unit,
and restoring its previous value before returning.
* freeze.adb (Freeze_Entity): Do not freeze if we are
preanalyzing without freezing.
* sem_res.adb (Preanalyze_And_Resolve): Set & restore
In_Preanalysis_Without_Freezing.
2018-07-31 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Traverse_Homonyms): Consider generic actuals that
may rename a matching class-wide operation only if the renaming
declaration for that actual is in an enclosing scope (i.e.
within the corrresponding instance).
2018-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, contracts.adb, exp_aggr.adb, exp_ch5.adb,
exp_disp.adb, make.adb, sem_ch4.adb, sem_eval.adb, sem_res.adb,
usage.adb: Minor reformatting.
2018-07-31 Bob Duff <duff@adacore.com>
* sem_res.adb (Resolve_Allocator): Do not complain about the
implicit allocator that occurs in the expansion of a return
statement for a build-in-place function.
2018-07-20 Martin Sebor <msebor@redhat.com>
PR middle-end/82063
* gcc-interface/misc.c (gnat_handle_option): Change function argument
to HOST_WIDE_INT.
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (choices_to_gnu): Rename parameters. Deal with
an operand of Character type. Factor out range generation to the end.
Check that the bounds are literals and convert them to the type of the
operand before building the ranges.
* gcc-interface/utils.c (make_dummy_type): Minor tweak.
(make_packable_type): Propagate TYPE_DEBUG_TYPE.
(maybe_pad_type): Likewise.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Object_Operation): Handle properly a prefixed call
in an instance, when the generic parameters include an interface type
and a abstract operation of that type, and the actuals in the instance
include an interface type and a corresponding abstract operation of it,
with a different name than the corresponding generic subprogram
parameter.
2018-07-17 Arnaud Charlet <charlet@adacore.com>
* sem_eval.adb (Rewrite_In_Raise_CE): Keep the original reason in more
cases.
2018-07-17 Arnaud Charlet <charlet@adacore.com>
* checks.adb (Apply_Division_Check): Add provision for floating-point
checks.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Component_OK_For_Backend): If an array component of the
enclosing record has a bound that is out of range (and that has been
rewritten as a raise statement) the aggregate is not OK for any back
end, and should be expanded into individual assignments.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* sem_util.ads (Denotes_Same_Object): Likewise.
* sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references.
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
* exp_disp.adb (Make_Tags): When the type has user-defined primitives,
build the access type that is later used by Build_Get_Prim_Op_Address
as pointing to a subtype of Ada.Tags.Address_Array.
2018-07-17 Patrick Bernardi <bernardi@adacore.com>
* libgnat/s-memory__mingw.adb: Remove.
* Makefile.rtl: Remove s-memory.adb target pair from the Cygwin/Mingw32
section.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* frontend.adb (Frontend): The removal of ignored Ghost code must be
the last semantic operation performed on the tree.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* frontend.adb (Frontend): Update the call to Register_Config_Switches.
* inline.ads: Add new component Config_Switches to record
Pending_Body_Info which captures the configuration state of the pending
body. Remove components Version, Version_Pragma, SPARK_Mode, and
SPARK_Mode_Pragma from record Pending_Body_Info because they are
already captured in component Config_Switches.
* opt.adb (Register_Opt_Config_Switches): Rename to
Register_Config_Switches.
(Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
(Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
routine is now a function, and returns the saved configuration state as
an aggregate to avoid missing an attribute.
(Set_Opt_Config_Switches): Rename to Set_Config_Switches.
* opt.ads (Register_Opt_Config_Switches): Rename to
Register_Config_Switches.
(Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
(Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
routine is now a function.
(Set_Opt_Config_Switches): Rename to Set_Config_Switches.
* par.adb (Par): Update the calls to configuration switch-related
subprograms.
* sem.adb (Semantics): Update the calls to configuration switch-related
subprograms.
* sem_ch10.adb (Analyze_Package_Body_Stub): Update the calls to
configuration switch-related subprograms.
(Analyze_Protected_Body_Stub): Update the calls to configuration
switch-related subprograms.
(Analyze_Subprogram_Body_Stub): Update calls to configuration
switch-related subprograms.
* sem_ch12.adb (Add_Pending_Instantiation): Update the capture of
pending instantiation attributes.
(Inline_Instance_Body): Update the capture of pending instantiation
attributes. It is no longer needed to explicitly manipulate the SPARK
mode.
(Instantiate_Package_Body): Update the restoration of the context
attributes.
(Instantiate_Subprogram_Body): Update the restoration of context
attributes.
(Load_Parent_Of_Generic): Update the capture of pending instantiation
attributes.
(Set_Instance_Env): Update the way relevant configuration attributes
are saved and restored.
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
more rvalues in the expression of a renaming.
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Define for
METHOD_TYPE too.
(TYPE_RETURN_UNCONSTRAINED_P): Likewise.
(TYPE_CI_CO_LIST): Likewise.
* gcc-interface/gigi.h (is_cplusplus_method): Delete.
(fntype_same_flags_p): Adjust comment.
* gcc-interface/decl.c (Has_Thiscall_Convention): Delete.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Do not set the "thiscall"
attribute directly.
(is_cplusplus_method): Make static and adjust head comment.
(gnat_to_gnu_param): Return a pointer for the "this" parameter of
C++ constructors.
(gnat_to_gnu_subprog_type): Turn imported C++ constructors into their
callable form. Generate a METHOD_TYPE node for imported C++ methods.
Set param_list at the very end of the processing.
(substitute_in_type) <METHOD_TYPE>: New case.
* gcc-interface/misc.c (gnat_print_type) <METHOD_TYPE>: Likewise.
(gnat_type_hash_eq): Accept METHOD_TYPE.
* gcc-interface/trans.c (Identifier_to_gnu): Deal with METHOD_TYPE.
(Attribute_to_gnu): Likewise.
(Call_to_gnu): Likewise.
(process_freeze_entity): Likewise.
* gcc-interface/utils.c (create_subprog_decl): Adjust head comment.
(fntype_same_flags_p): Likewise.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* inline.adb (Expand_Inlined_Call): Remove extra parentheses.
2018-07-17 Eric Botcazou <ebotcazou@adacore.com>
* exp_disp.adb (Gen_Parameters_Profile): Make the _Init parameter an
In/Out parameter.
(Set_CPP_Constructors): Adjust comment accordingly.
2018-07-17 Bob Duff <duff@adacore.com>
* exp_disp.adb (Build_Class_Wide_Check): Return early if the
precondition is supposed to be ignored.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Untagged_Equality): Extend check to operations
declared in the same scope as the operand type, when that scope is a
procedure.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprograms): Do nothing if the expander is not
active. Don't use Get_Actual_Subtype for record subtypes. Ignore
rewritten identifiers and uplevel references to bounds of types that
come from the original type reference.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch13.adb, exp_ch7.adb, exp_unst.adb, freeze.adb,
libgnat/s-os_lib.adb, sem_ch3.adb, sem_ch3.ads, sem_ch5.adb,
sem_eval.adb, sem_res.adb, sem_util.adb: Minor reformatting.
2018-07-17 Javier Miranda <miranda@adacore.com>
* exp_ch13.adb (Expand_N_Freeze_Entity): Handle subtype declared for an
iterator.
* freeze.adb (Freeze_Expression): Handle freeze of an entity defined
outside of a subprogram body. This case was previously handled during
preanalysis; the frozen entities were remembered and left pending until
we continued freezeing entities outside of the subprogram. Now, when
climbing the parents chain to locate the correct placement for the
freezeing node, we check if the entity can be frozen and only when no
enclosing node is marked as Must_Not_Freeze the entity is frozen.
* sem_ch3.ads (Preanalyze_Default_Expression): Declaration moved to the
package body.
* sem_ch3.adb (Preanalyze_Default_Expression): Code adjusted to invoke
the new subprogram Preanalyze_With_Freezing_And_Resolve.
* sem_ch6.adb (Preanalyze_Formal_Expression): New subprogram.
(Analyze_Expression_Function, Process_Formals): Invoke
Preanalyze_Formal_Expression instead of Preanalyze_Spec_Expression
since the analysis of the formals may freeze entities.
(Analyze_Subprogram_Body_Helper): Skip building the body of the
class-wide clone for eliminated subprograms.
* sem_res.ads, sem_res.adb (Preanalyze_And_Resolve): New subprogram.
Its code is basically the previous version of this routine but extended
with an additional parameter which is used to specify if during
preanalysis we are allowed to freeze entities. If the new parameter is
True then the subtree root node is marked as Must_Not_Freeze and no
entities are frozen during preanalysis.
(Preanalyze_And_Resolve): Invokes the internal version of
Preanalyze_And_Resolve without entity freezing.
(Preanalyze_With_Freezing_And_Resolve): Invokes the internal version of
Prenalyze_And_Resolve with freezing enabled.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* einfo.ads, libgnat/g-comlin.ads: Minor change "ie" to "i.e." in docs
and comments.
2018-07-17 Justin Squirek <squirek@adacore.com>
* libgnat/s-os_lib.adb (Argument_String_To_List): Fix trimming of
whitespace.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Has_Visible_State): Do not consider constants as
visible state because it is not possible to determine whether a
constant depends on variable input.
(Propagate_Part_Of): Add comment clarifying the behavior with respect
to constant.
2018-07-17 Yannick Moy <moy@adacore.com>
* gnat1drv.adb (Gnat1drv): Do not issue warning about exception not
being propagated in GNATprove mode.
2018-07-17 Dmitriy Anisimkov <anisimko@adacore.com>
* libgnat/g-socket.adb, libgnat/g-socket.ads: Reorganize and make
public components of Inet_Addr_Type. Introduce public binary
operations.
2018-07-17 Javier Miranda <miranda@adacore.com>
* exp_ch7.adb (Make_Transient_Block): When determining whether an
enclosing scope already handles the secondary stack, take into account
transient blocks nested in a block that do not manage the secondary
stack and are located within a loop.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Enclosing_Subprogram): Protected entries and task
entries must be treated separately: task entries are within the
enclosing subprogram of the task type, while protected entries are
transformed into the corresponding Protected_Body_Subprogram, which is
the enclosing_subprogram of any subprogram declared within the entry
body.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add missing
sections on -gnatH and -gnatJ compiler switches.
* gnat_ugn.texi: Regenerate.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* alloc.ads: Update the allocation metrics of the ignored Ghost nodes
table.
* atree.adb: Add a soft link for a procedure which is invoked whenever
an ignored Ghost node or entity is created.
(Change_Node): Preserve relevant attributes which come from the Flags
table.
(Mark_New_Ghost_Node): Record a newly created ignored Ghost node or
entity.
(Rewrite): Preserve relevant attributes which come from the Flags
table.
(Set_Ignored_Ghost_Recording_Proc): New routine.
* atree.ads: Define an access-to-suprogram type for a soft link which
records a newly created ignored Ghost node or entity.
(Set_Ignored_Ghost_Recording_Proc): New routine.
* ghost.adb: Remove with and use clause for Lib. Remove table
Ignored_Ghost_Units. Add new table Ignored_Ghost_Nodes.
(Add_Ignored_Ghost_Unit): Removed.
(Initialize): Initialize the table which stores ignored Ghost nodes.
Set the soft link which allows Atree.Mark_New_Ghost_Node to record an
ignored Ghost node.
(Is_Ignored_Ghost_Unit): Use the ultimate original node when checking
an eliminated ignored Ghost unit.
(Lock): Release and lock the table which stores ignored Ghost nodes.
(Mark_And_Set_Ghost_Assignment): Record rather than propagate ignored
Ghost nodes.
(Mark_And_Set_Ghost_Procedure_Call): Record rather than propagate
ignored Ghost nodes.
(Mark_Ghost_Clause): Record rather than propagate ignored Ghost nodes.
(Mark_Ghost_Declaration_Or_Body): Record rather than propagate ignored
Ghost nodes.
(Mark_Ghost_Pragma): Record rather than propagate ignored Ghost nodes.
(Propagate_Ignored_Ghost_Code): Removed.
(Record_Ignored_Ghost_Node): New routine.
(Remove_Ignored_Ghost_Code): Reimplemented.
(Remove_Ignored_Ghost_Node): New routine.
(Ultimate_Original_Node): New routine.
* ghost.ads (Check_Ghost_Completion): Removed.
* sem_ch8.adb (Analyze_Use_Package): Remove obsolete code. Mark a use
package clause as ignored Ghost if applicable.
* sem_util.adb (Is_Body_Or_Package_Declaration): Reimplemented.
2018-07-17 Javier Miranda <miranda@adacore.com>
* sem_ch5.adb (Has_Call_Using_Secondary_Stack): Moved to library level
to reuse it.
(Analyze_Loop_Statement): Wrap the loop in a block when the evaluation
of the loop iterator relies on the secondary stack.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Next_Actual): If the parent is a N_Null_Statement,
which happens for inlined calls, then fetch the next actual from the
original AST.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Update documentation for Scalar_Range.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to
the Standard package.
2018-07-17 Piotr Trojanek <trojanek@adacore.com>
* einfo.adb (Is_Wrapper_Package): Remove extra parentheses.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Enclosing_Subprogram): Handle properly entries, and
synchronized types that are completions of limited types or private
extensions.
(Scope_Within): Handle properly accept statements in task bodies.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Has_Visible_State): Do not consider generic formals
because they are not part of the visible state space. Add constants to
the list of acceptable visible states.
(Propagate_Part_Of): Do not consider generic formals when propagating
the Part_Of indicator.
* sem_util.adb (Entity_Of): Do not follow renaming chains which go
through a generic formal because they are not visible for SPARK
purposes.
* sem_util.ads (Entity_Of): Update the comment on usage.
2018-07-17 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Gather_Components): A discriminant of an ancestor may
have been constrained by a later ancestor, so when looking for the
value of that hidden discriminant we must examine the stored constraint
of other ancestors than the immediate parent type.
2018-07-17 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Build_Heap_Or_Pool_Allocator): Ensure that scoping
constructs and entities within receive new entities when replicating a
tree.
(Expand_N_Extended_Return_Statement): Ensure that scoping constructs
and entities within receive new entities when replicating a tree.
* sem_util.adb (New_Copy_Tree): Add new formal Scopes_In_EWA_OK.
(Visit_Entity): Visit entities within scoping constructs inside
expression with actions nodes when requested by the caller. Add blocks,
labels, and procedures to the list of entities which need replication.
* sem_util.ads (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. Update
the comment on usage.
2018-07-17 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_ugn/about_this_guide.rst,
doc/gnat_ugn/gnat_and_program_execution.rst: Remove references to gcov.
* gnat_ugn.texi: Regenerate.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Contracts): Add specialized processing for
package instantiation contracts.
(Analyze_Package_Contract): Remove the verification of a missing
Part_Of indicator.
(Analyze_Package_Instantiation_Contract): New routine.
* contracts.ads (Analyze_Package_Contract): Update the comment on
usage.
* sem_prag.adb (Check_Missing_Part_Of): Ensure that the entity of the
instance is being examined when trying to determine whether a package
instantiation needs a Part_Of indicator.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb, inline.adb,
sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_eval.adb,
sem_util.adb: Minor reformatting.
2018-07-16 Arnaud Charlet <charlet@adacore.com>
* frontend.adb: Only unnest subprograms if no previous errors were
detected.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that
contain blocks in the elaboration code for a package body. Create the
elaboration subprogram wrapper only if there is a subprogram
declaration in a block or loop.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a
deep copy of the left operand when building each conjuct of the
expanded membership operation, to avoid sharing nodes between them.
This sharing interferes with the unnesting machinery and is generally
undesirable.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Handle 'Address references that are
calls.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field
in relevant nodes: Allocate, Free, and return statements.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an
instance that carries an aspect Default_Storage_Pool that overrides a
default storage pool that applies to the generic unit. The aspect in
the generic unit was removed before copying it in the instance, rather
than removing it from the copy of the aspects that are appended to the
aspects in the instance.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on
loop parameters.
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram
bodies.
* exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an
entry body to be the corresponding generated subprogram, for correct
analysis of uplevel references.
* exp_unst.adb (Visit_Node): Handle properly binary and unary operators
Ignore pragmas, fix component associations.
(Register_Subprograms): Subprograms in synchronized types must be
treated as reachable.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Check_No_Hidden_State): Ignore internally-generated
states and variables.
2018-07-16 Piotr Trojanek <trojanek@adacore.com>
* sinfo.ads, sinfo.adb (Withed_Body): Remove.
(Set_Withed_Body): Remove.
2018-07-16 Piotr Trojanek <trojanek@adacore.com>
* sem.adb (Walk_Library_Items): Skip units with configuration pragmas
when printing debug info.
2018-07-16 Piotr Trojanek <trojanek@adacore.com>
* sem.adb (Walk_Library_Items): Reuse local constant.
(Is_Subunit_Of_Main): Turn condition to positive and flip the
IF-THEN-ELSE branches; avoid potentially ineffective assignment to the
Lib variable.
2018-07-16 Piotr Trojanek <trojanek@adacore.com>
* sem.adb (Walk_Library_Items): Deconstruct dead code.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Op_Xor): Use common routine
Expand_Nonbinary_Modular_Op. Needed for unnesting.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
static predicate (for example True) but has no
static_discrete_predicate.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
class-wide types and record extensions.
2018-07-16 Justin Squirek <squirek@adacore.com>
* sem_eval.adb (Eval_Integer_Literal): Add exception for avoiding
checks on expanded literals within if and case expressions.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
longest sequence factor. Code clean up.
(Wide_Wide_String_To_String): Use the appropriate longest sequence
factor. Code clean up.
2018-07-16 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Report an error
on Bit_Order when defined for a record extension.
2018-07-16 Arnaud Charlet <charlet@adacore.com>
* libgnat/s-objrea.ads: Minor code clean up.
2018-07-16 Piotr Trojanek <trojanek@adacore.com>
* sem_ch3.adb (Process_Discriminants): Adjust reference to the SPARM RM
rule.
2018-07-16 Arnaud Charlet <charlet@adacore.com>
* adaint.c (__gnat_set_file_time_name): Code clean up.
2018-07-16 Javier Miranda <miranda@adacore.com>
* inline.adb (Build_Body_To_Inline): Minor code reorganization that
ensures that calls to function Has_Single_Return() pass a decorated
tree.
(Has_Single_Return.Check_Return): Peform checks on entities (instead on
relying on their characters).
2018-07-16 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Code cleanup. Required
to avoid generating an ill-formed tree that confuses gnatprove causing
it to blowup.
2018-07-16 Yannick Moy <moy@adacore.com>
* inline.adb (Has_Single_Return): Rewrap comment.
2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads: Minor tweak in comment.
2018-07-16 Javier Miranda <miranda@adacore.com>
* sem_ch4.adb (Analyze_Membership_Op): Code cleanup.
2018-07-16 Javier Miranda <miranda@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
transform 'Count into a function call if the current scope has been
eliminated.
2018-07-16 Javier Miranda <miranda@adacore.com>
* sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
public part of this package.
2018-07-16 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Call): Do not inline calls inside
compiler-generated functions translated as predicates in GNATprove.
2018-07-16 Gary Dismukes <dismukes@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
addition to the existing test for no Storage_Pool as a condition
enabling generation of the call to Check_Standard_Allocator when the
restriction No_Standard_Allocators_After_Elaboration is active.
* libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
say that Storage_Error will be raised (rather than Program_Error).
* libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
rather than Program_Error when Elaboration_In_Progress is False.
2018-07-16 Gary Dismukes <dismukes@adacore.com>
* sem_eval.adb: Fix spelling for compile-time-known.
2018-07-16 Hristian Kirtchev <kirtchev@adacore.com>
* sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
the compiler from entering infinite recursion when trying to determine
whether a deferred constant has a compile time known value, and the
initialization expression of the constant is a reference to the
constant itself.
2018-07-16 Nicolas Roche <roche@adacore.com>
* libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
factor from 1/32 to 1/2 for Unbounded_String.
2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/lang.opt (funsigned-char): New option.
* gcc-interface/misc.c (gnat_handle_option): Accept it.
* gcc-interface/utils.c (finish_character_type): Tweak comment.
2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
variable and use it throughout.
<E_Variable>: If the nominal subtype of the object is unconstrained,
compute the Ada size separately and put in on the padding type if the
size is not fixed.
<E_Record_Type>: Minor tweak.
* gcc-interface/misc.c (gnat_type_max_size): Rename max_size_unit
into max_size_unit throughout.
2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
* gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
(add_decl_expr): Change type of second parameter and rename it.
(renaming_from_instantiation_p): New function moved from...
(set_expr_location_from_node): Test for exceptions here and add one
for actual subtypes built for unconstrained composite actuals.
* gcc-interface/utils.c (renaming_from_instantiation_p): ...here.
2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (lvalue_required_p): Remove ALIASED parameter
and adjust recursive calls.
(Identifier_to_gnu): Adjust calls to lvalue_required_p.
(gnat_to_gnu): Likewise.
2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
(gnat_to_gnu_subprog_type): New pure_flag local variable. Set it for
a pure Ada function with a by-ref In parameter. Propagate it onto the
function type by means of the TYPE_QUAL_RESTRICT flag.
* gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
function type has the TYPE_QUAL_RESTRICT flag set.
2018-07-06 Jim Wilson <jimw@sifive.com>
* Makefile.rtl: Add riscv*-linux* support.
* libgnarl/s-linux__riscv.ads: New.
* libgnat/system-linux-riscv.ads: New.
* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
* gcc-interface/Makefile.in (xoscons): Likewise.
2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
(ZCX_By_Default): Set to True.
2018-07-02 Martin Liska <mliska@suse.cz>
* gnatvsn.ads: Bump Library_Version to 9.
2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
(TYPE_ALIGN_OK): Move around.
(TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
* gcc-interface/decl.c (change_qualified_type): Move to...
(gnat_to_gnu_entity): Adjust comment.
* gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
(ceil_pow2): Use ceil_log2.
* gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
and do not set TREE_SIDE_EFFECTS.
(handle_noreturn_attribute): Use change_qualified_type.
2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
the expression of a dispatch table that is not being defined.
<E_Record_Subtype>: Remove obsolete kludge.
2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (warn_on_field_placement): Use specific wording
for discriminants.
(warn_on_list_placement): New static function.
(components_to_record): Use it to warn on multiple fields in list.
2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (variant_desc): Add AUX field.
(gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
directly.
(reverse_sort_field_list): New static function.
(components_to_record): Place the variant part at the beginning of the
field list when there is an obvious order of increasing position.
(build_variant_list): Initialize it.
(create_variant_part_from): Do not call compute_record_mode directly.
(copy_and_substitute_in_layout): Likewise. Always sort the fields with
fixed position in order of increasing position, in the record and all
the variants, in any. Call reverse_sort_field_list.
* gcc-interface/utils.c (make_packable_type): Compute the sizes before
calling finish_record_type. Do not call compute_record_mode directly.
(finish_record_type): Overhaul final processing depending on REP_LEVEL
and call finish_bitfield_layout if it is equal to one or two.
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
existing fields of a dummy fat pointer type, if any. Clear the
TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Process_Body_Postconditions): Expand only checked
postconditions.
(Process_Contract_Cases_For): Expand only checked contract cases.
(Process_Inherited_Preconditions): Ignored class-wide preconditions are
partially expanded because some of their semantic checks are tied to
the expansion.
(Process_Preconditions_For): Expand only checked preconditions.
(Process_Spec_Postconditions): Expand only checked preconditions.
Ignored class-wide preconditions are partially expanded because some of
their semantic checks are tied to the expansion.
* exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
assertion pragmas.
* exp_util.adb (Add_Inherited_Invariants): Code clean up.
* sem_util.adb (Propagate_Invariant_Attributes): Code clean up.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch9.adb, exp_unst.adb, inline.adb, libgnat/a-ciorma.adb,
libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb,
libgnat/a-coormu.adb, libgnat/a-coorse.adb, sem_prag.adb: Minor
reformatting.
2018-06-11 Gary Dismukes <dismukes@adacore.com>
* exp_unst.ads, exp_unst.adb: Typo fixes and minor reformatting.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do
not add any actuals when the size of the object is known, and the
caller will allocate it.
(Build_Heap_Allocator): Rename to Build_Heap_Or_Pool_Allocator to
better illustrate its functionality. Update the comment on the
generated code. Generate a branch for the heap and pool cases where
the object is not necessarity controlled.
(Expand_N_Extended_Return_Statement): Expand the extended return
statement into four branches depending the requested mode if the caller
will not allocate the object on its side.
(Make_Build_In_Place_Call_In_Allocator): Do not allocate a controlled
object on the caller side because this will violate the semantics of
finalizable types. Instead notify the function to allocate the object
on the heap or a user-defined storage pool.
(Needs_BIP_Alloc_Form): A build-in-place function needs to be notified
which of the four modes to employ when returning a limited controlled
result.
* exp_util.adb (Build_Allocate_Deallocate_Proc): Remove a redundant
guard which is already covered in Needs_Finalization.
2018-06-11 Olivier Hainque <hainque@adacore.com>
* libgnat/s-excmac*.ads: Factorize Unwind_Action definitions ...
* libgnat/a-exexpr.adb: ... Here, then add comments describing the
major datastructures associated with the current exception raised.
(Setup_Current_Excep): Accept a "Phase" argument conveying the
unwinding phase during which this subprogram is called. For an Ada
exception, don't update the current exception buffer from the raised
exception object during SEARCH_PHASE, as this is redundant with the
call now issued just before propagation starts.
(Propagate_GCC_Exception): Move call to Setup_Current_Excep ahead of
the unwinding start, conveying Phase 0.
(Unhandled_Except_Handler): Pass UA_CLEANUP_PHASE as the Phase value on
the call to Setup_Current_Excep.
* raise-gcc.c (personality_body): Pass uw_phases as the Phase argument
on calls to Setup_Current_Excep.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.ads, exp_unst.adb (Needs_Fat_Pointer,
Build_Access_Type_Decl): New subprograms to handle uplevel references
to formals of an unconstrained array type. The activation record
component for these is an access type, and the reference is rewritten
as an explicit derefenrence of that component.
2018-06-11 Bob Duff <duff@adacore.com>
* libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb,
libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb:
(Element): Add code to detect dangling cursors in some cases.
2018-06-11 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Build_Subprogram_Declaration): Mark parameters as coming
from source.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
that its parent is already frozen so that its predicate function, if
any, has already been constructed.
2018-06-11 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
possible task unit as the enclosing context.
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gnat1drv.adb: Remove use clause for Repinfo.
(Gnat1drv): Beef up comment about the interplay between -gnatc and
back-end annotations. Use full qualified name for List_Rep_Info.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/g-arrspl.ads: Add pragma Preelaborate.
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
then" and general logical "ada" in codepeer mode.
2018-06-11 Javier Miranda <miranda@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Body): Add missing handling of
N_Call_Marker nodes.
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* exp_ch3.adb, exp_unst.adb, inline.adb, sem_prag.adb: Minor
reformatting.
2018-06-11 Yannick Moy <moy@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst: Add Suppressible
argument to Assertion_Policy
* gnat_rm.texi: Regenerate.
2018-06-11 Yannick Moy <moy@adacore.com>
* gnat1drv.adb: Do not check representation information in CodePeer and
GNATprove modes, as these modes call a special backend instead of gigi,
so do not have the information.
2018-06-11 Yannick Moy <moy@adacore.com>
* inline.adb (Build_Body_To_Inline): Consider case of extended return
of unconstrained type as one case where inlining is not supported.
(Expand_Inlined_Call): Remove special case for body as extended return
of unconstrained type.
2018-06-11 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
unit.
(Check_Missing_Part_Of): Do not force Part_Of on generic unit.
2018-06-11 Piotr Trojanek <trojanek@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications): Don't split AND THEN
expressions in Pre/Post contracts while in GNATprove_Mode.
2018-06-11 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Is_Potentially_Unevaluated): Fix detection of contracts
with AND THEN expressions broken down into individual conjuncts.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Skip generic associations.
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* libgnat/memtrack.adb (fwrite): Remove second definition.
2018-06-11 Javier Miranda <miranda@adacore.com>
* sinfo.ads (Is_Dynamic_Coextension): Adding documentation.
(Is_Static_Coextension): Adding documentation.
* sinfo.adb (Is_Dynamic_Coextension): Extending the assertion.
(Is_Static_Coextension): Extending the assertion.
* sem_util.adb (Mark_Allocator): Clear Is_Static_Coextension when
setting flag Is_Dynamic_Coextension (and vice versa).
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Search_Subprograms): Handle explicitly stubs at the top
level of a compilation unit, becuase they may contain nested
subprograms that need an activation record.
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
Minor reformatting.
* sinfo.ads: Fix a typo.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* inline.adb (Expand_Inlined_Call): If no optimization level is
specified, the expansion of a call to an Inline_Always function is
fully performed in the front-end even on a target that support back-end
inlining.
2018-06-11 Arnaud Charlet <charlet@adacore.com>
* bindgen.adb (Gen_Adainit): Protect reference to System.Parameters
with Sec_Stack_Used.
2018-06-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch8.adb (Find_Direct_Name): Mode the declaration of
Is_Assignment_LHS further in. Use predicate
Needs_Variable_Reference_Marker to determine whether to create a
variable marker.
(Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
in. Use predicate Needs_Variable_Reference_Marker to determine whether
to create a variable marker.
* sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
checks that determine whether the identifier or expanded name is a
suitable variable reference. The checks are now performed by
Needs_Variable_Reference_Marker.
* sem_res.adb (Resolve_Actuals): Use predicate
Needs_Variable_Reference_Marker to determine whether to create a
variable marker.
* sem_util.adb (Needs_Variable_Reference_Marker): New routine.
* sem_util.ads (Needs_Variable_Reference_Marker): New routine.
2018-06-11 Valentine Reboul <reboul@adacore.com>
* doc/gnat_rm.rst, doc/gnat_ugn.rst: Rename "GPL Edition" into
"Community Edition".
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Install_Body): In order to determine the placement of
the freeze node for an instance of a generic nested within another
instance, take into account that the outer instance may be declared in
the visible part of a package and the inner intance may be in the
private part of the same package.
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* errout.adb (Special_Msg_Delete): Remove handling of Atomic and VFA.
2018-06-11 Nicolas Roche <roche@adacore.com>
* libgnat/s-valuti.adb (Bad_Value): Ensure that we do not generate a
stack overflow while raising a constraint error.
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.ads (Rep_Value): Use a single line.
* repinfo.adb (Rep_Value): Likewise.
(List_Attr): Do not use string concatenation.
2018-06-11 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Check reference to formal parameter of
current procedure, because the bounds of its type may be uplevel
references.
2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
not a definition, retrieve the expression only if it's a compile-time
known value if we are just annotating types.
* gcc-interface/utils.c (convert): Do not try to upcast properly for a
conversion between tagged types in type_annotate_only mode.
2018-06-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
* gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
type built for an aliased component with variable size.
2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
* doc/gnat_ugn/project-manager-figure.png: Delete.
2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
* vxworks-arm-link.spec, vxworks-e500-link.spec,
vxworks-gnat-crtbe-link.spec, vxworks-smp-arm-link.spec,
vxworks-smp-e500-link.spec, vxworks-smp-ppc-link.spec,
vxworks-smp-x86-link.spec: New files.
2018-05-31 Pierre-Marie de Rodat <derodat@adacore.com>
* gnatvsn.adb: Re-center the copyright header.
* indepsw-darwin.adb: Adjust the starting copyright year to 2011.
2018-05-31 Fedor Rybin <frybin@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Document Stubs_Subdir in
gnattest section on user guide.
2018-05-31 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_String_Literal): If the type is a string type
whose component subtype has a static predicate, ensure that the
predicate is applied to each character by expanding the string into the
equivalent aggregate. This is also done if the component subtype is
constrained.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Remove obsolete code.
2018-05-31 Piotr Trojanek <trojanek@adacore.com>
* sem_ch6.adb (Check_Missing_Return): Handle procedures with no
explicit spec.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
the type of the parameter is an unconstrained array type, convert
to the type of the actual before the type of the formal only if the
conversion was suppressed earlier. Use in_param and gnu_actual_type
local variables throughout, and uniform spelling for In Out or Out.
Also remove dead code in the component-by-reference case.
2018-05-31 Frederic Konrad <konrad@adacore.com>
* tracebak.c (STOP_FRAME): Harden condition.
(is_return_from, EXTRA_STOP_CONDITION): New helpers for VxWorks in RTP
mode.
2018-05-31 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Discriminant_Check): Do not apply discriminant
check to a call to a build-in-place function, given that the return
object is limited and cannot be copied.
2018-05-31 Olivier Hainque <hainque@adacore.com>
* libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
builtins.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
there is no target, also create a temporary for the return value for
an allocator if the type is an unconstrained record type with default
discriminant.
2018-05-31 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Find_Transient_Context): An iteration scheme is a valid
boudary for a transient scope.
2018-05-31 Valentine Reboul <reboul@adacore.com>
* gnatvsn.ads: Rename "GPL" version to "Community".
2018-05-31 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: Improve documentation for the Is_Unsigned_Type entity
flag.
2018-05-31 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
with a semantically equivalent call to Defining_Entity.
2018-05-31 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
Max_Queue_Length expression.
2018-05-31 Sergey Rybin <rybin@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
that the main unit to be built before the call, now it computes the
closure of the main unit itself.
* gnat_ugn.texi: Regenerate.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Structural_Record_Layout): Set First to false
after having listed the fields of the parent type, if any.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
deal with the ___XP suffix for packed array types here...
<E_Array_Subtype>: ...or here when processing the implementation type
but when processing the original type instead. Do not reuse the DECL
of the implementation type for the original type. Tidy up.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Object_Size_Clause): Declare.
* einfo.adb (Object_Size_Clause): New function.
* gcc-interface/utils.c (maybe_pad_type): Test Has_Size_Clause before
retrieving Size_Clause and post the warning on the object size clause
if Has_Object_Size_Clause is true.
2018-05-31 Javier Miranda <miranda@adacore.com>
* sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
* exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
Find_Primitive_Eq to search for the primitive of types whose underlying
type is a tagged type.
2018-05-31 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma.Check_Loop_Pragma_Placement): Inverse
order of treatment between nodes recognized as loop pragmas (or
generated from one) and block statements.
2018-05-31 Doug Rupp <rupp@adacore.com>
* libgnat/s-osprim__posix2008.adb (Clock): Implement using
clock_gettime.
2018-05-31 Ed Schonberg <schonberg@adacore.com>
* exp_unst.ads, exp_unst.adb (In_Synchronized_Unit): New predicate to
mark subprograms that cannot be eliminated because they must be treated
as reachable from outside the current unit. This includes entry bodies
and protected operations.
2018-05-31 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Modular_Addition, Expand_Modular_Subtraction):
Convert all operands of the generated code to Standard.Unsigned, to
prevent spurious visibility errors. This is needed when the generated
expansion involves a modular index type of an array type, and the index
type is not immediately visible.
2018-05-30 Piotr Trojanek <trojanek@adacore.com>
* einfo.ads (Package_Instantiation): Update comment after a routine
that uses this field has been renamed.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
if the local raise statement includes a string expression. This
expression might be picked up by an outer handler or discarded, but
plays no role in this transformation.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
reformatting.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
field in relevant nodes: Allocate, Free, and return statements.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Do not traverse a Component_Association
that has not been analyzed, as will be the case for a nested aggregate
that is expanded into individual assignments.
2018-05-30 Justin Squirek <squirek@adacore.com>
* aspects.adb, aspects.ads: Register new aspect.
* par-prag.adb (Prag): Register new pragma.
* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
aspect similar to Aspect_Max_Queue_Length.
* sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
set it to use the same processing as Pragma_Max_Queue_Length.
* snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
that it can be processed as a pragma in addition to a restriction and
add an entry for the pragma itself.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
is now legal on a variable of composite type initialized with an
aggregate that is fully static and requires no elaboration code.
* exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
nested aggregates that are compile-time static, so they can be used to
initialize variables declared with Threqd_Local_Storage.
* doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
Thread_Local_Storage.
* gnat_rm.texi: Regenerate.
2018-05-30 Yannick Moy <moy@adacore.com>
* sem_util.adb (Policy_In_Effect): Take into account CodePeer and
GNATprove modes.
2018-05-30 Justin Squirek <squirek@adacore.com>
* libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
Add implementation.
(Start_Search): Modify to use Start_Search_Internal
(Start_Search_Internal): Add to break out an extra flag for searching
case insensative due to the potential for directories within the same
OS to allow different casing schemes.
* sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
for when the more precise solution fails.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
Minor reformatting.
2018-05-30 Pascal Obry <obry@adacore.com>
* libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
* libgnat/g-comlin.adb: Add corresponding implementation.
2018-05-30 Gary Dismukes <dismukes@adacore.com>
* sem_res.adb, sem_util.adb: Fix several typos.
2018-05-30 Olivier Hainque <hainque@adacore.com>
* vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
(eh_registration_ctors, eh_registration_tors): New static variables,
forced in a .ctors/.dtors section, respectively, with priority.
2018-05-30 Bob Duff <duff@adacore.com>
* aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
sinfo.ads: Spell preanalysis, preanalyze correctly.
2018-05-30 Bob Duff <duff@adacore.com>
* libgnat/g-sestin.ads: Rework documentation comments.
2018-05-30 Piotr Trojanek <trojanek@adacore.com>
* errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
(Has_Original_Node): Refactor to use Is_Rewrite_Substitution.
2018-05-30 Piotr Trojanek <trojanek@adacore.com>
* sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
in a separate routine.
(Is_Atomic_Object_Entity): New routine.
(Is_Atomic_Prefix): Cleaned up.
(Is_Synchronized_Object): Check that the object is atomic, or its type
is atomic.
(Object_Has_Atomic_Components): Removed.
* sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
(Is_Atomic_Object_Entity): New routine.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Subprogram_Declaration): The flag
Needs_Activation_Record is only needed on a subprogram type, not on a
pointer to such.
* sem_res.adb (Resolve_Selected_Component): If the context type and the
component type are anonymous access to subprograms, use the component
type to obtain the proper value of Needs_Activation_Record flag for the
expression.
2018-05-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
comment about the memset case.
2018-05-30 Bob Duff <duff@adacore.com>
* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
We need to analyze it as part of analyzing the block, so that if the
call to Element that initializes Elmt_Decl returns on the secondary
stack, the block will ss_mark/ss_release. This block is inside the
loop; we don't want to leak memory until the loop exits. The purpose
of analyzing Elmt_Decl first was to catch the error of modifying it,
which is illegal because it's a loop parameter. The above causes us to
miss that error. Therefore, we add a flag Is_Loop_Parameter, and set
it on the Element entity, so we end up with an E_Variable node with the
flag set.
* einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
* sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
parameter not allowed" error if Is_Loop_Parameter.
* sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
trigger the call to Diagnose_Non_Variable_Lhs.
2018-05-30 Arnaud Charlet <charlet@adacore.com>
* checks.adb (Apply_Scalar_Range_Check):
* sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
range values for System.Priority in CodePeer mode since the actual
target compiler may provide a wider range.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb: Search specification of main unit as well, for
unnesting.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
a package body that is a compilation unit may contain blocks that
declare local subprograms. In Subprogram_Unnesting Mode such
subprograms must be handled as nested inside the (implicit) elaboration
procedure that executes that statement part. To handle properly uplevel
references we construct that subprogram explicitly, to contain blocks
and inner subprograms, The statement part of the compilation unit
becomes a call to this subprogram. This is only done if blocks are
present in the statement list of the body.
2018-05-30 Bob Duff <duff@adacore.com>
* exp_ch7.adb: Minor comment fix.
2018-05-30 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
that have no corresponding body and appear as attributes of the
corresponding wrapper package declaration.
(Register_Subprogram): New subprogram, used for subprogram bodies and
for subprogram instantiations to enter callable entity into Subp table.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/s-secsta.adb: Reimplement the secondary stack support.
* libgnat/s-secsta.ads: Update the documentation of all routines in the
public part of the package. Reimplement the private part of the
package to account for the new secondary stack structure. Add types
and subprograms for testing purposes. Add several documentation
sections.
2018-05-30 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
sem_disp.ads, sem_util.adb: Minor reformatting.
2018-05-30 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Move special flags for Ada runtime files
from here...
* Makefile.rtl: ... to here. Update comments. Protect call to
"GCC_FOR_TARGET" in case target_os isn't defined.
2018-05-30 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Move target pair settings from here...
* Makefile.rtl: ... to here.
(setup-rts): New target.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
List of All Switches): Replace "modules" with "units".
(Subprogram Inlining Control): Likewise.
* gnat_ugn.texi: Regenerate.
* usage.adb (Usage): Fix description of -gnatn switch.
2018-05-29 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Fix typos.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
the finalizer procedure in the At_End handler, for use in LLVM
generation.
2018-05-29 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
subprogram Inherits_From_Tagged_Full_View to identify more reliably
untagged private types completed with a derivation of an untagged
private whose full view is a tagged type.
* sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
subprogram.
(Collect_Primitive_Operations): Handle untagged private types completed
with a derivation of an untagged private type whose full view is a
tagged type. In such case, collecting the list of primitives we may
find two equality primitives: one associated with the untagged private
and another associated with the ultimate tagged type (and we must
remove from the returned list this latter one).
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Handle statement sequences that include an
At_End handler.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Entities): Also recurse into blocks without label.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
exceptions if subprogram unnesting is in effect, because these branch
nodes are relevant only in the presence of nested subprograms.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error
unconditionally when applied to the largest positive (resp. largest
negative) value of a floating-point type.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
discriminants and exceptions are never components of such. The flag
Needs_Activation_Record is set on subprogram types, not on access to
them.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb: Set scope of component of subtype.
2018-05-29 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
carry no type. Such selected components appear in unit names that are
child units, both in the specification and possibly in an end label for
the unit, and they do not contain any relevant uplevel references.
2018-05-29 Arnaud Charlet <charlet@adacore.com>
* libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
function.
2018-05-29 Olivier Hainque <hainque@adacore.com>
* libgnat/system-vxworks7-ppc-rtp.ads: New file.
* libgnat/system-vxworks7-ppc-kernel.ads: New file.
* libgnat/system-vxworks7-e500-rtp.ads: New file.
* libgnat/system-vxworks7-e500-kernel.ads: New file.
* libgnat/system-vxworks7-x86-rtp.ads: New file.
* libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
* libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
gnat-crtbe link spec to use the vx7 variant.
2018-05-29 Olivier Hainque <hainque@adacore.com>
* vx_crtbegin.inc: Use a consistent naming convention for the
registration/deregistration functions across RTP or kernel. Remove the
ctor/dtor attribute setting based on RTP/kernel, expect the optional
attribute extension to be provided by includers instead.
* vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
extension for the registration/deregistration functions.
* vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
constructor/destructor attribute extensions.
* vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
attribute extensions and declare _ctors/_dtors arrays.
* vx_crtbegin_auto.c: Remove.
* libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
vxworks7-gnat-crtbe-link.spec.
* libgnat/system-vxworks7-aarch64.ads: Likewise.
* libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
2018-05-29 Piotr Trojanek <trojanek@adacore.com>
* ali.adb: Minor reformatting.
2018-05-29 Joel Brobecker <brobecker@adacore.com>
* doc/gnat_ugn/platform_specific_information.rst: Update package
requirements for 32bit GNAT on x86_64-linux.
* gnat_ugn.texi: Regenerate.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
Control): Adjust description of -gnatRj.
* gnat_ugn.texi: Regenerate.
* opt.ads (List_Representation_Info_To_JSON): Likewise.
* repinfo.adb (List_Rep_Info): Do not automatically create a file
if List_Representation_Info_To_JSON is true.
* switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
check between -gnatRj and -gnatRs.
* usage.adb (Usage): Adjust description of -gnatRj.
2018-05-29 Pascal Obry <obry@adacore.com>
* libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
the root directory.
2018-05-29 Pascal Obry <obry@adacore.com>
* libgnat/s-os_lib.adb: Minor reformatting.
2018-05-29 Doug Rupp <rupp@adacore.com>
* libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
* libgnat/a-calend.ads (Epoch_Offset): to private part of spec
* libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
* libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.ads (JSON format): Document new pair for components.
* repinfo.adb (Derived_Discriminant): New function.
(List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
in recursive calls. If the record type is the parent of an extension,
find and list the derived discriminant from the extension, if any.
(List_Component_Layout): List the Discriminant_Number in JSON mode.
(List_Record_Info): Adjust call to List_Structural_Record_Layout.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
List of All Switches): Document -gnatRj.
(Debugging Control): Likewise.
* gnat_ugn.texi: Regenerate.
* opt.ads (List_Representation_Info_To_JSON): New boolean variable.
* osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
extension if List_Representation_Info_To_JSON is true.
* repinfo.ads: Document the JSON output format.
* repinfo.adb (List_Location): New procedure.
(List_Array_Info): Add support for JSON output.
(List_Entities): Likewise.
(Unop): Likewise.
(Binop): Likewise.
(Print_Expr): Likewise.
(List_Linker_Section): Likewise.
(List_Mechanisms): Likewise.
(List_Name): Likewise.
(List_Object_Info): Likewise.
(List_Record_Info): Likewise.
(List_Component_Layout): Likewise. Add Indent parameter.
(List_Structural_Record_Layout): New procedure.
(List_Attr): Add support for JSON output.
(List_Type_Info): Likewise.
(Write_Unknown_Val): Likewise.
* switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
* usage.adb (Usage): List -gnatRj.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Component_Layout): New procedure extracted from...
(List_Record_Layout): ...here. Invoke it.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (Write_Unknown_Val): New procedure.
(List_GCC_Expression): Call it.
(List_Record_Layout): Likewise.
(Write_Val): Likewise.
2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
code to do check.
2018-05-29 Arnaud Charlet <charlet@adacore.com>
* lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
This breaks build of cross compilers with older versions of GNAT, so
better avoid it.
2018-05-29 Doug Rupp <rupp@adacore.com>
* libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
reflect reality.
2018-05-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.
2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Entities): Do not list the Linker_Section for
subprograms here...
(List_Mechanisms): ...but here instead. Use consistent name output
and formatting conventions.
2018-05-29 Bob Duff <duff@adacore.com>
* lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
To_Lower function.
* libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
To_Mixed): New functions.
* osint.adb: Cleanup: use Is_Directory_Separator, which correctly
allows both '\' and '/' on Windows.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.ads: Minor fixes and tweaks in comments.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
it with calls to Unop.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.ads (TCode): Adjust range.
(Truth_Andif_Expr): Remove.
(Truth_Orif_Expr): Likewise.
(Truth_And_Expr .. Dynamic_Val): Adjust value.
* repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
(Rep_Value): Likewise.
* repinfo.h (Truth_Andif_Expr): Remove.
(Truth_Orif_Expr): Likewise.
(Truth_And_Expr .. Dynamic_Val): Adjust value.
* gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
through to TRUTH_AND_EXPR case.
<TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): For indexed components and attribute
references, examine index expressions or associated expressions as well
to record uplevel references.
(Vist_Node): For function and procedure calls, if a formal is an
unconstrained array and the actual is constrained, check whether bounds
of actual have uplevel references.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
they can appear as components of activation records.
* exp_unst.adb (Visit_Node): A reference to an exception may be an
uplevel reference.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
depends on a discriminant manually instead of using the predicate
Size_Depends_On_Discriminant in the array type case.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Check_Static_Type): For a record subtype, check
discriminant constraints as well.
(Visit_Node): For a selected component, check type of prefix, as is
done for indexed components and slices.
2018-05-28 Javier Miranda <miranda@adacore.com>
* exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
value when converting a float value to a fixed-point value. This is
required for CCG because it handles fixed-point types by means of
unsigned integer type variables. The range check is now performed using
the integer value stored in this temporary.
2018-05-28 Yannick Moy <moy@adacore.com>
* sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
Length as valid non-interfering contexts for SPARK.
2018-05-28 Claire Dross <dross@adacore.com>
* sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
generic inheritance utilities.
(Generic_Inherited_Subprograms): Generic version of
Inherited_Subprograms, generic in Find_Dispatching_Type function.
(Generic_Is_Overriding_Subprogram): Generic version of
Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
(Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
Sem_Disp.Find_Dispatching_Type.
(Is_Overriding_Subprogram): Instance of
Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
(Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
with Sem_Disp.Find_Dispatching_Type.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
component type, do not expand array equality using the unconstrained
base type, except for the case where the bounds of the type depend on a
discriminant.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
access-to-subprogram types, to indicate that an indirect call through
such a type requires an activation record when compiling for LLVM.
* sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
when bounds of fixed type are static, to remove some spuerfluous
implicit conversions and provide an accurate result when converting
back and forth between the fixed point type and a floating point type.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
activation records.
2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
replaced, if any; all callers changed.
(Note_Uplevel_Ref): Likewise. Also replace reference to deferred
constant with private view so we take the address of that entity.
(Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
any; all callers changed. Handle N_Indexed_Component like
N_Attribute_Reference. Add N_Type_Conversion case.
(Visit_Node): Indexed references can be uplevel if the type isn't
static.
(Unnest_Subprograms): Don't rewrite if no reference given. If call has
been relocated, set first_named pointer in original node as well.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Flatten): Copy tree of expression in a component
association with a range or a set of discrete choices, rather than
relocating the node. This avoids inconsistencies in the tree when
handling nested subprograms with uplevel references for LLVM.
2018-05-28 Arnaud Charlet <charlet@adacore.com>
* exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
codepeer mode.
2018-05-28 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb: Fix typo.
2018-05-28 Bob Duff <duff@adacore.com>
* libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
unnecessary use of 'Unrestricted_Access.
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* repinfo.adb (Expr_Value_S): New routine.
(List_Linker_Section): Properly extract the value of the section
argument.
2018-05-28 Patrick Bernardi <bernardi@adacore.com>
* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
description of the -D binder switch to reflect current usage.
* gnat_ugn.texi: Regenerate.
2018-05-28 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb: Minor reformatting
2018-05-28 Justin Squirek <squirek@adacore.com>
* exp_ch3.adb
(Build_Initialization_Call): Add logic to pass the appropriate actual to match
new formal.
(Init_Formals): Add new formal *_skip_null_excluding_check
* exp_util.adb, exp_util.ads
(Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
scope.
(Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
(Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
used to determine how to generate an Init_Proc for a given type.
(Needs_Constant_Address): Minor reformatting
* sem_res.adb
(Resolve_Null): Add logic to generate a conditional check in certain cases
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
Minor reformatting.
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
the declarations of single concurrent types because they fall in the
category of full type and object declarations.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (Compute_Max_Length): Skip _Parent component.
(List_Record_Layout): Likewise.
2018-05-28 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Function_Result): Add a warning if a postcondition
includes a call to function to which it applies. This may mean an
omission of an attribute reference 'Result, in particular if the
function is pqrameterless.
2018-05-28 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
misresolved package name is not a case of mistaken identity.
2018-05-28 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
GNATprove mode, as the order of resolution (low then high) means that
all the information is not available when resolving the low bound the
first time.
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Array_Info): Start with an explicit blank line and
end with the linker section, if any.
(List_Entities): Do not output the linker section for record types,
array types and variables.
(Print_Expr): Factor out common processing for unary operators and
special values. Adjust and reorder the various cases.
(List_Object_Info): End with the linker section, if any.
(List_Record_Info): Likewise.
(List_Type_Info): Do not start with a blank line.
2018-05-25 Nicolas Roche <roche@adacore.com>
* libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
that the result will be either -infinite or +infinite.
2018-05-25 Patrick Bernardi <bernardi@adacore.com>
* libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
Expand range of type to match the address space of the target.
(Task_Storage_Size): Remove unused type.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
of a fixed point type and the parent is a multiplying operation,
resolve the operand with its own type because the context will impose a
resulting type on the result of the multiplication by means of
approriate conversion.
2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
the in-place initialization aggregate created for pragmas
Initialize_Scalars or Normalize_Scalars is performed with checks
suppressed.
2018-05-25 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Convert_To_Positional): Bump default for
Max_Others_Replicate to 32. Update comments.
* osint.ads (Unknown_Attributes): No longer pretend this is a constant.
(No_File_Info_Cache): Initialize separately.
* osint.adb (No_File_Info_Cache): Update initializer.
2018-05-25 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
test when the left operand is a class-wide interface and the right
operand is not a class-wide type.
* exp_ch4.adb (Tagged_Membership): Adding support for interface as the
left operand.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
in an others clause to prevent visibility issues with the generated
loop variable.
(Component_OK_For_Backend): Return false for a quantified expression.
(Check_Static_Component): Ditto.
2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
* libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
(SS_Allocate_Dynamic): New routine. The allocation logic is now split
into three distring cases rather than in one loop which attempts to
handle all three cases. This rewrite eliminates an issue where the last
frame of the stack cannot be freed, thus causing the memory range of a
new frame to approach the overflow point of the memory index type.
Since the overflow is logically treated as a
too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
(SS_Allocate_Static): New routine. The routine factorizes the static
secondary stack-related code from the former SS_Allocate.
2018-05-25 Sergey Rybin <rybin@adacore.com>
* doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
option for gnatelim.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
is created when the proper body of the stub is analyzed.
* sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
is the proper body of a subunit, the cloned body must be inserted in
the declarative list that contains the stub.
2018-05-25 Justin Squirek <squirek@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
generate code for 6.5(8-10) so that we don't get an assertion error
when dealing with an incomplete return type.
2018-05-25 Arnaud Charlet <charlet@adacore.com>
* pprint.adb (Expression_Name): Strip too long expressions to avoid
carrying very large strings.
2018-05-25 Patrick Bernardi <bernardi@adacore.com>
* switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
numbers.
2018-05-25 Doug Rupp <rupp@adacore.com>
* tracebak.c (aarch64-linux): Implement.
2018-05-25 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb: Minor reformatting.
2018-05-25 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Iterate_Call_Parameters): Fix code convention and
assertions.
2018-05-25 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
Minor reformatting.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instance_Exists): New function, subsidiary of
Validate_Derived_Type_Instance, to verify that all interfaces
implemented by the formal type are also implemented by the actual. The
verification is complicated when an interface of the formal is declared
in a generic unit and the actual is declared in an instance of it.
There is currently no mechanism to relate an interface declared within
a generic to the corresponding interface in an instance, so we must
traverse the list of interfaces of the actual, looking for a name
match, and verifying that that interface is declared in an instance.
2018-05-25 Piotr Trojanek <trojanek@adacore.com>
* sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
assertions; replace function versions of Next_Formal/Next_Actual with
their procedural versions (which are more concise).
2018-05-25 Doug Rupp <rupp@adacore.com>
* 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.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
for a formal derived type implements all the interfaces declared for
the formal.
2018-05-25 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
and GNATprove modes when applicable policy is Ignore.
2018-05-25 Eric Botcazou <ebotcazou@adacore.com>
* 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.
2018-05-25 Arnaud Charlet <charlet@adacore.com>
* pprint.adb (Expression_Name): Do not print non ASCII characters.
2018-05-25 Bob Duff <duff@adacore.com>
* libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.
2018-05-25 Bob Duff <duff@adacore.com>
* sem_util.ads: Minor comment fix.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Restrict check for uplevel references in
prefixes of array attributes, to prefixes that are entity names whose
type is constrained.
(Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
subprogram, as itype created for loops in pre/postcondition may appear
in loops at the library level.
2018-05-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): The predicate function
declaration is inserted into the tree and analyzed at that point, so
should not be reinserted when the body is constructed. Inside a
generic, ensure that the body is not inserted twice in the tree.
2018-05-25 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Check_Grouping): Modify test to ignore statements and
declarations not coming from source.
2018-05-25 Fedor Rybin <frybin@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
--copy-environment for gnattest.
2018-05-24 Piotr Trojanek <trojanek@adacore.com>
* sem_elab.adb (Non_Private_View): Simplify by removing a local Result
variable.
* sem_prag.adb (Get_Base_Subprogram): Same as above.
2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
* fe.h (Set_Normalized_First_Bit): Declare.
(Set_Normalized_Position): Likewise.
* repinfo.adb (List_Record_Layout): Do not use irregular output for a
variable position. Fix minor spacing issue.
* gcc-interface/decl.c (annotate_rep): If a field has a variable
offset, compute the normalized position and annotate it in addition to
the bit offset.
2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
Constify and rename variables. Fix formatting.
(gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
<N_Raise_Statement>: Likewise.
2018-05-24 Javier Miranda <miranda@adacore.com>
* exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
body of a variant record equality renaming.
(Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
implementation of Build_Body_For_Renaming.
* exp_ch3.ads (Build_Variant_Record_Equality): New library level
function that factorizes the functionality needed by
Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
of a variant record equality subprogram.
* exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
(Build_Variant_Record_Equality): New local procedure of
Expand_Freeze_Record_Type containing all the code specific for freezing
the record type that cannot be place in the new library level function.
2018-05-24 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Is_Activation_Record): New flag on
in_parameters, used when unesting subprograms for LLVM, to indicate
that a generated parameter carries the activation record from the
enclosing subprogram.
* exp_unst.adb (Check_Static_Type): Handle array attributes of types
whose bounds may contain up-level references that need to be added to
an activation recoord.
(Add_Extra_Formal): Set Is_Activation_Record on new formal.
2018-05-24 Yannick Moy <moy@adacore.com>
* pprint.adb (Expression_Image): Improve the printing of expressions,
by taking more cases into account, in particular qualified expressions
and aggregates. Also count more the number of parentheses to close
after the expression.
2018-05-24 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Is_Visible_Component): For untagged types add missing
check for renamed discriminants.
* sem_ch4.adb (Analyze_Overloaded_Selected_Component,
Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
Is_Visible_Component pass the associated selector node to allow
checking renamed discriminants on untagged types.
2018-05-24 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
link to a use_type clause if this would cause an infinite loop in the
machinery that detects redundant use clauses. This may happen when the
redundant clauses appear in the context of a child unit and the context
of its parent.
2018-05-24 Piotr Trojanek <trojanek@adacore.com>
* sinfo.ads: Fix grammar in comment.
2018-05-24 Justin Squirek <squirek@adacore.com>
* einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
and manage doubly-linked entity chain.
(Nested_Scenarios): Removed entity field used for optimization during
elaboration to make room for the new field Prev_Entity.
(Link_Entities): Added to replace redundant calls to Set_Next_Entity
and Set_Prev_Entity as well as centralize changes to the entity chain.
(Predicated_Parent): Modified to use Node38.
(Prev_Entity): Added to fetch new node field Prev_Entity in all entity
types.
(Remove_Entity): Moved from sem_util.
(Set_Nested_Scenarios): Deleted.
(Set_Predicated_Parent): Modified to use Node38.
(Set_Prev_Entity): Added to set Prev_Entity field.
(Set_Validated_Object): Modified to use Node38.
(Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
action is required.
(Validated_Object): Modified to use Node38.
(Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
predicated parent cases.
(Write_Field38_Name): Add predicated parent and Validated_Object cases.
* sem_ch3.adb (Process_Subtype): Add guard to protect against
inappropriate marking of Predicated_Parent to non-itype subtypes.
(Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
(Copy_And_Swap): Add setting of Prev_Entity.
(Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
w/ Link_Entities.
(New_Overloaded_Entity): Remove block created to search for previous
entities in the entity chain with relevant calls to Prev_Entity as well
as replace duplicated code from Remove_Entity_And_Homonym with a call
to that subprogram.
* sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
Link_Entities.
* sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
initial subprogram declarations related to Nested_Scenarios.
(Process_Nested_Scenarios): Deleted.
(Save_Scenario): Deleted.
(Traverse_Body): Remove optimization for Nested_Scenarios so as to free
node space in the entity tree.
* sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
(Remove_Entity_And_Homonym): Added to separate functionality of
Remove_Entity from the homonym chain directly.
* exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
w/ Link_Entities and Unlink_Next_Entity.
* exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
Link_Entities.
* exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
Set_Next_Entity w/ Link_Entities.
* exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
Link_Entities and Unlink_Next_Entity.
* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
call to Remove_Entity with its new incarnation.
* exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
* freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
Link_Entities.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
Install_Limited_Withed_Unit.
(Expand_With_Clause): Update the call to Install_Withed_Unit.
(Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
(Install_Context_Clauses): Update the call to Install_Withed_Unit.
(Install_Limited_Context_Clauses): Update the calls to
Install_Limited_Withed_Unit.
(Install_Limited_Withed_Unit): Renamed to better illustrate its
purpose.
(Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
and Install_Limited_Withed_Unit.
(Install_With_Clause): Uninstall a limited with clause if a [private]
with clause is given for the same package.
(Install_Withed_Unit): Renamed to better illustrate its purpose.
(Remove_Limited_With_Unit): New routine.
2018-05-24 Eric Botcazou <ebotcazou@adacore.com>
* raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
(__gnat_personality_seh0): Adjust and beef up comments, and
fix formatting throughout.
(__gnat_adjust_context): Deal minimally with version 2.
* seh_init.c (__gnat_map_SEH): Fix formatting.
(_gnat_SEH_error_handler): Adjust comments.
(__gnat_install_SEH_handler): Fix formatting.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.
2018-05-24 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Flatten): Add a warning on an others clause in an array
aggregate with static bounds when named associations cover all index
positions and the others clause is redundant.
2018-05-24 Raphael Amiard <amiard@adacore.com>
* libgnat/a-cohama.ads: Add documentation.
2018-05-24 Raphael Amiard <amiard@adacore.com>
* libgnat/a-convec.ads: Add documentation.
2018-05-24 Justin Squirek <squirek@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
expansion for limited tagged types when the node to be expanded is a
raise expression due to it not representing a valid object.
* exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
message regarding assignments to limited types to ignore genereated
code.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
Ghost-related attributes of the class-wide subtype because the copy
clobbers them.
2018-05-24 Justin Squirek <squirek@adacore.com>
* sem_res.adb (Resolve_Entity_Name): Add guard to protect against
marking use clauses as effective when the reference appears within
generated code.
2018-05-24 Cyrille Comar <comar@adacore.com>
* doc/gnat_rm/the_gnat_library.rst: Fix typos.
* gnat_rm.texi: Regenerate.
2018-05-24 Bob Duff <duff@adacore.com>
* exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
for build-in-place functions with a caller-unknown-size result.
(Create_Finalizer): For build-in-place functions with a
caller-unknown-size result, check at run time whether we need to
release the secondary stack.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): Use the full view of an internally
generated incomplete type.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* expander.adb (Expand): Update the save and restore of the Ghost
region.
* exp_ch3.adb (Freeze_Type): Likewise.
* exp_disp.adb (Make_DT): Likewise.
* exp_util.adb (Build_DIC_Procedure_Body): Likewise.
(Build_DIC_Procedure_Declaration): Likewise.
(Build_Invariant_Procedure_Body): Likewise.
(Build_Invariant_Procedure_Declaration): Likewise.
(Make_Predicate_Call): Likewise.
* freeze.adb (Add_To_Result): Insert the freeze action of a living
entity prior to the start of the enclosing ignored Ghost region.
(Freeze_Entity): Update the save and restore of the Ghost region.
* ghost.adb (Install_Ghost_Mode): Reimplemented.
(Install_Ghost_Region): New routine.
(Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
(Mark_And_Set_Ghost_Body): Likewise.
(Mark_And_Set_Ghost_Completion): Likewise.
(Mark_And_Set_Ghost_Declaration): Likewise.
(Mark_And_Set_Ghost_Instantiation): Likewise.
(Mark_And_Set_Ghost_Procedure_Call): Likewise.
(Name_To_Ghost_Mode): New routine.
(Restore_Ghost_Region): New routine.
* ghost.ads (Install_Ghost_Region): New routine.
(Restore_Ghost_Region): New routine.
* opt.ads: Add new global variable Ignored_Ghost_Region.
* rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
region. Install a clean region.
* sem.adb (Analyze): Likewise.
(Do_Analyze): Likewise.
* sem_ch3.adb (Analyze_Object_Declaration): Likewise
(Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
capture the ultimate alias of the current primitive.
(Process_Full_View): Update the save and restore of the Ghost region.
Do not inherit DIC and invariant procedures.
* sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
Ghost region.
* sem_ch6.adb (Analyze_Procedure_Call): Likewise.
(Analyze_Subprogram_Body_Helper): Likewise.
* sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
* sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
(Analyze_Subprogram_Instantiation): Likewise.
(Instantiate_Package_Body): Likewise.
(Instantiate_Subprogram_Body): Likewise.
* sem_ch13.adb (Build_Predicate_Functions): Likewise.
(Build_Predicate_Function_Declaration): Likewise.
* sem_disp.adb
(Add_Dispatching_Operation): Do not consider DIC and invariant
procedures.
(Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
a dispatching subprogram.
(Check_Operation_From_Private_View): Likewise.
(Override_Dispatching_Operation): Likewise.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
and restore of the Ghost region.
(Analyze_Initial_Condition_In_Decl_Part): Likewise.
(Analyze_Pragma): Update the save and restore of the Ghost region.
(Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
* sem_util.adb (Is_Suitable_Primitive): New routine.
* sem_util.ads (Is_Suitable_Primitive): New routine.
* sinfo.ads: Update the section of Ghost regions.
2018-05-24 Piotr Trojanek <trojanek@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
Change "condition" to "case guard" after renaming in the contract
grammar.
* gnat_rm.texi: Regenerate.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
construct with discrete choices no longer contains a subtype with
predicates since the expansion already handled this case.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
conversion to the return type to avoid a side effect where an imported
relocated function generates a new anonymous access type, whose
accessibility level does not agree with with that of the wrapper.
2018-05-24 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Abstract_Interface_List): Add missing support for
private types whose full view is a synchronized type.
* sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
derivation of a private type parent type is a task type with
discriminants as gigi does not use such type directly.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
variable marker when the reference appears in the formal part of a
compilation unit instance because there is no place to insert it.
(In_Compilation_Instance_Formal_Part): New routine.
2018-05-24 Piotr Trojanek <trojanek@adacore.com>
* layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
configuration parameter.
2018-05-24 Doug Rupp <rupp@adacore.com>
* argv-lynxos178-raven-cert.c: New file.
* libgnat/system-lynxos178-x86.ads: New file.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
Minor reformattings.
2018-05-23 Pascal Obry <obry@adacore.com>
* adaint.c (win32_wait): Properly free the handle/pid lists when
WaitForMultipleObjects fails (return WAIT_FAILED).
2018-05-23 Pascal Obry <obry@adacore.com>
* adaint.c (win32_wait): Add missing parentheses.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
(Expand_N_Object_Declaration): Do not check for a large modular array
here.
* freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
(Freeze_Object_Declaration): Code cleanup. Check for a large modular
array.
* sem_ch3.adb: Minor reformatting.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
* einfo.ads: New attribute on types: Predicated_Parent, to simplify the
retrieval of the applicable predicate function to an itype created for
a constrained array component.
* einfo.adb: Subprograms for Predicated_Parent.
(Predicate_Function): Use new attribute.
* exp_util.adb (Make_Predicate_Call): If the predicate function is not
available for a subtype, retrieve it from the base type, which may have
been frozen after the subtype declaration and not captured by the
subtype declaration.
* sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
legal within a generated initiqlization procedure, as may happen with a
predicate check on a component, when the predicate function applies to
the base type of the component.
* sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
predicates for subtype declarations and for subtype indications in
other contexts.
(Process_Subtype): Likewise. Handle properly the case of a private type
with unknown discriminants whose full view is an unconstrained array.
Use Predicated_Parent to indicate source of predicate function on an
itype whose parent is itself an itype.
(Complete_Private_Subtype): If the private view has unknown
discriminants and the full view is an unconstrained array, set base
type of completion to the full view of parent.
(Inherit_Predicate_Flags): Prevent double assignment of predicate
function and flags.
(Build_Subtype): For a constrained array component, propagate predicate
information from original component type declaration.
2018-05-23 Boris Yakobowski <yakobowski@adacore.com>
* libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.
2018-05-23 Arnaud Charlet <charlet@adacore.com>
* checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
Hi.
* sem_elab.adb: Make "out" parameters instead of "in out" when
relevant.
2018-05-23 Bob Duff <duff@adacore.com>
* gnatbind.adb (List_Applicable_Restrictions): Add
No_Implementation_Restrictions to the list of restrictions not to list.
Remove double negative "not No_Restriction_List". Comment the
commentary that is output, so it won't cause errors if used directly in
a gnat.adc.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
class-wide precondition on a type extension when ancestor does not have
a class-wide precondition. Previously the compiler accepted such a
precondition when the ancestor had a class-wide postcondition.
2018-05-23 Javier Miranda <miranda@adacore.com>
* sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
the warning on occurrences of this attribute whose evaluation is always
true (since that subprogram aborts processing the attribute). In
addition, replace the node by its boolean result 'True' (required
because the backend has no knowledge of this attribute).
2018-05-23 Bob Duff <duff@adacore.com>
* 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.
2018-05-23 Yannick Moy <moy@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
local pragma Warnings Off without On.
* gnat_rm.texi: Regenerate.
2018-05-23 Olivier Hainque <hainque@adacore.com>
* libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
* libgnat/g-excact.adb: Implement.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
is present, verify its legality when the domain of iteration is a
GNAT-specific formal container, as is already done for arrays and
predefined containers.
2018-05-23 Yannick Moy <moy@adacore.com>
* sem_util.adb (Enclosing_Declaration): Fix the case of a named number
declaration, which was not taken into account.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
synchronized suspension.
* rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
Ada.Synchronous_Task_Control and routines Suspend_Until_True and
Wait_For_Release.
* sem_elab.adb: Document switch -gnatd_s.
(In_Task_Body): New routine.
(Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
body when the current construct denotes a synchronous suspension call,
and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
is in effect.
(Is_Synchronous_Suspension_Call): New routine.
* switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
-gnatd_s.
2018-05-23 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_DT): Restrict the initialization of
External_Tag and Expanded_Name to an empty string to the case where
both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
restricted runtimes are compiled with pragma Discard_Names.
* doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/implementation_defined_characteristics.rst: Add
documentation.
* gnat_rm.texi: Regenerate.
2018-05-23 Maroua Maalej <maalej@adacore.com>
* sem_spark.adb: Fix of some permission rules of pointers in SPARK.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
iteration of an Ada2012 loop is performed to determine the type of the
domain, but full analysis is performed once the loop is rewritten as a
while-loop during expansion. The pre-analysis suppresses expansion; it
must also suppress the generation of freeze nodes, which may otherwise
appear in the wrong scope before rewritting.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb: Update the section on suppressing elaboration warnings.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
Is_Elaboration_Target.
(Is_Elaboration_Target): New routine.
(Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
(Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
(Set_Is_Elaboration_Warnings_OK_Id): Use predicate
Is_Elaboration_Target.
* einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
with occurrences in nodes.
(Is_Elaboration_Target): New routine.
* sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
elaboration target is subject to pragma Warnings (Off, ...).
2018-05-23 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Type_Info): Remove obsolete stuff.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
(Is_Elaboration_Warnings_OK_Id): New routine.
(Set_Is_Elaboration_Warnings_OK_Id): New routine.
(Write_Entity_Flags): Output Flag304.
* einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
occurrences in entities.
(Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
(Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
Inline.
* sem_attr.adb (Analyze_Access_Attribute): Capture the state of
elaboration warnings.
* sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
elaboration warnings.
* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
state of elaboration warnings.
(Analyze_Subprogram_Body_Helper): Capture the state of elaboration
warnings.
(Analyze_Subprogram_Declaration): Capture the state of elaboration
warnings.
* sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
elaboration warnings.
(Analyze_Single_Task_Declaration): Capture the state of elaboration
warnings.
(Analyze_Task_Type_Declaration): Capture the state of elaboration
warnings.
* sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
of elaboration warnings.
(Analyze_Generic_Subprogram_Declaration): Capture the state of
elaboration warnings.
* sem_elab.adb: Add a section on suppressing elaboration warnings.
Type Processing_Attributes includes component Suppress_Warnings
intended to suppress any elaboration warnings along a path in the
graph. Update Initial_State to include a value for this component.
Types Target_Attributes and Task_Attriutes include component
Elab_Warnings_OK to indicate whether the target or task has elaboration
warnings enabled. component Elab_Warnings_OK.
(Build_Access_Marker): Propagate attribute
Is_Elaboration_Warnings_OK_Node from the attribute to the generated
call marker.
(Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
(Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
(Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
(Process_Conditional_ABE_Access): Suppress futher elaboration warnings
when already in this mode or when the attribute or target have warnings
suppressed.
(Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
if warnings are suppressed.
(Process_Conditional_ABE_Call): Suppress further elaboration warnings
when already in this mode, or the target or call have warnings
suppressed.
(Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
warnings are suppressed.
(Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
warnings are suppressed.
(Process_Conditional_ABE_Instantiation): Suppress further elaboration
warnings when already in this mode or when the instantiation has
warnings suppressed.
(Process_Conditional_ABE_Instantiation_Ada): Do not emit any
diagnostics if warnings are suppressed.
(Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
(Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
(Process_Task_Object): Suppress further elaboration warnings when
already in this mode, or when the object, activation call, or task type
have warnings suppressed. Update the processing state to indicate that
the path goes through a task body.
* sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
references.
(Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
* sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
attribute references.
2018-05-23 Piotr Trojanek <trojanek@adacore.com>
* einfo.ads: Minor reformatting.
2018-05-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): If expression is an
anonymous_access_to_ subprogram formal, apply a conversion to force an
accsssibility check that will fail statically, enforcing 3.10.2 (13).
2018-05-23 Daniel Mercier <mercier@adacore.com>
* gnat1drv.adb: Turn off length expansion in CodePeer mode.
2018-05-23 Bob Duff <duff@adacore.com>
* freeze.adb: (Check_Address_Clause): Deal with build-in-place
aggregates in addition to build-in-place calls.
2018-05-23 Bob Duff <duff@adacore.com>
* einfo.ads: Minor reformatting.
* sem_ch3.adb: Likewise.
* sinfo.ads: Likewise.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
initialization when the component type has predicates.
* exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
allocation when the component type has predicates.
2018-05-23 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
Minor reformatting.
2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
original function spec into the generated function spec due to
expansion of expression functions during analysis.
(Analyze_Subprogram_Body_Helper): Modify check on formal parameter
references from the body to the subprogram spec in the case of
expression functions because of inconsistances related to having a
generated body.
* libgnarl/s-osinte__android.ads: Flag parameters as unused.
* libgnarl/s-osinte__lynxos178e.ads: Likewise.
* libgnarl/s-osinte__qnx.adb: Likewise.
* libgnarl/s-osinte__qnx.ads: Likewise.
2018-05-22 Doug Rupp <rupp@adacore.com>
* init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
AArch64.
2018-05-22 Olivier Hainque <hainque@adacore.com>
* 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).
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
code for a transient component in line with the rest of the
initialization code, rather than before the aggregate. This ensures
that the component has proper visibility of the discriminants.
2018-05-22 Jerome Lambourg <lambourg@adacore.com>
* adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
number of CPUs.
2018-05-22 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-qnx.c: Properly restore link register in signal trampoline.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
conversions before extracting the value of the expression.
* exp_ch3.adb (Default_Initialize_Object): Optimize the default
initialization of an array of scalars.
(Get_Simple_Init_Val): Add processing for array types. Remove the
processing of strings because this case is already handled by the array
case.
(Needs_Simple_Initialization): Moved to Sem_Util.
(Simple_Init_Array_Type): New routine.
(Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
facilities from Sem_Util.
(Simple_Initialization_OK): New routine.
* exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
* exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
an array of scalars.
* sem_prag.adb (Analyze_Float_Value): New routine.
(Analyze_Integer_Value): New routine.
(Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
to handled the extended form of the pragma.
(Analyze_Type_Value_Pair): New routine.
* sem_util.adb: Add invalid value-related data structures.
(Examine_Array_Bounds): New routine.
(Has_Static_Array_Bounds): Reimplemented.
(Has_Static_Non_Empty_Array_Bounds): New routine.
(Invalid_Scalar_Value): New routine.
(Needs_Simple_Initialization): Moved from Exp_Ch3.
(Set_Invalid_Scalar_Value): New routines.
* sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
(Invalid_Scalar_Value): New routine.
(Needs_Simple_Initialization): Moved from Exp_Ch3.
(Set_Invalid_Scalar_Value): New routines.
* snames.ads-tmpl: Add names for the salar type families used by pragma
Initialize_Scalars.
2018-05-22 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
string when pragma No_Tagged_Streams is applicable to the tagged type,
and initialize the Expanded_Name with an empty string when pragma
Discard_Names is applicable to the tagged type.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
formal subprogram is never subtype conformqnt, and thus cannot be the
prefix of 'Access. Reject as well the attribute when applied to a
renaming of a formal subprogram.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb (Build_Array_Init_Proc): Update the call to
Needs_Simple_Initialization.
(Build_Init_Statements): Update the call to Get_Simple_Init_Val.
(Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
profile and comment on usage.
(Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
Sloc of a value obtained from aspect Default_Value because this could
potentially replicate large trees. The proper Sloc is now set in
Get_Simple_Init_Val.
(Get_Simple_Init_Val): Reorganized by breaking the various cases into
separate routines. Eliminate the use of global variables.
(Init_Component): Update the call to Get_Simple_Init_Val.
(Needs_Simple_Initialization): Update the parameter profile and all
uses of T.
(Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
and set the proper Sloc.
* exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
comment on usage.
(Needs_Simple_Initialization): Update the parameter profile.
2018-05-22 Patrick Bernardi <bernardi@adacore.com>
* sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
user tries to use a subtype indication as a discriminant constraint.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
of N_Reduction_Expression and N_Reduction_Expression_Parameter.
* par-ch4.adb: Remove parsing routines for reduction expressions.
* sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
sem_spark.adb, sprint.adb: Remove analysis routines for reduction
expressions.
2018-05-22 Arnaud Charlet <charlet@adacore.com>
* sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
Relaxed_RM_Semantics mode.
2018-05-22 Arnaud Charlet <charlet@adacore.com>
* comperr.adb (Delete_SCIL_Files): Take into account
N_Generic_Package_Renaming_Declaration.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
private, use the full view if available, because it may include renamed
discriminants whose values are stored in the corresponding
Stored_Constraint.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
defined on packages that are actuals for formal packages, in order to
set/reset the visibility of the formals of a formal package with given
actuals, when there are subsequent uses of those formals in the
enclosing generic, as required by RN 12.7 (10).
* atree.ads, atree.adb: Add operations for Elist30.
* atree.h: Add Elist30.
* sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
that are not defaulted and are thus not visible within the current
instance.
(Check_Formal_Packages): Reset visibility of formals of a formal
package that are not defaulted, on exit from current instance.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
non-'Result output appears in the output list of a function.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb (Build_Array_VS_Func): Reimplemented.
(Build_Record_VS_Func): Reimplemented.
(Expand_N_Attribute): Reimplement the handling of attribute
'Valid_Scalars.
* sem_attr.adb (Analyze_Attribute): Reimplement the handling of
attribute 'Valid_Scalars.
* sem_util.adb (Scalar_Part_Present): Reimplemented.
(Validated_View): New routine.
* sem_util.ads (Scalar_Part_Present): Update the parameter profile and
comment on usage.
(Validated_View): New routine.
* doc/gnat_rm/implementation_defined_attributes.rst: Update the
documentation of attribute 'Valid_Scalars.
* gnat_rm.texi: Regenerate.
2018-05-22 Bob Duff <duff@adacore.com>
* binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
the spec of a SAL_Interface package.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
entity E within a generic unit, indicate that there are no remaining
delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
entity E is not frozen yet but the aspects should not be reanalyzed at
the freeze point, which may be outside of the generic and may not have
the proper visibility.
2018-05-22 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
the new --split-line-before-record, --indent-named-statements and
--no-align-modes gnatpp switches.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
a second argument that is a constant of a given string value.
2018-05-22 Doug Rupp <rupp@adacore.com>
* sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.
2018-05-22 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.
2018-05-22 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
delayed aspects, analyze them now, os that the representation of the
type (size, bounds) can be computed and validated.
2018-05-22 Olivier Hainque <hainque@adacore.com>
* libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
executable code section boundaries.
2018-05-22 Javier Miranda <miranda@adacore.com>
* 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.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
reformattings.
2018-05-22 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
(Freeze_Subprogram_Body, Install_Body): Modify calls to
In_Same_Declarative_Part.
* sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
verify pragma declaration is within the same declarative list with
corresponding error message.
* sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
sem_ch12.adb and generalized to be useful outside the scope of
freezing.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
categorization of the unit after processing the aspects in case one of
its aspects is converted into a categorization pragma.
2018-05-21 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
declaration with an explicit address clause and a type with default
initialization, if the declaration carries an aspect
Suppress_Initialization.
2018-05-21 Daniel Mercier <mercier@adacore.com>
* pprint.adb: Use mixed case for attribute names.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
Analyze_Aspect_Specifications_On_Body_Or_Stub.
(Analyze_Subprogram_Body_Helper): Rename the calls to
Analyze_Aspect_Specifications_On_Body_Or_Stub.
* sem_ch9.adb (Analyze_Entry_Body): Rename the call to
Analyze_Aspect_Specifications_On_Body_Or_Stub.
* sem_ch10.adb: Add with and use clause for Sem_Ch13.
(Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
prior to analyzing its aspects.
(Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
stub prior to analyzing its aspects. Save and restore the configuration
switches.
(Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
prior to analyzing its aspects.
* sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
* sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
* sem_prag.adb: Code reformatting.
(Analyze_Refined_Depends_Global_Post): Consider task body stubs.
2018-05-21 Jerome Lambourg <lambourg@adacore.com>
* gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
for QNX.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_cg.adb: Remove with and use clause for Exp_Disp.
* exp_ch9.adb: Remove with and use clause for Exp_Disp.
* exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
(Is_Predefined_Internal_Operation): Moved to Sem_Util.
* exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
(Is_Predefined_Internal_Operation): Moved to Sem_Util.
* exp_dist.adb: Remove with and use clause for Exp_Disp.
* freeze.adb: Remove with and use clause for Exp_Disp.
* sem_cat.adb: Remove with and use clause for Exp_Disp.
* sem_ch6.adb: Remove with and use clause for Exp_Disp.
* sem_ch12.adb: Remove with and use clause for Exp_Disp.
* sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
primitives.
* sem_util.adb: Remove with and use clause for Exp_Disp.
(Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
(Is_Predefined_Internal_Operation): Moved from Exp_Disp.
* sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
Exp_Disp.
(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
(Is_Predefined_Internal_Operation): Moved from Exp_Disp.
2018-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Valid_Conversion): Improve error message on an illegal
type conversion whose expression has a limited view of a type.
2018-05-21 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Build_Formal_Container_Iteration): If source has
explicit name for iterator loop, preserve that name in expanded
construct, for possible use in exit statements.
2018-05-21 Javier Miranda <miranda@adacore.com>
* sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
spec of a unit has Ada 2012 membership tests with multiple choices and
the unit body is not compiled under Ada 2012 mode.
2018-05-21 Doug Rupp <rupp@adacore.com>
* sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
pregs.
(CFI_COMMON_REGS): Restore LR jic probed from prologue.
(REGNO_PC_OFFSET): Change to correct value for Aarch64.
2018-05-21 Jose Ruiz <ruiz@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
libgnarl/s-tassta.adb: Minor typo fixes
2018-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
indexed call originally in prefix forn is itself the prefix of a
further call.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
* sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
type.
(Not_Null_Range): Same as above.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch3.adb: Minor reformatting.
* exp_ch6.adb: Likewise.
* freeze.adb: Likewise.
* inline.adb: Likewise.
* sem_util.adb: Likewise.
2018-05-21 Yannick Moy <moy@adacore.com>
* inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
conversion instead of an unchecked type conversion when inlining a
return statement, unless type qualification is required (for character
and string literal) or no check can result from the conversion (for
access types).
* opt.ads: Update comment.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
model of the compilation unit spec, if any.
* sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
model of the compilation unit spec, if any.
* sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
parent compilation unit spec, if any.
* sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
model of the main unit.
(Is_Same_Unit): The routine now uses Unit_Entity.
(Is_Subunit): Removed.
(Normalize_Unit): Removed.
(Unit_Entity): New routine.
* sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
Elaboration_Checks. The analysis now ensures that the pragma appears at
the configuration level, and on the initial declaration of a unit.
Other placements are either flagged as illegal, or ignored.
(Check_Duplicate_Elaboration_Checks_Pragma): New routine.
(Ignore_Elaboration_Checks_Pragma): New routine.
* sem_util.adb (Install_Elaboration_Model): New routine.
* sem_util.ads (Install_Elaboration_Model): New routine.
* doc/gnat_rm/implementation_defined_pragmas.rst: Update the
documentation of pragma Elaboration_Checks.
* gnat_rm.texi: Regenerate.
2018-05-21 Olivier Hainque <hainque@adacore.com>
* 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.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
* libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
* libgnarl/a-taside.ads (Tasking_State): Likewise.
* libgnat/a-calend.ads (Clock_Time): Likewise.
2018-05-21 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
call notation in inlined call in GNATprove mode.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Is_External_State): An abstract state is also external
when it is declared with option "synchronous".
* einfo.ads: Update the documentation of synthesized attribute
Is_External_State.
* sem_util.adb (Find_Simple_Properties): New routine.
(Is_Enabled_External_Property): New routine.
(State_Has_Enabled_Property): Reimplemented. The two flavors of option
External have precedence over option Synchronous when determining
whether a property is in effect.
2018-05-21 Yannick Moy <moy@adacore.com>
* sem_eval.adb (Static_Length): Take into account case of variable of
subtype string literal.
2018-05-21 Olivier Hainque <hainque@adacore.com>
* 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.
2018-05-21 Olivier Hainque <hainque@adacore.com>
* 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.
2018-05-21 Olivier Hainque <hainque@adacore.com>
* 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.
2018-05-21 Olivier Hainque <hainque@adacore.com>
* 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.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
* einfo.adb (Has_Discriminants): Stronger assertion.
(Set_Has_Discriminants): Stronger assertion.
* sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
the stronger assertion on Has_Discriminant.
(Uninstall_Discriminants_And_Pop_Scope): Same as above.
* sem_util.adb (New_Copy_Tree): Same as above.
* sem_ch7.adb (Generate_Parent_References): Prevent calls to
Has_Discriminant on non-type entities that might happen when the
compiled code has errors.
* sem_ch3.adb (Derived_Type_Declaration): Only call
Set_Has_Discriminant on type entities.
2018-05-21 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
code generation.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
* lib.ads: Fix typo in enumeration in comment.
2018-05-21 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
attribute reference is legal within a generic unit when the prefix is a
formal private type.
2018-05-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
delegate the secondary stack management when there is no suitable
transient context, and the transient scope was intended to manage the
secondary stack because this causes premature reclamation. Change the
transient scope creation logic by special casing assignment statements
of controlled components for type initialization procedures.
(Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
the comment on usage.
(Find_Transient_Context): Change the initinte loop into a while loop.
Iterations schemes and iterator specifications are not valid transient
contexts because they rely on special processing. Assignment statements
are now treated as a normal transient context, special cases are
handled by the caller. Add special processing for pragma Check.
(Is_OK_Construct): Removed. Its functionality has been merged in
routine Find_Transient_Context.
* sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
retrieve the subprogram being invoked. Use a more accurate predicate
(Requires_Transient_Scope) to determine that the function will emply
the secondary stack.
2018-05-21 Piotr Trojanek <trojanek@adacore.com>
* 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.
2018-05-04 John Marino <gnugcc@marino.st>
PR ada/85635
* link.c (BSD platforms): Add missing backslash.
2018-04-27 Eric Botcazou <ebotcazou@adacore.com>
PR ada/85540
* init.c (__gnat_handle_vms_condition): Add missing parentheses.
2018-04-25 Eric Botcazou <ebotcazou@adacore.com>
PR ada/85007
* gnat_ugn.texi: Regenerate.
2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/85007
* gnatlink.adb (Gnatlink): Remove handling of -b switch.
* doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
Remove documentation of -b switch.
2018-03-23 Eric Botcazou <ebotcazou@adacore.com>
PR ada/85036
* gnatlink.adb (Process_Args): Drop existing link switches if multiple
switches are passed for --LINK.
2018-03-12 Eric Botcazou <ebotcazou@adacore.com>
PR ada/82813
* gcc-interface/misc.c (gnat_post_options): Disable string overflow
warnings.
2018-03-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
Consider only entities for objects.
2018-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
$(GNATLIBCFLAGS).
(OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).
2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
guarding the overflow check emitted for the upper bound of a floating-
point conversion.
2018-03-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* libgnat/i-cexten.ads (Float_128): New type.
2018-02-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
false if the component type is a pointer.
2018-01-11 Gary Dismukes <dismukes@adacore.com>
* exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
result of Get_Simple_Init_Value and pass the source location of the
object declaration's object_definition.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
properly object declarations with initializations that are
build-in-place function calls, when there is an address specification,
either as an aspect specification or an explicit attribute
specification clause, for the initialized object.
* freeze.adb (Check_Address_Clause): Do not remove side-effects from
initial expressions in the case of a build-in-place call.
2018-01-11 Piotr Trojanek <trojanek@adacore.com>
* sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
private (sub)type; refactor to avoid early return statement.
(Not_Null_Range): Same as above.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
concurrent, nor effectively volatile.
* ghost.adb (Check_Ghost_Type): New routine.
* ghost.ads (Check_Ghost_Type): New routine.
* sem_util.adb (Is_Declaration): Reimplemented. The routine can now
consider specific subsets of declarations.
(Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
replicated by Is_Declaration.
* sem_util.ads (Is_Declaration): New parameter profile. Update the
comment on usage.
(Is_Declaration_Other_Than_Renaming): Removed.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
as Part_Of consituents of single protected types are illegal when they
take place inside a protected function.
(Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
enclosing function.
(Is_Protected_Part_Of_Constituent): New routine.
(Within_Function): New routine.
2018-01-11 Arnaud Charlet <charlet@adacore.com>
Bump copyright notices to 2018.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
Minor reformatting.
2018-01-11 Justin Squirek <squirek@adacore.com>
* par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
to make sure a given expression function is properly parenthesized.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
categorization of a subprogram body which does not complete a previous
declaration.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
scope of package Ada is Standard.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
subcomponent of the current entity when building the body for a dynamic
predicate function for a record with composite subcomponents.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
Establish_Transient_Scope.
(Convert_To_Assignments): Update the call to Establish_Transient_Scope.
(Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
* exp_ch6.adb (Expand_Call_Helper): Update the call to
Establish_Transient_Scope.
(Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
Establish_Transient_Scope.
* exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
management of the secondary stack to an enclosing scope if there is no
suitable construct to wrap, and the transient scope was intended to
manage the secondary stack.
(Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
is a valid boundary for a transient expression which comes from the
statements of the alternative, otherwise alternatives cannot be
wrapped. Assignments of controlled objects which have controlled
actions suppressed now stop the traversal as there is no point in
looking for an enclosing construct. Add several N_xxx_Body choices to
the termination conditions for completeness.
* exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
and the associated comment on usage.
* exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
Establish_Transient_Scope.
(Add_Write_After): Update the call to Establish_Transient_Scope.
* sem_res.adb (Check_Initialization_Call): Removed.
(Resolve_Actuals): Account for additional cases where finalization
actions are required by utilizing predicate Needs_Finalization rather
than Is_Controlled.
(Resolve_Call): Type initialization procedures can now utilize
transient scopes to manage the secondary stack, thus preventing leaks
during initialization. Remove the previous kludgy algorithm which
attempts to manage the secondary stack at the object creation site.
2018-01-11 Jerome Lambourg <lambourg@adacore.com>
* libgnat/g-soliop__qnx.ads: New.
* adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
for QNX.
2018-01-11 Bob Duff <duff@adacore.com>
* par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
a null procedure occurs in a protected definition.
2018-01-11 Bob Duff <duff@adacore.com>
* binderr.ads, namet.ads: Minor reformatting.
2018-01-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
xml2gnat.
2018-01-11 Bob Duff <duff@adacore.com>
* binde.adb (Force_Elab_Order): Give an error if there are duplicate
unit names.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Freeze_Expr_Types): If an access value is the
controlling argument of a dispatching call. freeze the corresponding
designated type.
2018-01-11 Ben Brosgol <brosgol@adacore.com>
* doc/Makefile: Add Sphinx option -W to treat warnings as errors.
2018-01-11 Ben Brosgol <brosgol@adacore.com>
* doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
corrections.
* gnat_rm.texi: Regenerate.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
formsl type corresponding to the actual fixed point type is private,
because in this case there can be no suspicious arithmetic operations
in the generic unless they reference a formal subprogram. Clarify
warning.
2018-01-11 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): No action done for functions
returning class-wide types since it requires generating code using
'reference and the CCG target has no secondary stack.
* gnat1drv.adb: Disable building static dispatch tables when generating
C code.
2018-01-11 Piotr Trojanek <trojanek@adacore.com>
* 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.
2018-01-11 Pascal Obry <obry@adacore.com>
* libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
2018-01-11 Bob Duff <duff@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
to match what the Libadalang-based version does.
* doc/gnat_ugn/about_this_guide.rst: Update reference.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Uses_SS): A controlled type requires the secondary stack
if it contains at least one component declaration employing a function
call returning on the secondary stack.
2018-01-11 Yannick Moy <moy@adacore.com>
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
Update description of restriction SPARK_05 with SPARK 2014.
* gnat_rm.texi: Regenerate.
2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
* doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
sem_res.adb, sem_util.adb: Minor reformatting.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
has a delayed aspect which must be processed at the point the type is
frozen. This mimics what is done when the predicate is provided by a
source aspect.
2018-01-11 Doug Rupp <rupp@adacore.com>
* init.c (vxworks): Add macro checks for __aarch64__.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Add_Failure_Expression): New routine.
(Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
* sem_util.adb (Is_Current_Instance): Code cleanup.
2018-01-11 Patrick Bernardi <bernardi@adacore.com>
* 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.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
legality of an inherited operation that may require overriding, ignore
primitive_wrappers that correspond to explicit operations that override
an interface primitive.
* exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
operation to which the class-wide expression applies is a protected op.
with a primitive_wrapper, verify that the updated inherited expression
does not contain an internal call to a protected function. This
completes the implementation of AI12-0166.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* ali.adb: Document the remaining letters available for ALI lines.
(Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
* ali.ads: Update type With_Record. Field
Implicit_With_From_Instantiation is no longer in use. Add field
Implicit_With.
* csinfo.adb (CSinfo): Remove the setup for attribute
Implicit_With_From_Instantiation.
* lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
either implicitly or explicitly withed.
(Is_Implicit_With_Clause): New routine.
(Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
confusion with the with clause attribute by the same name.
(Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
* rtsfind.adb (Maybe_Add_With): Code cleanup.
* sem_ch8.adb (Present_System_Aux): Code cleanup.
* sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
for a parent unit.
(Implicit_With_On_Parent): Mark the with clause as generated for a
parent unit.
* sem_ch12.adb (Inherit_Context): With clauses inherited by an
instantiation are no longer marked as Implicit_With_From_Instantiation
because they are already marked as implicit.
* sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
which marks implicit with clauses as related to an instantiation.
* sinfo.adb (Implicit_With_From_Instantiation): Removed.
(Parent_With): New routine.
(Set_Implicit_With_From_Instantiation): Removed.
(Set_Parent_With): New routine.
* sinfo.ads: Update the documentation of attribute Implicit_With.
Remove attribute Implicit_With_From_Instantiation along with
occurrences in nodes. Add attribute Parent_With along with occurrences
in nodes.
(Implicit_With_From_Instantiation): Removed along with pragma Inline.
(Parent_With): New routine along with pragma Inline.
(Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
(Set_Parent_With): New routine along with pragma Inline.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Find_Enclosing_Scope): Return the unique defining
entity when the enclosing construct is a body.
2018-01-11 Patrick Bernardi <bernardi@adacore.com>
* exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
Secondary_Stack_Size handling as a pragma is now generated for the
corresponding aspect instead of an attribute. Pragma expression is
relocated instead of evaluated. Discriminant of the corresponding
record type is referenced rather than the type discriminant.
(Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
Secondary_Stack_Size rep item checks to only look for the pragma rep.
* sem_ch13.adb (Analyze_One_Aspect): Transform
Aspect_Secondary_Stack_Size into a pragma instead of an attribute
because the attribute does not have visibility on a task type's
discriminants when the type's definition is expanded.
(Analyze_Attribute_Definition_Clause): Remove handling of
Attribute_Secondary_Stack_Size.
* snames.adb-tmpl, snames.ads-tmpl: Remove
Attribute_Secondary_Stack_Size, no longer used.
2018-01-11 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb: Minor comment fix.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Process_Action): Do not abandon the inspection of an
individual action because the action may denote a complex expression,
such as a case statement, which in turn may contain additional
transient objects.
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
analysis on a copy of the expression with a copy of the index variable,
because full expansion will rewrite construct into a loop with the
original loop variable.
* exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
expression is an iterated component association. Full analysis takes
place when construct is rewritten as a loop.
(In_Place_Assign_OK, Safe_Component): An iterated_component_association
is not safe for in-place assignment.
* sem_util.adb (Remove_Entity): Handle properly the case of an isolated
entity with no homonym and no other entity in the scope.
2018-01-11 Justin Squirek <squirek@adacore.com>
* sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
message to be printed on the pragma argument identifier.
2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
entity of the generated invariant procedure in order to construct a
proper entity chain.
2018-01-11 Piotr Trojanek <trojanek@adacore.com>
* sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
comment.
2018-01-11 Arnaud Charlet <charlet@adacore.com>
* einfo.ads, einfo.adb (Activation_Record_Component,
Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
Allow E_Discriminant.
2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
for atomic access once the component size is taken into account and
also do it if the component type is Atomic or Volatile_Full_Access.
2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
* gnatvsn.ads: Bump copyright year.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
as polynomial.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
as polynomial.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* gcc-interface/utils.c (gnat_types_compatible_p): Handle
polynomial TYPE_VECTOR_SUBPARTS.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* gcc-interface/misc.c (enumerate_modes): Handle polynomial
GET_MODE_NUNITS.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
* gnat_ugn.texi: Bump @copying's copyright year.
* gnat_rm.texi: Likewise.
Copyright (C) 2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.