Commit Graph

145395 Commits

Author SHA1 Message Date
Uros Bizjak 8f6a773bd8 i386.md (*lea<mode>_general_1): Rename from *lea_general_1.
* config/i386/i386.md (*lea<mode>_general_1): Rename from
	*lea_general_1.  Use explicit SWI12 mode interator.
	(*lea<mode>_general_2): Rename from *lea_general_2.
	Use explicit SWI12 mode interator.
	(*lea<mode>_general_3): Rename from *lea_general_3.
	Use explicit SWI12 mode interator.
	(*lea<SWI12:mode>_general_4): Split from *lea_general_4.
	Use explicit SWI12 mode interator.
	(*lea<SWI48:mode>_general_4): Split from *lea_general_4.
	Use explicit SWI48 mode interator.

From-SVN: r235286
2016-04-20 16:33:05 +02:00
H.J. Lu 7ccc95364c Simplify ix86_expand_vector_move_misalign
Since mov<mode>_internal patterns handle both aligned/unaligned load
and store, we can simplify ix86_avx256_split_vector_move_misalign and
ix86_expand_vector_move_misalign.

	* config/i386/i386.c (ix86_avx256_split_vector_move_misalign):
	Short-cut unaligned load and store cases.  Handle all integer
	vector modes.
	(ix86_expand_vector_move_misalign): Short-cut unaligned load
	and store cases.  Call ix86_avx256_split_vector_move_misalign
	directly without checking mode class.

From-SVN: r235283
2016-04-20 06:39:28 -07:00
Andrew Pinski 9e3e4fab84 [AArch64] Work around PR target/64971
2016-04-20  Andrew Pinski  <apinski@cavium.com>
            Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/64971
	* config/aarch64/aarch64.md (sibcall): Force call
	address to be DImode for ILP32.
	(sibcall_value): Likewise.

	* gcc.c-torture/compile/pr37433-1.c: New testcase.


Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com>

From-SVN: r235281
2016-04-20 13:29:32 +00:00
H.J. Lu ce6d77a40a Replace -skip-rax-setup with -mskip-rax-setup
* doc/invoke.texi: Replace -skip-rax-setup with -mskip-rax-setup.

From-SVN: r235275
2016-04-20 05:55:36 -07:00
Richard Biener 545cd7ecc8 gimple-match.h (maybe_build_generic_op): Adjust prototype.
2016-04-20  Richard Biener  <rguenther@suse.de>

	* gimple-match.h (maybe_build_generic_op): Adjust prototype.
	* gimple-match-head.c (maybe_build_generic_op): Pass all ops
	by reference, clear op1 and op2 when GENERICizing BIT_FIELD_REF.
	(maybe_push_res_to_seq): Adjust.
	* gimple-fold.c (maybe_build_generic_op): Likewise.

From-SVN: r235274
2016-04-20 12:49:58 +00:00
Marek Polacek dd39022b9e tree-if-conv.c (is_false_predicate): For NULL_TREE return false rather than true.
* tree-if-conv.c (is_false_predicate): For NULL_TREE return false
	rather than true.

From-SVN: r235272
2016-04-20 12:37:38 +00:00
Arnaud Charlet d7aa24e4bc * gnat.dg/self1.adb: Remove now incorrect test.
From-SVN: r235271
2016-04-20 14:28:48 +02:00
Ilya Enkovich ab04f5cd79 sse.md (vec_unpacks_lo_hi): Always use kmovw to support AVX512F target.
gcc/

	* config/i386/sse.md (vec_unpacks_lo_hi): Always
	use kmovw to support AVX512F target.

From-SVN: r235270
2016-04-20 11:47:13 +00:00
Bin Cheng e6d62b46c8 tree-scalar-evolution.c (interpret_rhs_expr): Handle BIT_AND_EXPR.
* tree-scalar-evolution.c (interpret_rhs_expr): Handle BIT_AND_EXPR.

	* gcc.dg/tree-ssa/scev-11.c: New test.
	* gcc.dg/tree-ssa/scev-12.c: New test.

From-SVN: r235269
2016-04-20 11:42:36 +00:00
Arnaud Charlet 6905a0499b [multiple changes]
2016-04-20  Bob Duff  <duff@adacore.com>

	* s-os_lib.ads: Minor comment fix.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
	a discriminant check for a type whose partial view has unknown
	discriminants when the full view has discriminants with defaults.

2016-04-20  Javier Miranda  <miranda@adacore.com>

	* exp_util.adb (Remove_Side_Effects): When generating C code
	remove side effect of type conversion of access to unconstrained
	array type.
	(Side_Effect_Free): Return false for the type
	conversion of access to unconstrained array type when generating
	C code.
	* sem_res.adb (Resolved_Type_Conversion): Remove side effects
	of access to unconstrained array type conversion when generating
	C code.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Build_Predicate_Function_Declaration): New
	function, to construct the declaration of a predicate function
	at the end of the current declarative part rather than at the
	(possibly later) freeze point of the type. This also allows uses
	of a type with predicates in instantiations elsewhere.
	(Resolve_Aspect_Expression): New procedure to detect visiblity
	errors in aspect expressions, at the end of the declarative part
	that includes the type declaration.
	* sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
	predicate function from private to full view.
	* einfo.adb (Predicate_Function): Refine search for predicate
	function when type has a full view and predicate function may
	be defined on either view.

2016-04-20  Javier Miranda  <miranda@adacore.com>

	* frontend.adb: Passing the root of the tree to
	Unnest_Subprograms().
	* exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
	took care of adding subprograms to the Unest_Bodies table since
	performing such action too early disables the ability to process
	generic instantiations.
	(Unnest_Subprograms): Adding parameter.
	(Search_Unnesting_Subprograms): New subprogram.
	* exp_ch6.ads (Unnest_Subrograms): Update documentation.

From-SVN: r235268
2016-04-20 12:56:12 +02:00
Arnaud Charlet 268aeaa902 [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Check_Static_Type): For a private type, check
	full view.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Check_Type): Reject an attribute reference in
	an aspect expression, when the prefix of the reference is the
	current instance of the type to which the aspect applies.

From-SVN: r235267
2016-04-20 12:51:01 +02:00
Arnaud Charlet 51b42ffa5e [multiple changes]
2016-04-20  Bob Duff  <duff@adacore.com>

	* sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
	hiding unless we're actually hiding something. The previous
	code would (for example) warn about a "<" on a record type
	because it incorrectly thought it was hiding the "<" on Boolean
	in Standard. We need to check that the homonym S is in fact a
	homograph of a predefined operator.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
	from exp_ch6.adb, for use in SPARK_To_C mode when creating the
	procedure equivalent to a function returning an array, when this
	construction is deferred to the freeze point of the function.
	* sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
	function that renames an instance of Unchecked_Conversion.
	* freeze.adb (Freeze_Subprogram): Generate the proper procedure
	declaration for a function returning an array.
	* exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.

From-SVN: r235266
2016-04-20 12:49:24 +02:00
Ed Schonberg f73dc37f75 sem_util.ads, [...] (Is_Expanded_Priority_Attribute): New predicate to determine that in a context with full run-time...
2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
	New predicate to determine that in a context with full run-time,
	a function call is an expansion of a reference to attribute
	Priority.
	* sem_ch5.adb (Analyze_Function_Call): use it.
	* exp_ch5.adb (Expand_N_Subprogram_Call): use it.

From-SVN: r235265
2016-04-20 12:46:57 +02:00
Arnaud Charlet 75a957f5db [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb Flag286 is now used as Is_Exception_Handler.
	(Is_Exception_Handler): New routine.
	(Set_Is_Exception_Handler): New routine.
	(Write_Entity_Flags): Output the status of Is_Exception_Handler.
	* einfo.ads New attribute Is_Exception_Handler along with
	occurrences in entities.
	(Is_Exception_Handler): New routine along with pragma Inline.
	(Set_Is_Exception_Handler): New routine along with pragma Inline.
	* exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
	for exception handlers with a choice parameter.
	* sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
	generated for a choice parameter as an exception handler.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
	(Constrain_Discriminated_Type): In an instance, if the type has
	unknown discriminants, use its full view.
	(Process_Subtype): Check that the base type is private before
	adding subtype to Private_Dependents list.

2016-04-20  Bob Duff  <duff@adacore.com>

	* sem_ch13.adb: Minor comment fix.

From-SVN: r235264
2016-04-20 12:45:55 +02:00
Yannick Moy bc795e3e03 sem_ch4.adb: Fix typos in comments.
2016-04-20  Yannick Moy  <moy@adacore.com>

	* sem_ch4.adb: Fix typos in comments.
	* sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.

From-SVN: r235263
2016-04-20 12:44:17 +02:00
Arnaud Charlet d493941584 Minor reformatting.
From-SVN: r235262
2016-04-20 12:43:18 +02:00
Arnaud Charlet 0f8b3e5ddd [multiple changes]
2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): A reference to the
	current instance of a task type is legal if the prefix is an
	expression of that task type and the selector is an entry or
	entry family.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
	varsize field at the end for efficiency.

From-SVN: r235261
2016-04-20 12:43:03 +02:00
Arnaud Charlet 0c61772a12 [multiple changes]
2016-04-20  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
	ls" includes the switch -V.
	* clean.adb: "<target>-gnatclean -P" now calls "gprclean
	--target=<target>"
	* make.adb: "<target>-gnatmake -P" now calls "gprbuild
	--target=<target>"

2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Qualify_Type): Do not perform
	partial qualification when the immediate scope is a generic unit.

From-SVN: r235260
2016-04-20 12:40:48 +02:00
Hristian Kirtchev 61d1b085b9 exp_unst.adb: Minor reformatting.
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_unst.adb: Minor reformatting.

From-SVN: r235259
2016-04-20 12:38:24 +02:00
Arnaud Charlet 18431dc503 [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
	tag assignment and adjustment preceed the accessibility check.
	* exp_ch7.adb (Is_Subprogram_Call): Reimplemented.

2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_prag.adb (Expand_Attributes): Ensure that
	the temporary used to capture the value of attribute 'Old's
	prefix is properly initialized.

2016-04-20  Javier Miranda  <miranda@adacore.com>

	* exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
	level.

From-SVN: r235258
2016-04-20 12:36:01 +02:00
Arnaud Charlet dfbc6cbe30 [multiple changes]
2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
	in codepeer mode.

2016-04-20  Vincent Celier  <celier@adacore.com>

	* make.adb: Code cleanup.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch4.adb (Expand_Allocator_Expression): Help C code
	generation.

From-SVN: r235257
2016-04-20 12:31:59 +02:00
Arnaud Charlet 06f6c43f5c [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Copy_Generic_Node): Handle the special
	qualification installed for universal literals that act as
	operands in binary or unary operators.	(Qualify_Operand): Mark
	the qualification to signal the instantiation mechanism how to
	handle global reference propagation.
	* sinfo.adb (Is_Qualified_Universal_Literal): New routine.
	(Set_Is_Qualified_Universal_Literal): New routine.
	* sinfo.ads New attribute Is_Qualified_Universal_Literal along
	with occurrences in nodes.
	(Is_Qualified_Universal_Literal):
	New routine along with pragma Inline.
	(Set_Is_Qualified_Universal_Literal): New routine along with
	pragma Inline.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
	so that the corresponding checks are preserved across compilations
	that include System.Constants in their context.

2016-04-20  Gary Dismukes  <dismukes@adacore.com>

	* sem_type.adb: Minor typo fix and reformatting.
	* a-conhel.ads: Update comment.

2016-04-20  Bob Duff  <duff@adacore.com>

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

From-SVN: r235256
2016-04-20 12:29:26 +02:00
Arnaud Charlet 71129dded1 [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_attr.ads Add new table Universal_Type_Attribute.
	* sem_util.adb (Yields_Universal_Type): Use a table lookup when
	checking attributes.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Init_Stored_Discriminants,
	Init_Visible_Discriminants): New procedures, subsidiary of
	Build_Record_Aggr_Code, to handle properly the construction
	of aggregates for a derived type that constrains some parent
	discriminants and renames others.

From-SVN: r235255
2016-04-20 12:26:48 +02:00
Hristian Kirtchev 5c63aafa2e sem_ch12.adb (Qualify_Universal_Operands): New routine.
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Qualify_Universal_Operands): New routine.
	(Save_References_In_Operator): Add explicit qualifications in
	the generic template for all operands of universal type.
	* sem_type.adb (Disambiguate): Update the call to Matches.
	(Matches): Reimplemented.
	* sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.

From-SVN: r235254
2016-04-20 12:19:57 +02:00
Arnaud Charlet 7e22a38c2f [multiple changes]
2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Rep_Item_Too_Late): Better error message for
	an illegal aspect that freezes the entity to which it applies.

2016-04-20  Bob Duff  <duff@adacore.com>

	* a-stwibo.ads, a-stzbou.ads
	("="): Add overriding keyword before function to avoid crash when
	compiler is called with -gnatyO (check overriding indicators).

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Check_Policy):  If this
	is a configuration pragma and it uses the ARG syntax, insert
	the rewritten pragma after the current one rather than using
	Insert_Actions.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* exp_aggr.adb (Backend_Processing_Possible): Add handling of
	C back-end.

From-SVN: r235253
2016-04-20 12:10:32 +02:00
Hristian Kirtchev b83dd5ecea s-imgllu.adb, [...]: Minor reformatting.
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
	s-imglli.adb: Minor reformatting.

From-SVN: r235251
2016-04-20 12:05:41 +02:00
Marek Polacek 2697b18902 re PR tree-optimization/70725 (Internal compiler error (ICE) on valid code)
PR tree-optimization/70725
	* tree-if-conv.c (is_false_predicate): New function.
	(predicate_mem_writes): Use it.

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

From-SVN: r235250
2016-04-20 09:32:45 +00:00
Hristian Kirtchev d566e90a16 sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the renamed operator when the associated node appears within a...
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
	renamed operator when the associated node appears within a
	pre/postcondition.
	* sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.

From-SVN: r235249
2016-04-20 11:22:59 +02:00
Arnaud Charlet 9a476d752d [multiple changes]
2016-04-20  Yannick Moy  <moy@adacore.com>

	* osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
	* einfo.adb (Set_Overridden_Operation): Add assertion.
	* sem_util.adb (Unique_Entity): for renaming-as-body return the spec
	entity.

2016-04-20  Javier Miranda  <miranda@adacore.com>

	* exp_unst.adb (Append_Unique_Call): New subprogram.
	(Unnest_Subprogram): Replace the unique occurrence
	of Call.Append() by Append_Unique_Call() which protects us from
	adding to the Calls table duplicated entries.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* exp_attr.adb (Is_GCC_Target): Fix for C backend.
	* xref_lib.ads (Dependencies_Tables): instantiate
	Table package with types that guarantee its safe use.
	* s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
	procedures.

From-SVN: r235248
2016-04-20 11:21:59 +02:00
Arnaud Charlet 88438c0e87 exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Disable expansion when generating C code.
2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
	Disable expansion when generating C code.
	* sinfo.ads, inline.ads: Minor editing.

From-SVN: r235247
2016-04-20 11:18:59 +02:00
Hristian Kirtchev c37e6613f5 sem_util.adb, [...]: Minor reformatting.
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
	reformatting.

From-SVN: r235246
2016-04-20 11:17:15 +02:00
Javier Miranda 7f5e1dee7c contracts.adb (Build_Postconditions_Procedure): Code cleanup.
2016-04-20  Javier Miranda  <miranda@adacore.com>

	* contracts.adb (Build_Postconditions_Procedure): Code cleanup.
	* ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
	declaration of the internally built _postcondition procedure.

From-SVN: r235245
2016-04-20 11:15:47 +02:00
Arnaud Charlet 31ae1b4629 [multiple changes]
2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
	indentation.
	* sem_util.adb (Is_Unchecked_Conversion_Instance):
	defense against library-level renamings of other functions,
	which are never instances of Unchecked_Conversion.
	* einfo.ads: minor fix of casing in comment

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
	that has been analyzed and expanded already. Qualify the names
	in the proper body for use in the generation of C code.

From-SVN: r235244
2016-04-20 11:14:02 +02:00
Arnaud Charlet 1ba563f5f9 [multiple changes]
2016-04-20  Javier Miranda  <miranda@adacore.com>

	* contracts.adb (Build_Postconditions_Procedure): Force its
	inlining when generating C code.
	* sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
	_postconditions when generating C code.
	* exp_ch6.adb (Inlined_Subprogram): Inline calls to
	_postconditions when generating C code.
	* sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
	types of return value and argument changed from Node_Id to
	Entity_Id.

2016-04-20  Vincent Celier  <celier@adacore.com>

	* make.adb, clean.adb, gnatname.adb: Revert previous change for now.

2016-04-20  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
	the Has_Delayed_Freeze flag on the anonymous instance node.

From-SVN: r235243
2016-04-20 11:11:42 +02:00
Arnaud Charlet e361e9a1db [multiple changes]
2016-04-20  Javier Miranda  <miranda@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
	scope associated with the renaming object declaration.
	* exp_util.adb (Insert_Actions): Remove handling of iterator
	loop marked as requiring the secondary stack.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Attribute, case 'Image): Implement
	AI12-0124, which extends the functionality of the attribute so it
	reflects the semantics of GNAT 'Img when applied to scalar types.
	* lib-xref.adb: minor whitespace layout fix.

From-SVN: r235242
2016-04-20 11:08:55 +02:00
Arnaud Charlet d67ffa886d [multiple changes]
2016-04-20  Vincent Celier  <celier@adacore.com>

	* clean.adb (Gnatclean): Fail if project file specified and
	gprclean is not available.
	* gnatname.adb: Fail is -P is used and gprname is not available.
	* make.adb (Initialize): Fail if project file specified and
	gprbuild is not available.

2016-04-20  Bob Duff  <duff@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
	stack when possible.

From-SVN: r235241
2016-04-20 11:07:12 +02:00
Arnaud Charlet 93e90bf474 [multiple changes]
2016-04-20  Gary Dismukes  <dismukes@adacore.com>

	* par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
	reformatting.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
	If the pragma comes from an aspect specification, verify that
	the aspect applies to an entity with a declarative part.
	* exp_ch5.adb: Code cleanup.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_If_Expression): If first expression is
	universal, resolve subsequent ones with the corresponding class
	type (Any_Integer or Any_Real).

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
	disabled, complete the analysis of the iterator name to ensure
	that reference for entities within are properly generated.

2016-04-20  Arnaud Charlet  <charlet@adacore.com>

	* a-dispat.ads (Yield): add Global contract.
	* a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
	* a-taside.adb: Added Initializes => Tasking_State.

From-SVN: r235240
2016-04-20 11:04:48 +02:00
Hristian Kirtchev ae3d8837bd sem_ch13.adb (Build_Invariant_Procedure): Reimplement the invariant procedure spec and body insertion.
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Build_Invariant_Procedure):
	Reimplement the invariant procedure spec and body insertion.

From-SVN: r235239
2016-04-20 11:00:58 +02:00
Arnaud Charlet 776fbb7478 [multiple changes]
2016-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch13.adb (Add_Invariant): Do not replace
	the saved expression of an invariatn aspect when inheriting
	a class-wide type invariant as this clobbers the existing
	expression. Do not use New_Copy_List as it is unnecessary
	and leaves the parent pointers referencing the wrong part of
	the tree. Do not replace the type references for ASIS when
	inheriting a class-wide type invariant as this clobbers the
	existing replacement.

2016-04-20  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Build_Explicit_Dereference): If the designated
	expression is an entity name, generate reference to the entity
	because it will not be resolved again.

From-SVN: r235238
2016-04-20 10:59:02 +02:00
Richard Biener 60d393e89c re PR tree-optimization/70726 (Internal compiler error (ICE) on valid code)
2016-04-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70726
	* tree-vect-stmts.c (vectorizable_shift): Do not use scalar
	shift amounts from a pattern stmt operand.

	* g++.dg/vect/pr70726.cc: New testcase.

From-SVN: r235236
2016-04-20 07:20:16 +00:00
Andreas Krebbel 82c6f58aaf PR70674: S/390: Add memory barrier to stack pointer restore from fpr.
This patches fixes a problem with stack variable accesses being
scheduled after the stack pointer restore instructions.  In the
testcase this happened with the stack variable 'a' accessed through the
frame pointer.

The existing stack_tie we have in the backend is basically useless
when trying to block stack variable accesses from being scheduled
across an insn.  The alias set of stack variables and the frame alias
set usually differ and hence aren't in conflict with each other.  The
solution appears to be a magic MEM term with a scratch register which
is handled as a full memory barrier when analyzing scheduling
dependencies.

With the patch a (clobber (mem:BLK (scratch))) is being added to the
restore instruction in order to prevent any memory operations to be
scheduled across the insn.  The patch does that only for the one case
where the stack pointer is restored from an FPR.  Theoretically this
might happen also in the case where the stack pointer gets restored
using a load multiple.  However, triggering that problem with
load-multiple appears to be much harder since the load-multiple will
restore the frame pointer as well.  So in order to see the problem a
different call-clobbered register would need to be used as temporary
stack pointer.

Another case which needs to be handled some day is the stack pointer
allocation part.  It needs to be a memory barrier as well.

Bootstrapped and regression tested with --with-arch z196 and z13 on
s390 and s390x.

-Andreas-

gcc/ChangeLog:

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

	PR target/70674
	* config/s390/s390.c (s390_restore_gprs_from_fprs): Pick the new
	stack_restore_from_fpr pattern when restoring r15.
	(s390_optimize_prologue): Strip away the memory barrier in the
	parallel when trying to get rid of restore insns.
	* config/s390/s390.md ("stack_restore_from_fpr"): New insn
	definition for loading the stack pointer from an FPR.  Compared to
	the normal move insn this pattern includes a full memory barrier.

gcc/testsuite/ChangeLog:

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

	PR target/70674
	* gcc.target/s390/pr70674.c: New test.

From-SVN: r235234
2016-04-20 07:13:23 +00:00
Jakub Jelinek 843110834c re PR middle-end/70680 (OpenMP SIMD linear variable privatized too eagerly)
PR middle-end/70680
	* gimplify.c (gimplify_omp_for): Call omp_notice_variable for
	implicitly linear or lastprivate iterator on the outer context.

	* testsuite/libgomp.c/pr70680-1.c: New test.
	* testsuite/libgomp.c/pr70680-2.c: New test.

From-SVN: r235232
2016-04-20 03:42:24 +02:00
Ben Elliston 743af9719d Attach PR number to most recent entry.
From-SVN: r235231
2016-04-20 10:44:21 +10:00
GCC Administrator afe0fab2a5 Daily bump.
From-SVN: r235230
2016-04-20 00:16:22 +00:00
H.J. Lu 6048e2ed5e Remove ssememalign
From INSTRUCTION EXCEPTION SPECIFICATION section in Intel software
developer manual volume 2, only legacy SSE instructions with memory
operand not 16-byte aligned get General Protection fault.  There is
no need to check 1, 2, 4, 8 byte alignments.  Since x86 backend has
accurate constraints and predicates for 16-byte alignment, we can
remove alignment check in ix86_legitimate_combined_insn.

	* config/i386/i386.c (ix86_legitimate_combined_insn): Remove
	alignment check.
	* config/i386/i386.md (ssememalign): Removed.
	* config/i386/sse.md: Remove ssememalign attribute from patterns.

From-SVN: r235224
2016-04-19 15:39:28 -07:00
Ben Elliston 14f0f2fc44 libjava.exp (libjava_arguments): Use 'file normalize' rather than the defunct DejaGnu 'absolute' proc.
* testsuite/lib/libjava.exp (libjava_arguments): Use 'file
	normalize' rather than the defunct DejaGnu 'absolute' proc.

From-SVN: r235222
2016-04-20 07:08:47 +10:00
Jason Merrill 76f3944041 PR c++/66543 - -Wunused-but-set* false positives
* expr.c (mark_exp_read): Handle NON_DEPENDENT_EXPR.
	* pt.c (make_pack_expansion): Call mark_exp_read.
	* semantics.c (finish_id_expression): Call mark_type_use in
	unevaluated context.

From-SVN: r235221
2016-04-19 15:30:22 -04:00
Jerry DeLisle 90eeab20f7 re PR libfortran/70684 (incorrect reading of values from file on Windows)
2016-04-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/70684
	* io/list_read (check_buffers): Add '\r' to check for end of line.
	factor.

	* gfortran.dg/list_read_14.f90: New test.

From-SVN: r235220
2016-04-19 19:24:28 +00:00
Jason Merrill 218e9dde70 DR 2137 - copy-constructor rank in list-initialization
* call.c (implicit_conversion): If we choose a copy constructor
	for list-initialization from the same type, the conversion is an
	exact match.

From-SVN: r235219
2016-04-19 14:50:08 -04:00
Jason Merrill 06ec22b7f6 Improve constexpr handling of other loop forms.
* constexpr.c (breaks): Handle EXIT_EXPR.
	(cxx_eval_loop_expr): Handle COMPOUND_EXPR body.
	(cxx_eval_constant_expression): Handle EXIT_EXPR, improve handling
	of COMPOUND_EXPR.

From-SVN: r235218
2016-04-19 14:50:01 -04:00