Commit Graph

155969 Commits

Author SHA1 Message Date
Gerald Pfeifer 9651fbafd1 libgomp.texi (Top): www.openacc.org now uses https.
* libgomp.texi (Top): www.openacc.org now uses https.
	(Enabling OpenACC): Ditto.
	(acc_get_num_devices): Ditto.
	(acc_set_device_type): Ditto.
	(acc_get_device_type): Ditto.
	(acc_set_device_num): Ditto.
	(acc_get_device_num): Ditto.
	(acc_async_test): Ditto.
	(acc_async_test_all): Ditto.
	(acc_wait): Ditto.
	(acc_wait_all): Ditto.
	(acc_wait_all_async): Ditto.
	(acc_wait_async): Ditto.
	(acc_init): Ditto.
	(acc_shutdown): Ditto.
	(acc_on_device): Ditto.
	(acc_malloc): Ditto.
	(acc_free): Ditto.
	(acc_copyin): Ditto.
	(acc_present_or_copyin): Ditto.
	(acc_create): Ditto.
	(acc_present_or_create): Ditto.
	(acc_copyout): Ditto.
	(acc_delete): Ditto.
	(acc_update_device): Ditto.
	(acc_update_self): Ditto.
	(acc_map_data): Ditto.
	(acc_unmap_data): Ditto.
	(acc_deviceptr): Ditto.
	(acc_hostptr): Ditto.
	(acc_is_present): Ditto.
	(acc_memcpy_to_device): Ditto.
	(acc_memcpy_from_device): Ditto.
	(acc_get_current_cuda_device): Ditto.
	(acc_get_current_cuda_context): Ditto.
	(acc_get_cuda_stream): Ditto.
	(acc_set_cuda_stream): Ditto.
	(ACC_DEVICE_TYPE): Ditto.
	(ACC_DEVICE_NUM): Ditto.
	(OpenACC Library Interoperability): Ditto.

From-SVN: r251888
2017-09-08 12:27:14 +00:00
Arnaud Charlet a2529c0aa7 s-dwalin.ads, [...]: New.
2017-09-08  Arnaud Charlet <charlet@adacore.com>

	* s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
	s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
	* gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.

From-SVN: r251887
2017-09-08 13:00:52 +02:00
Arnaud Charlet 6a237c4530 [multiple changes]
2017-09-08  Bob Duff  <duff@adacore.com>

	* s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
	New routine to read the Tag robustly.
	* exp_attr.adb (Input): Change the expansion of 'Input,
	in the class-wide case, to call String_Input_Tag instead of
	String_Input_Blk_IO.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* s-rident.ads (Restriction_Id): reorder enum
	literals, so that Pure_Barriers is no longer in range of the
	Cunit_Boolean_Restrictions subtype.

2017-09-08  Nicolas Roche  <roche@adacore.com>

	* a-taster.ads, a-taster.adb: Move to libgnarl
	* gcc-interface/Makefile.in: Remove obsolete targets. Code cleanups.
	Add support for files in libgnarl.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_N_Type_Conversion): Do not apply
	accessibility check to an interface conversion, whose purpose
	is to perform a pointer adjustment in a dispatching call.
	* exp_ch6.adb (Expand_Call_JHelper): Add accessibility checks
	when the actual is a construct that involves a dereference of an
	expression that includes a formal of the enclosing subprogram,
	In such cases, the accessibility level of the actual is that of
	the corresponding formal, which is passed in as an additional
	actual in the outer call.

From-SVN: r251886
2017-09-08 12:34:02 +02:00
Arnaud Charlet 17d7aa85b7 [multiple changes]
2017-09-08  Bob Duff  <duff@adacore.com>

	* exp_intr.adb (Add_Source_Info): Do not decode
	file names; they were not encoded in the first place.

2017-09-08  Bob Duff  <duff@adacore.com>

	* a-tags.adb (Internal_Tag): Unsuppress checks, so we get
	exceptions instead of crashes. Check for absurdly long strings
	and empty strings. Empty strings cause trouble because they can
	have super-null ranges (e.g. 100..10), which causes Ext_Copy to
	be empty, which causes an array index out of bounds.
	* s-ststop.adb (Input): Unsuppress checks, so we get exceptions
	instead of crashes.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb (Is_CCT_Instance): allow use in
	the context of protected types.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* a-tigeli.adb: minor remove extra whitespace.

From-SVN: r251885
2017-09-08 12:18:12 +02:00
Arnaud Charlet ae5115dd46 [multiple changes]
2017-09-08  Gary Dismukes  <dismukes@adacore.com>

	* par-ch4.adb: Reformatting of an error message.

2017-09-08  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Resolve_Name): Under ASIS mode analyze overloaded
	identifiers to ensure their correct decoration of names on
	aspect expressions.

2017-09-08  Yannick Moy  <moy@adacore.com>

	* exp_attr.adb (Expand_Loop_Entry_Attribute): Do
	not skip a loop coming from source which is rewritten into a loop.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Wrap_Imported_Subprogram): Indicate that the
	wrapper has convention Ada, to prevent spurious warnings on
	unconstrained array parameters.

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

	* sem_prag.adb (Check_Variant): Use First_Non_Pragma/Next_Non_Pragma.
	(Analyze_Pragma) <Pragma_Unchecked_Union>: Likewise.

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

	* sem_ch6.adb (Freeze_Expr_Types): Rename Spec_Id into Def_Id.

From-SVN: r251884
2017-09-08 12:15:44 +02:00
Arnaud Charlet 72a266372b [multiple changes]
2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* exp_intr.adb (Append_Entity_Name): Move to ...
	* sem_util.ads, sem_util.adb: ... here to share it.
	(Subprogram_Name): New subprogram, to compute the name of the enclosing
	subprogram/entity.
	* errutil.adb (Error_Msg): Fill new field Node.
	* erroutc.ads (Subprogram_Name_Ptr): New.
	(Error_Msg_Object): New field Node.
	* erroutc.adb (dmsg, Output_Msg_Text): Take new field Node into account.
	* errout.adb (Error_Msg): New variant with node id parameter.
	Fill new parameter Node when emitting messages. Revert previous
	changes for Include_Subprogram_In_Messages.
	* sem_ch5.adb (Check_Unreachable_Code): Supply Node parameter when
	generating warning message.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* par-ch4.adb (P_Iterated_Component_Association): Place construct
	under -gnat2020 flag, given that it is a future feature of
	the language.
	* sem_aggr.adb (Resolve_Iterated_Component_Association): Mark
	defining identifier as referenced to prevent spurious warnings:
	corresponding loop is expanded into one or more loops whose
	variable has the same name, and the expression uses those names
	and not the original one.

From-SVN: r251883
2017-09-08 12:11:07 +02:00
Arnaud Charlet db174c9845 [multiple changes]
2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_elab.adb (Check_A_Call): Do not consider
	references to internal variables for SPARK semantics.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* inline.adb (In_Package_Spec): refine type of
	the parameter from Node_Id to Entity_Id.

2017-09-08  Justin Squirek  <squirek@adacore.com>

	* exp_ch5.adb (Expand_Formal_Container_Loop):
	Reset the scope of the loop parameter after it is reanalyzed.

2017-09-08  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.

From-SVN: r251882
2017-09-08 12:08:25 +02:00
Georges-Alex Jaloyan 3070e68607 g-dynhta.adb, [...] (Get_First_Key, [...]): Correction of the return type from access type to option type.
2017-09-08  Georges-Alex Jaloyan  <jaloyan@adacore.com>

	* g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_key):
	Correction of the return type from access type to option type.
	(Simple_HTable): Moving the Instance_Data to ads file.

From-SVN: r251881
2017-09-08 12:06:39 +02:00
Arnaud Charlet f63adaa7a4 [multiple changes]
2017-09-08  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb: Use System.Case_Util.To_Lower to simplify code.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* opt.ads (Include_Subprogram_In_Messages): New variable.
	* errout.ads (Current_Subprogram_Ptr): New variable.
	* errout.adb (Error_Msg): Prepend current subprogram info
	in messages if Include_Subprogram_In_Messages is set.
	* sem_util.adb (elab code): Initialize Current_Subprogram_Ptr to
	Current_Subprogram.
	* gnat1drv.adb (Adjust_Global_Switches): Set
	Include_Subprogram_In_Messages when -gnatdJ is set.
	* debug.adb: Document and reserve -gnatdJ.

2017-09-08  Georges-Axel Jaloyan  <jaloyan@adacore.com>

	* g-dynhta.adb, g-dynhta.ads (Get_First_Key, Get_Next_Key): New
	functions to iterate over simple hastables.
	(Load_Factor_HTable): Remove obsolete and inefficient implementation.

2017-09-08  Javier Miranda  <miranda@adacore.com>

	* exp_ch6.adb (Unqual_BIP_Function_Call): Adding
	missing checks on the presence of Entity() before checking the
	entity attributes.

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

	* sem_ch6.adb (Analyze_Expression_Function): Reorder some
	statements, use local variable and remove unnecessary processing.

From-SVN: r251880
2017-09-08 12:05:18 +02:00
Arnaud Charlet 4ac62786d6 [multiple changes]
2017-09-08  Javier Miranda  <miranda@adacore.com>

	* exp_ch6.ads (Make_Build_In_Place_Iface_Call_In_Allocator): New
	subprogram.
	(Make_Build_In_Place_Iface_Call_In_Anonymous_Context): New subprogram.
	(Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
	subprogram.
	(Unqual_BIP_Iface_Function_Call): New subprogram.
	* exp_ch6.adb (Replace_Renaming_Declaration_Id): New
	subprogram containing code that was previously inside
	Make_Build_In_Place_Call_In_Object_Declaration since it is also
	required for one of the new subprograms.
	(Expand_Actuals):
	Invoke Make_Build_In_Place_Iface_Call_In_Anonymous_Context
	(Expand_N_Extended_Return_Statement): Extend the
	cases covered by an assertion on expected BIP object
	declarations.
	(Make_Build_In_Place_Call_In_Assignment):
	Removing unused code; found working on this ticket.
	(Make_Build_In_Place_Call_In_Object_Declaration): Move the code
	that replaces the internal name of the renaming declaration
	into the new subprogram Replace_Renaming_Declaration_Id.
	(Make_Build_In_Place_Iface_Call_In_Allocator): New subprogram.
	(Make_Build_In_Place_Iface_Call_In_Anonymous_Context):
	New subprogram.
	(Make_Build_In_Place_Iface_Call_In_Object_Declaration): New
	subprogram.
	(Unqual_BIP_Iface_Function_Call): New subprogram.
	* exp_ch3.adb (Expand_N_Object_Declaration): Invoke the new
	subprogram Make_Build_In_Place_Iface_Call_In_Object_Declaration.
	* exp_attr.adb (Expand_N_Attribute_Reference): Invoke the new
	subprogram Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
	* exp_ch4.adb (Expand_Allocator_Expression): Invoke the new
	subprogram Make_Build_In_Place_Iface_Call_In_Allocator.
	(Expand_N_Indexed_Component): Invoke the new subprogram
	Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
	(Expand_N_Selected_Component): Invoke the new subprogram
	Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
	(Expand_N_Slice): Invoke the new subprogram
	Make_Build_In_Place_Iface_Call_In_Anonymous_Context.
	* exp_ch8.adb (Expand_N_Object_Renaming_Declaration):
	Invoke the new subprogram
	Make_Build_In_Place_Iface_Call_In_Anonymous_Context.

2017-09-08  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Expand_Interface_Conversion): Fix handling of
	access to interface types.  Remove also the accessibility check.

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

	* sem_ch6.adb (Freeze_Expr_Types): Really freeze
	all the types that are referenced by the expression.
	(Analyze_Expression_Function): Call Freeze_Expr_Types for
	a completion instead of manually freezing the type of the
	expression.
	(Analyze_Subprogram_Body_Helper): Do not call Freeze_Expr_Types here.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_prag.adb (Replace_Discriminals_Of_Protected_Op):
	New procedure, auxiliary to Expand_Pragma_Check, to handle
	references to the discriminants of a protected type within a
	precondition of a protected operation. This is needed because
	the original precondition has been analyzed in the context of
	the protected declaration, but in the body of the operation
	references to the discriminants have been replaved by references
	to the discriminants of the target object, and these references
	are only created when expanding the protected body.

From-SVN: r251879
2017-09-08 12:02:50 +02:00
Arnaud Charlet c468e1fba8 [multiple changes]
2017-09-08  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Issue more precise error messages on
	Loop_Variant.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Build_Record_VS_Func): If the record is an
	unchecked union, do not emit checks for its (non-existent)
	discriminants, or for variant parts that depend on them.

2017-09-08  Justin Squirek  <squirek@adacore.com>

	* sem_ch4.adb (Find_Equality_Types.Try_One_Interp,
	Find_Comparison_Type.Try_One_Interp): Add check for generic
	instances.

From-SVN: r251878
2017-09-08 11:48:16 +02:00
Arnaud Charlet f8f50235db sem_ch3.adb, [...]: Remove references to Frontend_Layout_On_Target and remaining references to...
2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch3.adb, layout.adb, layout.ads, exp_attr.adb, debug.adb,
	exp_pakd.adb, sem_prag.adb, gnat1drv.adb, targparm.adb, targparm.ads,
	repinfo.adb, exp_ch6.adb, exp_aggr.adb, sem_eval.adb, sem_ch13.adb,
	exp_ch3.adb: Remove references to Frontend_Layout_On_Target and
	remaining references to AAMP_On_Target.

From-SVN: r251877
2017-09-08 11:46:42 +02:00
Arnaud Charlet 63a5b3dc89 [multiple changes]
2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* style.adb: Fix typo.

2017-09-08  Javier Miranda  <miranda@adacore.com>

	* einfo.adb (Underlying_Type): Add missing support for class-wide
	types that come from the limited view.
	* exp_attr.adb (Attribute_Address): Check class-wide type
	interfaces using the underlying type to handle limited-withed
	types.
	(Attribute_Tag): Check class-wide type interfaces using
	the underlying type to handle limited-withed types.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Predicated_Loop): Handle properly a loop
	over a subtype of a type with a static predicate, taking into
	account the predicate function of the parent type and the bounds
	given in the loop specification.
	* sem_ch3.adb (Inherit_Predicate_Flags): For qn Itype created for
	a loop specification that is a subtype indication whose type mark
	is a type with a static predicate, inherit predicate function,
	used to build case statement for rewritten loop.

2017-09-08  Justin Squirek  <squirek@adacore.com>

	* lib-load.adb: Modify printing of error message to exclude file
	line number.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* inline.adb (Can_Be_Inlined_In_GNATprove_Mode):
	don't inline subprograms declared in both visible and private
	parts of a package.
	(In_Package_Spec): previously In_Package_Visible_Spec; now
	detects subprograms declared both in visible and private parts
	of a package spec.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.adb (Build_Invariant_Procedure_Declaration): If
	the type is an anonymous array in an object declaration, whose
	component type has an invariant, use the object declaration
	as the insertion point for the invariant procedure, given that
	there is no explicit type declaration for an anonymous array type.

2017-09-08  Bob Duff  <duff@adacore.com>

	* a-cbprqu.ads, a-cbdlli.adb: Suppress warnings.

From-SVN: r251876
2017-09-08 11:44:30 +02:00
Arnaud Charlet 3815f967f9 [multiple changes]
2017-09-08  Bob Duff  <duff@adacore.com>

	* s-trasym.ads (Hexa_Traceback): If
	Suppress_Hex is True, print "..." instead of a hexadecimal
	address.
	* s-trasym.adb: Ignore No_Hex in this version.
	Misc cleanup.

2017-09-08  Bob Duff  <duff@adacore.com>

	* debug.adb: Minor reformatting.

2017-09-08  Bob Duff  <duff@adacore.com>

	* a-cbdlli.adb, a-cohama.adb, a-cohase.adb (Copy): Rewrite the
	code so it doesn't trigger an "uninit var" warning.

2017-09-08  Nicolas Roche  <roche@adacore.com>

	* s-hibaen.ads: Remove obsolete file.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* a-locale.ads: Add comment explaining the state of this package.

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb (Is_CCT_Instance): Allow calls in the context
	of packages.
	* sem_prag.ads, sem_prag.adb (Find_Related_Declaration_Or_Body):
	allow calls in the context of package spec (for pragma
	Initializes) and bodies (for pragma Refined_State).

2017-09-08  Bob Duff  <duff@adacore.com>

	* checks.adb (Insert_Valid_Check): Copy the Do_Range_Check flag to the
	new Exp.

From-SVN: r251875
2017-09-08 11:38:48 +02:00
Bob Duff a481c9b40f re PR ada/80888 (Wide_Text_IO defaults to bracket encoding even if -gnatW8 specified)
2017-09-08  Bob Duff  <duff@adacore.com>

PR ada/80888
	* a-textio.adb, a-witeio.adb, a-ztexio.adb (Set_WCEM): Use
	Default_WCEM by default (i.e. if the encoding is not specified
	by the Form string).

From-SVN: r251874
2017-09-08 11:38:38 +02:00
Arnaud Charlet 1c91257437 [multiple changes]
2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>

	* debug.adb (dA): Adjust comment.
	* gnat1drv.adb (Gnat1drv): Likewise.
	* opt.ads (List_Representation_Info_Extended): New variable.
	* repinfo.adb (List_Record_Info): Split implementation into...
	(Compute_Max_Length): ...this.	Recurse on records if requested.
	(List_Record_Layout): Likewise.
	* switch-c.adb (Scan_Front_End_Switches) <'R'>: Use case
	statement, accept '0' and set List_Representation_Info_Extended
	on 'e'.
	* usage.adb (Usage): Document new -gnatRe variant.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
	Do not save the given entity in the global variable Default_Pool
	if the pragma appears within a generic unit.

2017-09-08  Bob Duff  <duff@adacore.com>

	* errout.adb (Delete_Warning): Do not
	decrement Warnings_Treated_As_Errors. This is called before
	Warnings_Treated_As_Errors has been incremented to account for
	this warning. Decrementing it here can lead to negative values
	of Warnings_Treated_As_Errors, raising Constraint_Error in
	checks-on builds, and causing the compiler to return an error
	code in checks-off builds.

From-SVN: r251873
2017-09-08 11:25:01 +02:00
Arnaud Charlet f0478a53cb [multiple changes]
2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.ads, sem_util.adb (Is_CCT_Instance): Only expect
	entities of named concurrent types as Ref_Id and not of anonymous
	concurrent objects (because callers already know when a conversion
	is necessary and can easily do it); also, do not expect protected
	types or protected objects as Context_Id (because no flow-related
	SPARK pragmas are attached there); reflect these changes in a
	more precise comment.

2017-09-08  Olivier Hainque  <hainque@adacore.com>

	* g-altive.ads: Add documentation.

2017-09-08  Bob Duff  <duff@adacore.com>

	* sem_util.ads, debug.adb: Minor comment fix.
	* erroutc.ads: Comment fix.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Validate_Array_Type_Instance): Suppress check
	for compatibility of component types of formal and actual in an
	instantiation of a child unit,	when the component type of the
	formal is itself a formal of an enclosing generic.

From-SVN: r251872
2017-09-08 11:22:59 +02:00
Arnaud Charlet 780d73d73d [multiple changes]
2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.ads, sem_util.adb (Is_CCT_Instance): moved from
	sem_prag.adb to make it available for GNATprove; for concurrent
	types replace custom scope climbing with Scope_Same_Or_Within; for
	single concurrent objects add scope climbing (with Scope_Within),
	which was not there (that's the primary semantic change of this
	commit); also, when comparing a single concurrent object with
	its corresponding concurrent type rely on equality of types,
	not of objects (because that's simpler to code).
	* sem_prag.adb (Is_CCT_Instance): lifted to sem_util.ads.
	(Analyze_Global_Item): adjust special-casing of references to the
	current instance of a concurrent unit in the Global contracts
	of task types and single tasks objects; similar for references
	in the protected operations and entries of protected types and
	single protected objects (in all these cases the current instance
	behaves as an implicit parameter and must not be mentioned in
	the Global contract).

2017-09-08  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch6.adb (Expand_Call_Helper): Introduce temporary for
	function calls returning a record within a subprogram call,
	for C generation.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Find_Expanded_Name): Handle properly an expanded
	name that designates the current instance of a child unit in its
	own body and appears as the prefix of a reference to an entity
	local to the child unit.
	* exp_ch6.adb, freeze.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
	Minor reformatting.

2017-09-08  Yannick Moy  <moy@adacore.com>

	* sem_res.adb (Resolve_Equality_Op): Do not warn on comparisons that
	may be intentional.

2017-09-08  Tristan Gingold  <gingold@adacore.com>

	* sem_warn.adb (Check_Unused_Withs): Remove test that disabled
	warnings on internal units in configurable run time mode.

From-SVN: r251871
2017-09-08 11:19:34 +02:00
Arnaud Charlet b2c3160ca5 [multiple changes]
2017-09-08  Bob Duff  <duff@adacore.com>

	* sem_ch3.adb (Build_Derived_Private_Type): Inherit
	representation items from interfaces that the derived type
	implements, not just from the parent type.
	* sem_util.ads, sem_util.adb (Abstract_Interface_List): Change
	this to return an empty list when there are no interfaces.
	* einfo.ads, sem_ch13.adb: Minor comment fixes.
	* sem_attr.adb: Minor comment fix.

2017-09-08  Doug Rupp  <rupp@adacore.com>

	* sigtramp-vxworks.c [i386]: Adjust the kernel context for
	x86-vx7.

2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator): Generate a
	call to Allocate_Any_Controlled when the allocation does not
	require any initialization.

From-SVN: r251870
2017-09-08 11:15:24 +02:00
Arnaud Charlet cc3a298607 [multiple changes]
2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Copy_Node_With_Replacement):
	Update the Renamed_Object field of a replicated object renaming
	declaration.

2017-09-08  Patrick Bernardi  <bernardi@adacore.com>

	* exp_ch9.adb (Is_Pure_Barrier): Allow type
	conversions and components of objects. Simplified the detection
	of the Count attribute by identifying the corresponding run-time
	calls.

2017-09-08  Yannick Moy  <moy@adacore.com>

	* exp_ch9.adb, exp_disp.adb, repinfo.adb, sem_ch12.adb, sem_dim.adb,
	sem_type.adb, sinfo.ads: Minor reformatting.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Has_Incomplete_Compoent): New predicate, subsidiary
	of Freeze_Profile, used to inhibit the freezing of the profile
	of an expression function declared within a nested package, when
	some type in the profile depends on a private type declared in
	an enclosing package.

2017-09-08  Bob Duff  <duff@adacore.com>

	* gnat1drv.adb (Gnat1drv): Do not set the Force_ALI_Tree_File flag in
	the subunit case. It's still OK to set it in the "missing subunits"
	case, because that won't cause the obsolete .ali files that cause
	confusion.

2017-09-08  Bob Duff  <duff@adacore.com>

	* sinput-l.adb: Remove unused "with Unchecked_Conversion;". It's
	unclear why this didn't cause a warning.
	* a-uncdea.ads, a-unccon.ads: Add "Ada." to names in the
	pragmas. It's unclear why this didn't cause an error.

From-SVN: r251869
2017-09-08 11:13:07 +02:00
Arnaud Charlet 74a78a4f1c [multiple changes]
2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration):
	Reimplemented.
	(Expand_SPARK_Potential_Renaming): Code clean up.
	* sem_prag.adb (Analyze_Initialization_Item): Add a guard in case
	the item does not have a proper entity.
	(Analyze_Input_Item): Add a guard in case the item does not have a
	proper entity.
	(Collect_States_And_Objects): Include object renamings in the
	items being collected.
	(Resolve_State): Update the documentation of this routine.
	* sem_util.adb (Entity_Of): Add circuitry to handle
	renamings of function results.
	(Remove_Entity): New routine.
	(Remove_Overloaded_Entity): Take advantage of factorization.
	* sem_util.ads (Entity_Of): Update the documentation
	of this routine.
	(Remove_Entity): New routine.
	(Remove_Overloaded_Entity): Update the documentation of this
	routine.

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

	* repinfo.adb (List_Record_Info): During first loop,
	do not override the normalized position and first bit
	if they have already been set.	Move fallback code
	for the packed case to the case where it belongs.
	* sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
	Also adjust the normalized position of components.
	(Adjust_Record_For_Reverse_Bit_Order_Ada_95): Likewise.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_disp.adb (Make_DT, Set_All_DT_Position): Handle properly
	the placement of a primitive operation O that renames an operation
	R declared in an inner package, and which is thus not a primitive
	of the dispatching type of O. In this case O is a new primitive
	and does not inherit its dispatch table position from R (which
	has none).

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* sem_dim.adb (Analyze_Dimension_If_Expression,
	Analyze_Dimension_Case_Expression): new subprograms to verify
	the dimensional correctness of Ada2012 conditional expressions,
	and set properly the dimensions of the construct.
	* sem_res.adb (Resolve_If_Expression, Resolve_Case_Expression)):
	call Analyze_Dimension.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

	* sem_type.adb (Expand_Interface_Conversion): Prevent an infinite
	loop on an interface declared as a private extension of another
	synchronized interface.

From-SVN: r251868
2017-09-08 10:59:32 +02:00
Arnaud Charlet 133de11231 Minor clean up.
From-SVN: r251867
2017-09-08 10:47:16 +02:00
Arnaud Charlet eb0f297f9a [multiple changes]
2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * sem_ch12.adb (Check_Generic_Parent): New procedure within
        Analyze_Associations, to handle actual packages that depend on
        previous instances.  If a package IAP that is an instantiation is
        used as an actual in a subsequent instantiation SI in the same
        scope, and IAP has a body, IAP must be frozen before SI. If
        the generic parent of IAP is itself declared in a previous
        instantiation in the same scope, that instantiation must also
        be frozen before SI.
        (Install_Body): Prevent double insertion of freeze node for
        instance.

2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

        * sem_prag.adb (Resolve_State): Update the
        comment on documentation. Generate a reference to the state once
        resolution takes place.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * sem_ch13.adb (Analyze_Aspect_Specifications, case
        Linker_Section): If the aspect applies to an object declaration
        with explicit initialization, do not delay the freezing of the
        object, to prevent access-before-elaboration in the generated
        initialization code.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
        (Integer_Value (Item)) when the size of the fixed decimal type
        is larger than Integer.

From-SVN: r251866
2017-09-08 10:47:04 +02:00
Arnaud Charlet be91c7e2aa [multiple changes]
2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * sem_ch12.adb (Check_Generic_Parent): New procedure within
        Analyze_Associations, to handle actual packages that depend on
        previous instances.  If a package IAP that is an instantiation is
        used as an actual in a subsequent instantiation SI in the same
        scope, and IAP has a body, IAP must be frozen before SI. If
        the generic parent of IAP is itself declared in a previous
        instantiation in the same scope, that instantiation must also
        be frozen before SI.
        (Install_Body): Prevent double insertion of freeze node for
        instance.

2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

        * sem_prag.adb (Resolve_State): Update the
        comment on documentation. Generate a reference to the state once
        resolution takes place.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * sem_ch13.adb (Analyze_Aspect_Specifications, case
        Linker_Section): If the aspect applies to an object declaration
        with explicit initialization, do not delay the freezing of the
        object, to prevent access-before-elaboration in the generated
        initialization code.

2017-09-08  Ed Schonberg  <schonberg@adacore.com>

        * a-wtdeio.adb (Put, all versions): Use Long_Long_Integer
        (Integer_Value (Item)) when the size of the fixed decimal type
        is larger than Integer.

From-SVN: r251865
2017-09-08 10:46:01 +02:00
Arnaud Charlet 8b73509432 Removed, no longer used.
From-SVN: r251864
2017-09-08 10:45:05 +02:00
Rainer Orth ed3d4d827d Fix SPARC bootstrap: sancov.c needs memmodel.h
* sancov.c: Include memmodel.h.

From-SVN: r251863
2017-09-08 08:35:23 +00:00
Eric Botcazou 2db98b5a5f Fix merge error.
From-SVN: r251862
2017-09-08 07:18:20 +00:00
GCC Administrator 42bbab4c95 Daily bump.
From-SVN: r251861
2017-09-08 00:16:18 +00:00
Eric Botcazou 1c49a3ed0c re PR bootstrap/80897 (gnat bootstrap broken on SPARC64/Linux)
PR target/80897
	* config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
	large offsets.

From-SVN: r251847
2017-09-07 15:53:09 +00:00
Eric Botcazou fac519741f re PR ada/82127 (gnat.dg/specs/constructor.ads FAILs)
PR ada/82127
	* gcc-interface/decl.c (copy_and_substitute_in_layout): Put the fields
	in order of increasing position in more cases.

From-SVN: r251846
2017-09-07 15:33:29 +00:00
Carl Love 9cb22eea21 vsx.md (define_insn "*stxvl"): Add missing argument to the sldi instruction.
gcc/ChangeLog:

2017-09-07  Carl Love  <cel@us.ibm.com>

	    * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to the sldi instruction.

From-SVN: r251845
2017-09-07 15:02:24 +00:00
David Edelsohn 3060b639be * sancov.c: Include tm_p.h.
From-SVN: r251844
2017-09-07 10:28:20 -04:00
Jakub Jelinek 86373d9214 re PR target/81979 (Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section})
PR target/81979
	* output.h (switch_to_other_text_partition): New declaration.
	* varasm.c (switch_to_other_text_partition): New function.
	* config/rs6000/rs6000.c (uses_TOC): Return 2 if
	NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
	(rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
	to the other text partition before emitting LCL label and switch back
	after emitting the word after it.

	* gcc.dg/pr81979.c: New test.

From-SVN: r251843
2017-09-07 13:20:40 +02:00
Arnaud Charlet ed32342134 [multiple changes]
2017-09-07  Yannick Moy  <moy@adacore.com>

	* a-exetim-mingw.ads: Add contract Global=>null
	on all operations that are modeled as having no read or write
	of global variables in SPARK.

2017-09-07  Raphael Amiard  <amiard@adacore.com>

	* a-chtgop.adb, a-chtgop.ads (Generic_Iteration_With_Position): Added
	to Hmaps.Generic_Ops.
	* a-cohama.adb (Ada.Containers.Hmaps.Iterate): Pass proper position in
	cursors.
	* a-cihama.adb (Ada.Containers.Indefinite_Hmaps.Iterate): Pass pos in
	cursors.
	* a-cohase.adb (Ada.Containers.Hashed_Sets.Iterate): Pass proper
	position in cursors.

2017-09-07  Javier Miranda  <miranda@adacore.com>

	* sem_elab.adb (Check_Task_Activation): Adding switch -gnatd.y to
	allow disabling the generation of implicit pragma Elaborate_All
	on task bodies.

2017-09-07  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Make_Tags): Avoid suffix counter
	in the external name of the elaboration flag. Required to fix
	the regressions introduced by the initial version of this patch.

2017-09-07  Bob Duff  <duff@adacore.com>

	* sem_ch6.adb (Analyze_Function_Return): Do not
	insert an explicit conversion to force the displacement of the
	"this" pointer to reference the secondary dispatch table in the
	case where the return statement is returning a raise expression,
	as in "return raise ...".

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* sem_disp.adb (Is_User_Defined_Equality): Removed procedure.
	* sem_util.ads, sem_util.adb (Is_User_Defined_Equality): Copied
	procedure from sem_disp.adb.
	* sem_ch12.ads (Get_Unit_Instantiation_Node): rename Package
	with Unit.
	* sem_ch12.adb (Get_Unit_Instantiation_Node): function extended to
	return the instantiation node for subprograms. Update references
	to Get_Unit_Instantiation_Node.
	* sem_ch7.adb (Install_Parent_Private_Declarations): update
	reference to Get_Unit_Instantiation_Node.
	* exp_dist.adb (Build_Package_Stubs): update reference to
	Get_Unit_Instantiation_Node.
	* sem_ch9.adb: minor typo in comment.
	* lib-xref-spark_specific.adb
	(Traverse_Declaration_Or_Statement): traverse into task type
	definition.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_dim.adb (Analyze_Dimension_Type_Conversion): New procedure
	to handle properly various cases of type conversions where the
	target type and/or the expression carry dimension information.
	(Dimension_System_Root); If a subtype carries dimension
	information, obtain the source parent type that carries the
	Dimension aspect.

2017-09-07  Dmitriy Anisimkov  <anisimko@adacore.com>

	* g-socket.adb, g-socket.ads (GNAT.Sockets.To_Ada): New routine.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference, case 'Constrained):
	If the prefix is a reference to an object, rewrite it as an
	explicit dereference, as required by 3.7.2 (2) and as is done
	with most other attributes whose prefix is an access value.

2017-09-07  Bob Duff  <duff@adacore.com>

	* par-ch13.adb: Set the Inside_Depends flag if we are inside a
	Refined_Depends aspect.
	* par-ch2.adb: Set the Inside_Depends flag if we are inside a
	Refined_Depends pragma.
	* scans.ads: Fix documentation of Inside_Depends flag.
	* styleg.adb, styleg.ads: Minor reformatting and comment fixes.

2017-09-07  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Insert_Actions_In_Scope_Around):
	Account for the case where the are no lists to insert, but the
	secondary stack still requires management.
	* a-chtgop.adb, a-cihama.adb, a-cohama.adb, a-cohase.adb, a-tags.adb,
	comperr.adb, einfo.adb, exp_aggr.adb, exp_ch3.adb, exp_disp.adb,
	lib-xref.adb, lib-xref-spark_specific.adb, sem_ch12.adb, sem_ch13.adb,
	sem_ch6.adb, sem_dim.adb, sem_dim.ads, sem_elab.adb, sem_prag.adb:
	Minor reformatting.

From-SVN: r251842
2017-09-07 12:09:17 +02:00
Arnaud Charlet c8e072dafb [multiple changes]
2017-09-07  Vincent Celier  <celier@adacore.com>

	* clean.adb: Do not get the target parameters before calling
	gprclean.

2017-09-07  Nicolas Roche  <roche@adacore.com>

	* s-osinte-solaris-posix.ads: Removed.

From-SVN: r251841
2017-09-07 12:02:27 +02:00
Arnaud Charlet 83b77c5c92 [multiple changes]
2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* sem_prag.adb (Collect_States_And_Objects): Detect also instances of
	single concurrent objects.

2017-09-07  Javier Miranda  <miranda@adacore.com>

	* s-regexp.ads: Fix documentation of the globbing grammar.

2017-09-07  Gary Dismukes  <dismukes@adacore.com>

	* a-tags.ads, einfo.ads, exp_disp.ads: Minor reformatting.

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb (Gnat1drv): Enable pragma Ignore_Pragma (Global)
	in CodePeer mode, to support more legacy code automatically.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_disp.adb (Replace_Formals): If thr formal is classwide,
	and thus not a controlling argument, preserve its type after
	rewriting because it may appear in an nested call with a classwide
	parameter.

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* comperr.adb (Delete_SCIL_Files): Handle case of
	N_Package_Instantiation.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch10.adb (Remove_Private_With_Clause): If a private with
	clause for a unit U appears in a context that includes a regular
	with_clause on U, rewrite the redundant private clause into a null
	statement, rather than removing it altogether from the context,
	so that ASIS tools can reconstruct the original source.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Check_Aspect_At_Freeze_Point): The expression
	for aspect Small can be of any real type (not only a universal
	real literal) as long as it is a static constant.

2017-09-07  Thomas Quinot  <quinot@adacore.com>

	* par_sco.adb: Minor reformatting.

From-SVN: r251840
2017-09-07 11:58:24 +02:00
Arnaud Charlet e9cb22313e s-parame-ae653.ads: Removed.
* s-parame-ae653.ads: Removed.

From-SVN: r251839
2017-09-07 11:54:14 +02:00
Arnaud Charlet fe683ef6e1 [multiple changes]
2017-09-07  Nicolas Roche  <roche@adacore.com>

	* s-traces-default.adb, s-trafor-default.adb, s-trafor-default.ads,
	s-traces.adb, s-traces.ads, s-tratas-default.adb, s-tfsetr-default.adb,
	s-tfsetr-vxworks.adb, s-tratas.adb, s-tratas.ads, s-tasuti.adb,
	s-parame-hpux.ads, s-tassta.adb, s-taasde.adb, s-tasren.adb,
	s-taprob.adb, a-caldel.adb, s-parame.ads, Makefile.rtl, s-tpobop.adb,
	s-taenca.adb, s-parame-vxworks.ads: Remove support for System.Traces.

2017-09-07  Yannick Moy  <moy@adacore.com>

	* a-ngelfu.ads Add preconditions to all functions
	listed in Ada RM A.5.1(19-33) as having constraints on inputs.

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* lib-xref.adb (Generate_Reference): ignore
	references to entities which are Part_Of single concurrent
	objects.

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

	* sem_ch7.adb (Hide_Public_Entities): Add paragraph to main
	comment.

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* a-taside.adb (Activation_Is_Complete): Raise Program_Error if
	Null_Task_Id is passed.

2017-09-07  Javier Miranda  <miranda@adacore.com>

	* einfo.ads, einfo.adb (Access_Disp_Table_Elab_Flag): New
	attribute. Defined for record types and subtypes.
	* exp_ch3.ads (Init_Secondary_Tags): Adding new formal
	(Init_Tags_List) to facilitate generating separate code in the
	IP routine to initialize the object components and for completing
	the elaboration of dispatch tables.
	* exp_ch3.adb (Build_Init_Procedure): Improve the code
	generated in the IP routines by means of keeping separate
	the initialization of the object components from the
	initialization of its dispatch tables.	(Init_Secondary_Tags):
	Adding new formal (Init_Tags_List) and adjusting calls to
	Ada.Tags.Set_Dynamic_Offset_To_Top since it has a new formal;
	adjusting also calls to Ada.Tags.Register_Interface_Offset
	because the type of one of its formals has been changed.
	* a-tags.ads, a-tags.adb (Register_Interface_Offset): Profile
	modified. Instead of receiving a pointer to an object this
	routine receives now a primary tag.
	(Set_Dyanic_Offset_To_Top): Profile modified. This routine receives an
	additional formal: the tag of the primary dispatch table.
	* exp_disp.ads (Elab_Flag_Needed): New subprogram.
	* exp_disp.adb (Elab_Flag_Needed): New subprogram.
	(Make_Tags): Adding the declaration of the elaboration flag (if needed).
	* exp_aggr.adb (Build_Record_Aggr_Code): Adding actual of new
	formal in calls to Init_Secondary_Tags.

2017-09-07  Javier Miranda  <miranda@adacore.com>

	* ghost.adb (Mark_And_Set_Ghost_Instantiation.Check_Ghost_Actuals): New
	subprogram.
	* sem_prag.adb (Pragma_Ghost): Add missing support for ghost
	applied to generic subprograms.

From-SVN: r251838
2017-09-07 11:53:18 +02:00
Arnaud Charlet 4b25afa16e [multiple changes]
2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb (Check_Part_Of_Reference): rename Conc_Typ to Conc_Obj
	(because it refers to the anonymous concurrent object, not its type);
	fix condition for emitting error message about task/protected type,

2017-09-07  Bob Duff  <duff@adacore.com>

	* binde.adb (Debug_Flag_Old): If both -do and -dp
	are specified, behave as if just -do was specified, rather than
	using a mixture.

2017-09-07  Nicolas Roche  <roche@adacore.com>

	* system-vxworks-sparcv9.ads, s-vxwork-m68k.ads, s-vxwork-mips.ads,
	system-vxworks-m68k.ads, system-vxworks-mips.ads: Removed.

From-SVN: r251837
2017-09-07 11:46:56 +02:00
Arnaud Charlet 1155ae0159 [multiple changes]
2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* sem_prag.adb (Find_Role): The Global_Seen flag
	is now consulted not only for abstract states and variables,
	but for all kinds of items.
	(Collect_Subprogram_Inputs_Outputs): Do not process formal
	generic parameters, because unlike ordinary formal parameters,
	generic formals only act as input/ outputs if they are explicitly
	mentioned in a Global contract.

2017-09-07  Yannick Moy  <moy@adacore.com>

	* ghost.adb (Check_Ghost_Context): Do not err on ghost code inside
	predicate procedure. Check predicate pragma/aspect with Ghost entity.
	* exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor
	reformatting.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim
	(code cleanup);
	* sem_ch3.adb (Build_Derived_Record_Type):i Call
	Copy_Dimensions_Of_Components after creating the copy of the
	record declaration.
	* sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a
	derived recor type, copy the dikensions if any of each component
	of the parent record to the corresponding component declarations
	of the derived record. These expressions are used among other
	things as default values in aggregates with box associations.
	* a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb,
	repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb:
	Minor reformatting.

2017-09-07  Arnaud Charlet  <charlet@adacore.com>

	* sem_util.adb: Remove extra space after THEN.

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

	* sem_ch7.adb (Has_Referencer): For a subprogram renaming,
	also mark the renamed subprogram as referenced.

From-SVN: r251836
2017-09-07 11:40:16 +02:00
Arnaud Charlet 0691ed6bd6 [multiple changes]
2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* par-ch6.adb (P_Subprogram): Improve error message on null
	procedure with misplaced aspect specification, which the parser
	first attempts to interpret as a malformed expression function.

2017-09-07  Gary Dismukes  <dismukes@adacore.com>

	* sem_attr.adb (Analyze_Attribute_Old_Result):
	Allow attributes Result and Old in the case of an expression
	function.

2017-09-07  Justin Squirek  <squirek@adacore.com>

	* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Propagate
	Volatile to subcomponents.

2017-09-07  Bob Duff  <duff@adacore.com>

	* exp_ch7.adb (Find_Last_Init): Check for the
	case where a build-in-place function call has been replaced by a
	'Reference attribute reference.

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

	* sem_ch7.adb (Has_Referencer): Recurse on Actions of freeze
	nodes.

2017-09-07  Bob Duff  <duff@adacore.com>

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration,
	Make_Build_In_Place_Call_In_Anonymous_Context): Do not use the
	secondary stack for all functions that return limited tagged
	types -- just do it for dispatching calls.  Misc cleanup.
	* sem_util.ads, sem_util.adb (Unqual_Conv): New function to
	remove qualifications and type conversions. Fix various bugs
	where only a single level of qualification or conversion was
	removed, so e.g. "T1'(T2'(X))" would incorrectly return "T2'(X)"
	instead of "X".
	* checks.adb, exp_util.ads, exp_util.adb, sem_res.adb: Misc related
	cleanup.

2017-09-07  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (setr_Actual_Subtypes): Within a predicate function
	do not create actual subtypes that may generate further predicate
	functions.
	* sem_ch13.adb (Build_Predicate_Functions): Indicate that entity
	of body is a predicate function as well.
	(Resolve_Aspect_Expressions, Resolve_Name): For a component
	association, only the expression needs resolution, not the name.
	(Resolve_Aspect_Expressions, case Predicates): Construct and
	analyze the predicate function declaration in the scope of the
	type, before making the type and its discriminants visible.

From-SVN: r251835
2017-09-07 11:33:27 +02:00
Eric Botcazou a3064a99ee re PR ada/82126 (gnat.dg/alignment3.adb FAILs)
PR ada/82126
	* gnat.dg/alignment3.adb: Add pragma No_Component_Reordering.

From-SVN: r251834
2017-09-07 09:27:31 +00:00
Richard Biener a7976089db passes.def (pass_split_crit_edges): Remove instance before PRE.
2017-09-07  Richard Biener  <rguenther@suse.de>

	* passes.def (pass_split_crit_edges): Remove instance before PRE.
	* tree-ssa-pre.c (pass_pre::execute): Instead manually split
	critical edges here, after loop init.
	(pass_data_pre): Remove PROP_no_crit_edges flags.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
	for valueization of call args to avoid leaking VN_TOP.
	(visit_use): Assert we do not visit default defs.
	(init_scc_vn): Use build_decl for VN_TOP to make name nicer.
	Use error_mark_node to more easily detect leaking VN_TOP.
	All default-defs are varying, not VN_TOP.  Mark them visited.
	(run_scc_vn): Make code match comment.

	* gcc.dg/tree-ssa/ssa-thread-12.c: XFAIL third FSM threading
	opportunity.

From-SVN: r251833
2017-09-07 07:44:43 +00:00
Jason Merrill e76b247239 PR c++/82053 - ICE with default argument in lambda in template
* pt.c (tsubst_arg_types): Substitute default arguments for lambdas
	in templates.
	(retrieve_specialization): Use lambda_fn_in_template_p.
	* cp-tree.h: Declare it.

From-SVN: r251826
2017-09-06 21:02:46 -04:00
GCC Administrator f4942d7956 Daily bump.
From-SVN: r251825
2017-09-07 00:16:20 +00:00
Jason Merrill 7ab50e1794 PR c++/82070 - error with nested lambda capture
* pt.c (tsubst_expr) [DECL_EXPR]: Register capture proxies with
	register_local_specialization.

From-SVN: r251819
2017-09-06 15:36:48 -04:00
Michael Meissner bbd3510114 rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete OPTION_MASK_FLOAT128_KEYWORD.
[gcc]
2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
	OPTION_MASK_FLOAT128_KEYWORD.
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
	support for the -mfloat128-type option, and make -mfloat128
	default on PowerPC Linux systems.  Define or undefine
	__FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
	Define __float128 to be __ieee128 if IEEE 128-bit support is
	enabled, or undefine it.
	(rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
	Delete defining __FLOAT128_TYPE__.
	* config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
	-mfloat128-type option and make -mfloat128 default on PowerPC
	Linux systems.
	(TARGET_FLOAT128_TYPE): Likewise.
	(-mfloat128-type): Likewise.
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Delete the -mfloat128-type option and make -mfloat128 default on
	PowerPC Linux systems.  Always use __ieee128 to be the keyword for
	the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
	128-bit floating point is enabled.  Change tests from using
	-mfloat128-type to -mfloat128.
	(rs6000_mangle_type): Use the correct mangling for the __float128
	type even if normal long double is restricted to 64-bits.
	(floatn_mode): Enable the _Float128 type by default on VSX Linux
	systems.
	* config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
	(MASK_FLOAT128_KEYWORD): Define new shortcut macro.
	(RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
	-mfloat128-type.
	* doc/invoke.texi (RS/6000 and PowerPC Options): Update
	documentation for -mfloat128.

[gcc/testsuite]
2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/float128-1.c: Update options to know that
	-mfloat128 is now on by default on PowerPC VSX systems.  Remove
	-static-libgcc option which is no longer needed.  Use -mvsx or
	-mpower9-vector to enable VSX or hardware IEEE support, rather
	than specifying a particular CPU.
	* gcc.target/powerpc/float128-2.c: Likewise.
	* gcc.target/powerpc/float128-cmp.c: Likewise.
	* gcc.target/powerpc/float128-complex-1.c: Likewise.
	* gcc.target/powerpc/float128-complex-2.c: Likewise.
	* gcc.target/powerpc/float128-hw.c: Likewise.
	* gcc.target/powerpc/float128-mix.c: Likewise.
	* gcc.target/powerpc/float128-type-1.c: Likewise.
	* gcc.target/powerpc/float128-type-2.c: Likewise.
	* gcc.target/powerpc/float128-3.c: New test.
	* gcc.target/powerpc/float128-4.c: Likewise.
	* gcc.target/powerpc/float128-5.c: Likewise.

From-SVN: r251814
2017-09-06 17:41:08 +00:00
Eric Botcazou 3f8cf83477 decl.c (warn_on_field_placement): Issue the warning only if the record type itself comes from source.
* gcc-interface/decl.c (warn_on_field_placement): Issue the warning
	only if the record type itself comes from source.

From-SVN: r251812
2017-09-06 17:22:40 +00:00
Wilco Dijkstra 260da99192 PR78468 - add alloca alignment test
Add an alignment test to check that aligned alloca's really do get
correctly aligned.  Some targets may not ensure SP is always a multiple
of STACK_BOUNDARY (particularly with outgoing arguments), which means
aligned alloca does not get correctly aligned.  This can be fixed either
by aligning the outgoing arguments or setting STACK_BOUNDARY correctly.

    testsuite/
        PR middle-end/78468
	* gcc.dg/pr78468.c: Add alignment test.

From-SVN: r251811
2017-09-06 16:34:54 +00:00
Olivier Hainque 4a40b308ef config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
2017-09-06  Olivier Hainque  <hainque@adacore.com>

	* config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.

From-SVN: r251809
2017-09-06 15:51:51 +00:00