2018-01-25  Release Manager

	* GCC 7.3.0 released.

2017-12-14  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
	of the enclosing record type if it is not already set.

2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Subprogram_Body_to_gnu): Initialize locus.

2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (process_freeze_entity): Be prepared for a
	package without body.

2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity): Robustify test for types
	descendant of System.Address.
	(gnat_to_gnu_subprog_type): Likewise.

2017-12-04  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* gcc-interface/Makefile.in (RTEMS): Use s-osprim.adb.
	* s-osprim-rtems.adb: New file.
	* s-osinte-rtems.adb (pthread_cond_t): Fix alignment.
	(pthread_mutexattr_t): Likewise.
	(pthread_rwlockattr_t): Likewise.
	(pthread_rwlock_t): Likewise.
	(time_t): Use 64-bit integer.

2017-12-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* s-osinte-rtems.ads (pthread_cond_t): Use correct size and
	alignment.
	(pthread_mutex_t): Likewise.
	(pthread_rwlock_t): Likewise.

2017-11-10  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (convert) <RECORD_TYPE>: Add comment and do
	not fall through to the next case.
	<ARRAY_TYPE>: Deal specially with a dereference from another array
	type with the same element type.

2017-10-21  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/Makefile.in: Remove bogus settings for VxWorks.

2017-10-05  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/82393
	* mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete.
	* sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin.

2017-09-15  Martin Liska  <mliska@suse.cz>

	Backport from mainline
	2017-08-29  Martin Liska  <mliska@suse.cz>

	PR other/39851
	* gcc-interface/trans.c (Pragma_to_gnu): Set argument to NULL.

2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (promote_object_alignment): New function taken
	from...
	(gnat_to_gnu_entity) <E_Variable>: ...here.  Invoke it.
	(gnat_to_gnu_field): If the field is Atomic or VFA, invoke it and
	create a padding type on success before doing the atomic check.

2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Apply the
	promotion to static memory earlier in the processing.

2017-09-09  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_util.ads (Set_Rep_Info): New inline procedure.
	* sem_util.adb (Set_Rep_Info): Implement it.
	* sem_ch3.adb (Process_Subtype): If the case of a constraint present,
	always copy the representation aspects onto the subtype.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Only set the TYPE_ALIGN_OK
	and TYPE_BY_REFERENCE_P flags on types after various promotions.
	* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
	Consider all kinds of entities.

2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/62235
	* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
	for Itypes that are E_Record_Subtype with a cloned subtype.
	<E_Record_Subtype>: Use the DECL of the cloned type directly, if any.

2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (unchecked_convert): When the result type is a
	non-biased integral type with size 0, set the result to 0 directly.

2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
	there is no target, do not create a temporary for the return value for
	an allocator either.

2017-09-05  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (pos_to_constructor): Skip conversions to an
	unconstrained array type.

2017-08-14  Release Manager

	* GCC 7.2.0 released.

2017-07-15  John Paul Adrian Glaubitz  <glaubitz@physik.fu-berlin.de>

	PR ada/81446
	* system-linux-m68k.ads: Add pragma No_Elaboration_Code_All.
	(Backend_Overflow_Checks): Set to True.

2017-06-15  Nicolas Boulenguez  <nicolas.boulenguez@free.fr>

	PR ada/81105
	* gcc-interface/Makefile.in (x86 kfreebsd): Adjust system.ads setting.
	(i[3456]86-pc-gnu): Likewise.
	(x86_64 kfreebsd): Likewise.

2017-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/81070
	* s-interr-hwint.adb: Reinstate.
	* gcc-interface/Makefile.in (RTEMS): Use it again.

2017-06-12  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	Backport from mainline
	2017-06-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* Makefile.in (rtems): Use TLS implementation for s-tpopsp.adb.
	* s-tpopsp-rtems.adb: Delete.

2017-05-22  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
	for Itypes that are E_Access_Subtype.
	<E_Access_Subtype>: Use the DECL of the base type directly.

2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/80784
	Backport from mainline

	2017-05-02  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Freeze_Type): Do not generate an invariant
	procedure body for a local (sub)type declaration within a
	predicate function. Invariant checks do not apply to these, and
	the expansion of the procedure will happen in the wrong scope,
	leading to misplaced freeze nodes.

2017-05-12  Eric Botcazou  <ebotcazou@adacore.com>

	* system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
	instead of Word_Size.

	Revert
	2017-03-28  Andreas Schwab  <schwab@suse.de>

	PR ada/80117
	* system-linux-aarch64-ilp32.ads: New file.
	* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
	from LIBGNAT_TARGET_PAIRS.
	(LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
	(LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
	LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
	or -mabi=ilp32, resp.

2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>

	Back port from mainline
	2017-05-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR ada/80626
	* system-linux-x86.ads (Memory_Size): Use Long_Integer'Size
	instead of Word_Size.

2017-05-02  Release Manager

	* GCC 7.1.0 released.

2017-04-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* system-linux-s390.ads: Use Long_Integer'Size to define
	Memory_Size.

2017-04-04  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch3.adb (Build_Derived_Record_Type): Fix long line.

2017-04-03  Jonathan Wakely  <jwakely@redhat.com>

	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
	* g-socket.adb (To_Host_Entry): Fix typo in comment.
	* gnat_ugn.texi: Fix typo.
	* raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
	* s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
	* sem_ch3.adb (Build_Derived_Record_Type): Likewise.
	* sem_util.adb (Mark_Coextensions): Likewise.
	* sem_util.ads (Available_Full_View_Of_Component): Likewise.

2017-03-28  Andreas Schwab  <schwab@suse.de>

	PR ada/80117
	* system-linux-aarch64-ilp32.ads: New file.
	* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
	from LIBGNAT_TARGET_PAIRS.
	(LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
	(LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
	LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
	or -mabi=ilp32, resp.

2017-03-14  James Cowgill  <James.Cowgill@imgtec.com>

	* s-osinte-linux.ads (struct_sigaction): Use correct type for sa_flags.

2017-03-08  Thanassis Tsiodras  <ttsiodras@gmail.com>

	PR ada/79903
	* socket.c (__gnat_gethostbyaddr): Add missing test for __rtems__.

2017-03-08  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/79945
	* system-linux-ppc.ads (Default_Bit_Order): Use Standard's setting.

	* system-linux-arm.ads (Default_Bit_Order): Likewise.
	* system-linux-mips.ads (Default_Bit_Order): Likewise.
	* system-linux-armeb.ads: Delete.
	* system-linux-mipsel.ads: Likewise.
	* gcc-interface/Makefile.in (MIPS/Linux): Adjust.
	(ARM/Linux): Likewise.

2017-02-24  Jakub Jelinek  <jakub@redhat.com>

	PR c/79677
	* gcc-interface/misc.c (gnat_handle_option): Pass true to
	handle_generated_option GENERATED_P.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_field): Do not remove the wrapper
	around a justified modular type if it doesn't have the same scalar
	storage order as the enclosing record type.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (gnat_to_gnu): Do not apply special handling
	of boolean rvalues to function calls.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (fold_bit_position): New function.
	(rest_of_record_type_compilation): Call it instead of bit_position to
	compute the field position and remove the call to remove_conversions.
	(compute_related_constant): Factor out the multiplication in both
	operands, if any, and streamline the final test.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (return_value_ok_for_nrv_p): Add sanity check.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c: Include demangle.h.
	(is_cplusplus_method): Return again true for a primitive operation
	only if it is dispatching.  For a subprogram with an interface name,
	call the demangler to get the number of C++ parameters and compare it
	with the number of Ada parameters.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): If
	there is no end label, put the location of the At_End procedure on
	the call to the procedure.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/misc.c (gnat_type_max_size): Try to return a meaningful
	value for array types with TYPE_INDEX_TYPE set on their domain type.
	* gcc-interface/utils.c (max_size): For operations and expressions, do
	not build a new node if the operands have not changed or are missing.

2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
	argument when recursing on TRUTH_NOT_EXPR.

2017-02-12  John Marino  <gnugcc@marino.st>

	* system-freebsd-x86.ads: Rename into...
	* system-freebsd.ads: ...this.
	(Default_Bit_Order): Define using Standard'Default_Bit_Order.
	* gcc-interface/Makefile.in: Support aarch64-freebsd.
	(x86-64/FreeBSD): Adjust to above renaming.
	(i386/FreeBSD): Likewise.

2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>

	* comperr.adb: Update FSF bug reporting URL.

2017-02-01  Eric Botcazou  <ebotcazou@adacore.com>
            Jakub Jelinek  <jakub@redhat.com>

	PR ada/79309
	* adaint.c (__gnat_killprocesstree): Fix broken string handling.

2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR lto/79061
	* gcc-interface/utils.c (get_global_context): Pass main_input_filename
	to build_translation_unit_decl.

2017-01-23  Javier Miranda  <miranda@adacore.com>

	* sem_util.adb (New_Copy_Tree): Code cleanup:
	removal of the internal map (ie. variable Actual_Map, its
	associated local variables, and all the code handling it).
	* sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
	force loading of the System package when processing a task type.
	(Analyze_Protected_Type_Declaration): in GNATprove mode force
	loading of the System package when processing a protected type.
	* sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
	force loading of the System package when processing compilation
	unit with a main-like subprogram.
	* frontend.adb (Frontend): remove forced loading of the System
	package.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Default_Initial_Condition): If the desired type
	declaration is a derived type declaration with discriminants,
	it is rewritten as a private type declaration.
	* sem_ch13.adb (Replace_Type_References_Generic,
	Visible_Component): A discriminated private type with descriminnts
	has components that must be rewritten as selected components
	if they appear as identifiers in an aspect expression such as
	a Default_Initial_Condition.
	* sem_util.adb (Defining_Entity): support N_Iterator_Specification
	nodes.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
	* gnat1drv.adb Generate an empty object file for an ignored
	Ghost compilation unit.
	* inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.

2017-01-23  Yannick Moy  <moy@adacore.com>

	* sem_ch4.adb (Analyze_Indexed_Component_Form):
	Adapt to inlined prefix with string literal subtype.
	* inline.adb (Expand_Inlined_Call): Keep unchecked
	conversion inside inlined call when formal type is constrained.

2017-01-23  Javier Miranda  <miranda@adacore.com>

	* sem_util.adb (New_Copy_Tree): Code cleanup:
	removal of global variables. All the global variables, global
	functions and tables of this subprogram are now declared locally.

2017-01-23  Gary Dismukes  <dismukes@adacore.com>

	* exp_strm.ads: Minor reformatting and typo fixes.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
	exp_aggr.adb: Minor reformatting.
	* g-diopit.adb: minor grammar/punctuation fix in comment.
	* g-byorma.ads: minor fix of unbalanced parens in comment.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* par.adb: Update the documentation of component Labl.
	* par-ch6.adb (P_Return_Statement): Set the expected label of
	an extended return statement to Error.

2017-01-23  Tristan Gingold  <gingold@adacore.com>

	* s-boustr.ads, s-boustr.adb (Is_Full): New function.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* expander.adb: Handle N_Delta_Aggregate.

2017-01-23  Javier Miranda  <miranda@adacore.com>

	* exp_ch6.adb (Expand_Call): Improve the code that
	checks if some formal of the called subprogram is a class-wide
	interface, to handle subtypes of class-wide interfaces.

2017-01-23  Javier Miranda  <miranda@adacore.com>

	* checks.adb (Apply_Parameter_Aliasing_Checks):
	Remove side effects of the actuals before generating the overlap
	check.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* exp_strm.ads, exp_strm.ads
	(Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
	as to avoid getting the underlying type by default.
	* exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
	underlying type in the Iiput and output attribute cases when
	building their respective functions.

2017-01-23  Gary Dismukes  <dismukes@adacore.com>

	* scng.adb: Minor reformatting of error message.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Expression_Function): Do not attempt
	to freeze the return type of an expression funxtion that is a
	completion, if the type is a limited view and the non-limited
	view is available.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* par-ch4.adb (P_Aggregate_Or_Parent_Expr): Recognize delta
	aggregate construct.
	(P_Record_Or_Array_Component_Association): An array aggregate
	can start with an Iterated_Component_Association.
	* scng.adb: Modify error message on improper use of @ in earlier
	versions of the language.
	* sinfo.ads: New node kind N_Delta_Aggregate.
	* sinfo.adb: An N_Delta_Aggregate has component associations and
	an expression.
	* sem_res.adb (Resolve): Call Resolve_Delta_Aggregate.
	* sem_aggr.ads, sem_aggr.adb (Resolve_Iterated_Component_Association):
	Create a new index for each one of the choices in the association,
	to prevent spurious homonyms in the scope.
	(Resolve_Delta_Aggregate): New.
	* sem.adb: An N_Delta_Aggregate is analyzed like an aggregate.
	* exp_util.adb (Insert_Actions): Take into account
	N_Delta_Aggregate.
	* exp_aggr.ads: New procedure Expand_N_Delta_Aggregate.
	* exp_aggr.adb: New procedure Expand_N_Delta_Aggregate,
	and local procedures Expand_Delta_Array_Aggregate and
	expand_Delta_Record_Aggregate.
	* sprint.adb: Handle N_Delta_Aggregate.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch11.adb (Expand_N_Exception_Declaration): Generate an
	empty name when the exception declaration is subject to pragma
	Discard_Names.
	(Null_String): New routine.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* par-ch9.adb (P_Protected_Definition): Parse
	any optional and potentially illegal pragmas which appear in
	a protected operation declaration list.
	(P_Task_Items): Parse
	any optional and potentially illegal pragmas which appear in a
	task item list.

2017-01-23  Pascal Obry  <obry@adacore.com>

	* s-taprop-mingw.adb (Enter_Task): Initialize the Thread handle which
	is needed when a foreign thread call a Win32 API using a thread handle
	like GetThreadTimes() for example.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
	allow an 'Address clause to be specified on a prefix of a
	class-wide type.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb (Insert_Valid_Check): Ensure that the prefix of
	attribute 'Valid is a renaming of the original expression when
	the expression denotes a name. For all other kinds of expression,
	use a constant to capture the value.
	* exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
	* sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_eval.adb (Eval_Integer_Literal): Add special
	case to avoid optimizing out check if the literal appears in
	an if-expression.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
	allow an 'Address clause to be specified on a prefix of a
	class-wide type.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb (Insert_Valid_Check): Ensure that the prefix of
	attribute 'Valid is a renaming of the original expression when
	the expression denotes a name. For all other kinds of expression,
	use a constant to capture the value.
	* exp_util.adb (Is_Name_Reference): Moved to Sem_Util.
	* sem_util.ads, sem_util.adb (Is_Name_Reference): Moved from Exp_Util.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_eval.adb (Eval_Integer_Literal): Add special
	case to avoid optimizing out check if the literal appears in
	an if-expression.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Try_Primitive_Operations,
	Is_Valid_First_Argument_Of): argument is valid if it is a derived
	type with unknown discriminants that matches its underlying
	record view.
	* exp_util.adb (Expand_Subtype_From_Expr): Do not expand
	expression if its type is derived from a limited type with
	unknown discriminants, because the expansion (which is a call)
	must be expanded in the enclosing context to add the proper build-
	in-place parameters to the call.
	* lib.ads, exp_ch9.adb: Minor fixes in comments.

2017-01-23  Yannick Moy  <moy@adacore.com>

	* frontend.adb (Frontend): Do not load runtime
	unit for GNATprove when parsing failed.
	* exp_ch9.adb: minor removal of extra whitespace
	* exp_ch6.adb: minor typo in comment
	* sem_util.adb: Code cleanup.
	* exp_ch9.ads, par-ch2.adb: minor style fixes in whitespace and comment
	* a-ngcefu.adb: minor style fix in whitespace

2017-01-23  Thomas Quinot  <quinot@adacore.com>

	* scos.ads: Document usage of 'd' as default SCO kind for
	declarations.
	* par_sco.adb (Traverse_Declarations_Or_Statements.
	Traverse_Degenerate_Subprogram): New supporting routine for expression
	functions and null procedures.
	(Traverse_Declarations_Or_Statements.Traverse_One): Add
	N_Expression_Function to the subprogram case; add required
	support for null procedures and expression functions.

2017-01-23  Bob Duff  <duff@adacore.com>

	* namet.ads (Bounded_String): Decrease the size of type
	Bounded_String to avoid running out of stack space.
	* namet.ads (Append): Don't ignore buffer overflow; raise
	Program_Error instead.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb, freeze.adb, par-ch4.adb, scng.adb, sem_ch13.adb,
	sem_ch3.adb, sem_ch5.adb, sem_ch5.ads, sem_util.adb, sinfo.ads: Minor
	reformatting.
	* exp_ch9.adb: minor style fix in comment.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Allocator): Handle properly a type derived
	for a limited record extension with unknown discriminants whose
	full view has no discriminants.

2017-01-23  Yannick Moy  <moy@adacore.com>

	* exp_spark.adb: Alphabetize with clauses.

2017-01-23  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Has_Enabled_Property): Treat
	protected objects and variables differently from other variables.

2017-01-23  Thomas Quinot  <quinot@adacore.com>

	* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
	Split original Ada 95 part off into new subprogram
	below. Call that subprogram (instead of proceeding with
	AI95-0133 behaviour) if debug switch -gnatd.p is in use.
	(Adjust_Record_For_Reverse_Bit_Order_Ada_95): ... new subprogram
	* debug.adb Document new switch -gnatd.p
	* freeze.adb (Freeze_Entity.Freeze_Record_Type): Do not adjust
	record for reverse bit order if an error has already been posted
	on the record type.  This avoids generating extraneous "info:"
	messages for illegal code.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_ch3.adb (Analyze_Declarations): Correct comments
	* freeze.adb (Find_Constant): Add detection of deferred constants
	so they are not incorrectly flagged as premature.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* scans.ads: New token At_Sign. Remove '@' from list of illegal
	characters for future version of the language. '@' is legal name.
	* scng.ads, scng.adb (Scan):  Handle '@' appropriately.
	* scn.adb (Scan_Reserved_Identifier): An occurrence of '@'
	denotes a Target_Name.
	* par-ch4.adb (P_Name, P_Primary): Handle Target_Name.
	* sinfo.ads, sinfo.adb (N_Target_Name): New non-terminal node.
	(Has_Target_Names): New flag on N_Assignment_Statement, to
	indicate that RHS has occurrences of N_Target_Name.
	* sem.adb: Call Analyze_Target_Name.
	* sem_ch5.ads, sem_ch5.adb (Analyze_Target_Name): New subpogram.
	(urrent_LHS): Global variable that denotes LHS of assignment,
	used in the analysis of Target_Name nodes.
	* sem_res.adb (Resolve_Target_Name): New procedure.
	* exp_ch5.adb (Expand_Assign_With_Target_Names): (AI12-0125):
	N is an assignment statement whose RHS contains occurences of @
	that designate the value of the LHS of the assignment. If the
	LHS is side-effect free the target names can be replaced with
	a copy of the LHS; otherwise the semantics of the assignment
	is described in terms of a procedure with an in-out parameter,
	and expanded as such.
	(Expand_N_Assignment_Statement): Call
	Expand_Assign_With_Target_Names when needed.
	* exp_util.adb (Insert_Actions): Take into account N_Target_Name.
	* sprint.adb: Handle N_Target_Name.

2017-01-23  Eric Botcazou  <ebotcazou@adacore.com>

	* checks.adb: Minor fix in comment.

2017-01-23  Philippe Gil  <gil@adacore.com>

	* g-debpoo.adb (Do_Report) remove freed chunks from chunks
	count in Sort = Memory_Usage or Allocations_Count

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_ch3.adb: Code cleanup.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Move all global
	variables to the local variable section. Update the profile
	of various nested routine that previously had visibility
	of those globals. One the matching phase has completed,
	remove certain classes of clauses which are considered noise.
	(Check_Dependency_Clause): Properly detect a match between two
	'Result attributes. Update the various post-match cases to use
	Is_Already_Matched as this routine now automatically recognizes
	a previously matched 'Result attribute.
	(Is_Already_Matched): New routine.
	(Remove_Extra_Clauses): New routine.
	(Report_Extra_Clauses): Remove the detection of ... => null
	clauses as this is now done in Remove_Extra_Clauses.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Array_Aggregate): In ASIS mode do not
	report on spurious overlaps between values involving a subtype
	with a static predicate, because the expansion of such a subtype
	into individual ranges in inhibited in ASIS mode.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* sem_ch3.adb (Analyze_Declarations): Add detection
	of an edge case and delay freezing if it is present.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch3.adb, exp_spark.adb, exp_attr.adb, sem_ch9.adb, sem_prag.adb,
	sem_util.adb, sem_warn.adb, exp_ch3.adb: Minor reformatting.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_Subprogram): Ensure that all anonymous
	access-to-subprogram types inherit the convention of the
	associated subprogram.	(Set_Profile_Convention): New routine.
	* sem_ch6.adb (Check_Conformance): Do not compare the conventions
	of the two entities directly, use Conventions_Match to account
	for anonymous access-to-subprogram and subprogram types.
	(Conventions_Match): New routine.

2017-01-23  Claire Dross  <dross@adacore.com>

	* exp_spark.adb (Expand_SPARK_Attribute_Reference): For attributes
	which return Universal_Integer, force the overflow check flag for
	Length and Range_Length for types as big as Long_Long_Integer.

2017-01-23  Claire Dross  <dross@adacore.com>

	* exp_spark.adb (Expand_SPARK_Attribute_Reference):  For
	attributes which return Universal_Integer, introduce a conversion
	to the expected type with the appropriate check flags set.
	* sem_res.adb (Resolve_Range): The higher bound can be in Typ's
	base type if the range is null. It may still be invalid if it
	is higher than the lower bound. This is checked later in the
	context in which the range appears.

2017-01-23  Pierre-Marie de Rodat  <derodat@adacore.com>

	* scos.ads: Introduce a constant to represent ignored
	dependencies in SCO_Unit_Table_Entry.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Remove extra
	spaces from error messages.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Check_Large_Modular_Array): New procedure,
	subsidiary to Expand_N_Object_ Declaration, to compute a guard on
	an object declaration for an array type with a modular index type
	with the size of Long_Long_Integer. Special processing is needed
	in this case to compute reliably the size of the object, and
	eventually  to raise Storage_Error, when wrap-around arithmetic
	might compute a meangingless size for the object.

2017-01-23  Justin Squirek  <squirek@adacore.com>

	* a-wtenau.adb, par-endh.adb, sem_prag.adb,
	sem_type.adb: Code cleanups.

2017-01-23  Bob Duff  <duff@adacore.com>

	* sem_res.adb (Resolve_Call): In the part of the code where
	it is deciding whether to turn the call into an indexed
	component, avoid doing so if the call is to an instance of
	Unchecked_Conversion. Otherwise, the compiler turns it into an
	indexed component, and resolution of that turns it back into a
	function call, and so on, resulting in infinite recursion.
	* sem_util.adb (Needs_One_Actual): If the first formal has a
	default, then return False.

2017-01-21  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_eval.adb (Compile_Time_Compare): Reinstate the expr+literal (etc)
	optimizations when the type is modular and the offsets are equal.

2017-01-20  Thomas Quinot  <quinot@adacore.com>

	* sem_warn.adb (Warn_On_Useless_Assignment): Adjust wording of warning
	message.

2017-01-20  Nicolas Roche  <roche@adacore.com>

	* terminals.c: Ignore failures on setpgid and tcsetpgrp commands.

2017-01-20  Bob Duff  <duff@adacore.com>

	* sem_eval.adb (Compile_Time_Compare): Disable the expr+literal
	(etc) optimizations when the type is modular.

2017-01-20  Yannick Moy  <moy@adacore.com>

	* sem_ch6.adb (Move_Pragmas): move some pragmas,
	but copy the SPARK_Mode pragma instead of moving it.
	(Build_Subprogram_Declaration): Ensure that the generated spec
	and original body share the same SPARK_Pragma aspect/pragma.
	* sem_util.adb, sem_util.ads (Copy_SPARK_Mode_Aspect): New
	procedure to copy SPARK_Mode aspect.

2017-01-20  Bob Duff  <duff@adacore.com>

	* sem_ch3.adb (Analyze_Declarations): Disable Resolve_Aspects
	even in ASIS mode.
	* sem_ch13.adb (Resolve_Name): Enable setting the entity to
	Empty even in ASIS mode.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch9.adb: minor style fixes in comments.
	* sem_ch9.adb (Analyze_Delay_Relative): in GNATprove mode a delay
	relative statement introduces an implicit dependency on
	Ada.Real_Time.Clock_Time.
	* sem_util.adb: Minor reformatting.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Aspect Alignment
	must be treated as delayed aspect even if the expression is
	a literal, because the aspect affects the freezing and the
	elaboration of the object to which it applies.

2017-01-20  Tristan Gingold  <gingold@adacore.com>

	* s-osinte-vxworks.ads (Interrup_Range): New subtype.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* lib-xref.adb (Generate_Reference): Do not warn about the
	presence of a pragma Unreferenced if the entity appears as the
	actual in a procedure call that does not come from source.

2017-01-20  Pascal Obry  <obry@adacore.com>

	* expect.c, terminals.c: Fix some warnings about unused variables.
	* gsocket.h, adaint.c, adaint.h: Fix some more warnings in the C part
	of the runtime.

2017-01-20  Bob Duff  <duff@adacore.com>

	* exp_attr.adb (Constrained): Apply an access check (check that
	the prefix is not null) when the prefix denotes an object of an
	access type; that is, when there is an implicit dereference.

2017-01-20  Gary Dismukes  <dismukes@adacore.com>

	* s-rident.ads (constant Profile_Info): Remove
	No_Calendar from GNAT_Extended_Ravenscar restrictions.

2017-01-20  Tristan Gingold  <gingold@adacore.com>

	*  s-maccod.ads: Add pragma No_Elaboration_Code_All

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* ghost.adb (Mark_Ghost_Clause): New routine.
	(Prune_Node): Do not prune compilation unit nodes.
	(Remove_Ignored_Ghost_Code): Prune the compilation unit node directly.
	This does not touch the node itself, but does prune all its fields.
	* ghost.ads (Mark_Ghost_Clause): New routine.
	* sem_ch8.adb (Analyze_Use_Package): Emit an error when a use
	package clause mentions Ghost and non-Ghost packages. Mark a
	use package clause as Ghost when it mentions a Ghost package.
	(Analyze_Use_Type): Emit an error when a use type clause mentions
	Ghost and non-Ghost types. Mark a use type clause as Ghost when
	it mentions a Ghost type.
	* sem_ch10.adb (Analyze_With_Clause): Mark a with clause as
	Ghost when it withs a Ghost unit.

2017-01-20  Javier Miranda  <miranda@adacore.com>

	* sem_res.adb (Resolve_Call): If a function call
	returns a limited view of a type and at the point of the call the
	function is not declared in the extended main unit then replace
	it with the non-limited view, which must be available. If the
	called function is in the extended main unit then no action is
	needed since the back-end handles this case.

2017-01-20  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch7.adb (Contains_Subp_Or_Const_Refs): Rename into...
	(Contains_Subprograms_Refs): ...this.  Adjust comment
	for constants.	(Is_Subp_Or_Const_Ref): Rename into...
	(Is_Subprogram_Ref): ...this.
	(Has_Referencer): Rename Has_Non_Subp_Const_Referencer variable into
	Has_Non_Subprograms_Referencer and adjust comment.  Remove
	incorrect shortcut for package declarations and bodies.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Complete_Private_Subtype): If the scope of the
	base type differs from that of the completion and the private
	subtype is an itype (created for a constraint on an access
	type e.g.), set Delayed_Freeze on both to prevent out-of-scope
	anomalies in gigi.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper):
	When inheriting the SPARK_Mode of a prior expression function,
	look at the properly resolved entity rather than the initial
	candidate which may denote a homonym.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Rewrite_Assertion_Kind): If the name is
	Precondition or Postcondition, and the context is pragma
	Check_Policy, indicate that this Pre-Ada2012 usage is deprecated
	and suggest the standard names Assertion_Policy /Pre /Post
	instead.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb, sem_cat.adb: Minor reformatting.

2017-01-20  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Access_Type_Declaration): Protect access to the
	Entity attribute.
	* sem_ch10.adb (Install_Siblings): Skip processing malformed trees.
	* sem_cat.adb (Validate_Categoriztion_Dependency): Skip processing
	malformed trees.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specification, case
	Dynamic_Predicate): If the entity E is a subtype that inherits
	a static predicate for its parent P,, the inherited and the
	new predicate combine in the generated predicate function,
	and E only has a dynamic predicate.

2017-01-20  Tristan Gingold  <gingold@adacore.com>

	* s-boustr.ads, s-boustr.adb: New package.
	* Makefile.rtl: Add s-boustr.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* inline.adb (Process_Formals): Qualify the
	expression of a return statement when it yields a universal type.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_All): Freeze the default
	expressions of all eligible formal parameters that appear in
	entries, entry families, and protected subprograms.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Check_Nonoverridable_Aspects); Refine check
	for illegal inherited Implicit_Dereference aspects with renamed
	discriminants.

2017-01-20  Javier Miranda  <miranda@adacore.com>

	* debug.adb (switch d.6): do not avoid declaring unreferenced itypes.
	* nlists.ads (Lock_Lists, Unlock_Lists): New subprograms.
	* nlists.adb (Lock_Lists, Unlock_Lists): New subprograms.
	(Set_First, Set_Last, Set_List_Link, Set_Next, Set_Parent,
	Set_Prev, Tree_Read): Adding assertion.
	* atree.ads (Lock_Nodes, Unlock_Nodes): New subprograms.
	* atree.adb (Lock_Nodes, Unlock_Nodes): New subprograms.
	(Set_Analyzed, Set_Check_Actuals, Set_Comes_From_Source,
	Set_Ekind, Set_Error_Posted, Set_Has_Aspects,
	Set_Is_Ignored_Ghost_Node, Set_Original_Node, Set_Paren_Count,
	Set_Parent, Set_Sloc, Set_Nkind, Set_FieldNN, Set_NodeNN,
	Set_ListNN, Set_ElistNN, Set_NameN, Set_StrN, Set_UintNN,
	Set_UrealNN, Set_FlagNNN, Set_NodeN_With_Parent,
	Set_ListN_With_Parent): Adding assertion.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Process_Convention): Diagnose properly a pragma
	import that applies to several homograph subprograms. when one
	of them is declared by a subprogram body.

2017-01-20  Justin Squirek  <squirek@adacore.com>

	* exp_ch6.adb (Expand_Call): Remove optimization
	that nulls out calls to null procedures.

2017-01-20  Yannick Moy  <moy@adacore.com>

	* inline.adb (Expand_Inlined_Call): Keep more
	precise type of actual for inlining whenever possible. In
	particular, do not switch to the formal type in GNATprove mode in
	some case where the GNAT backend might require it for visibility.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Check_Non_Overridable_Aspects): An inherited
	aspect Implicit_Dereference can be inherited by a full view if
	the partial view has no discriminants, because there is no way
	to apply the aspect to the partial view.
	(Build_Derived_Record_Type): If derived type renames discriminants
	of the parent, the new discriminant inherits the aspect from
	the old one.
	* sem_ch4.adb (Analyze_Call): Handle properly a parameterless
	call through an access discriminant designating a subprogram.
	* sem_ch5.adb (Analyze_Assignment): (Analyze_Call): Handle
	properly a parameterless call through an access discriminant on
	the left-hand side of an assignment.
	* sem_res.adb (resolve): If an interpreation involves a
	discriminant with an implicit dereference and the expression is an
	entity, resolution takes place later in the appropriate routine.
	* sem_ch13.adb (Analyze_Aspect_Implicit_Dereference): Recognize
	access discriminants that designate a subprogram type.

2017-01-20  Pascal Obry  <obry@adacore.com>

	* a-locale.adb, a-locale.ads: Update Ada.Locales for RM 2012 COR:1:2016

2017-01-20  Yannick Moy  <moy@adacore.com>

	* sem_ch10.adb (Check_No_Elab_Code_All): Do not issue an error
	on implicitly with'ed units in GNATprove mode.
	* sinfo.ads (Implicit_With): Document use of flag for implicitly
	with'ed units in GNATprove mode.

2017-01-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_cat.adb (Validate_Static_Object_Name): In a preelaborated
	unit Do not report an error on a non-static entity that appears
	in the context of a spec expression, such as an aspect expression.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb: Flag298 now denotes Is_Underlying_Full_View.
	(Is_Underlying_Full_View): New routine.
	(Set_Is_Underlying_Full_View): New routine.
	(Write_Entity_Flags): Add an entry for Is_Underlying_Full_View.
	* einfo.ads Add new attribute Is_Underlying_Full_View.
	(Is_Underlying_Full_View): New routine along with pragma Inline.
	(Set_Is_Underlying_Full_View): New routine along with pragma Inline.
	* exp_util.adb (Build_DIC_Procedure_Body): Do not consider
