Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213145 138bc75d-0d04-0410-961f-82ee72b054a4
	* gimple-fold.c (fold_gimple_assign): Fix condition guarding
	ipa-devirt path; fix thinko there.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213150 138bc75d-0d04-0410-961f-82ee72b054a4
	* cgraph.c (cgraph_node::create_indirect_edge): Copy speculative data.
	* cgraph.h (cgraph_indirect_call_info): Add speculative data.
	* gimple-fold.c (fold_gimple_assign): Fix check for virtual
	call.
	* ipa-devirt.c (ipa_dummy_polymorphic_call_context): Update
	(contains_type_p): Forward declare.
	(polymorphic_call_target_hasher::hash): Hash speculative info.
	(polymorphic_call_target_hasher::equal): Compare speculative info.
	(get_class_context): Handle speuclation.
	(contains_type_p): Update.
	(get_polymorphic_call_info_for_decl): Update.
	(walk_ssa_copies): Break out from ...
	(get_polymorphic_call_info): ... here; set speculative context
	before giving up.
	* ipa-prop.c (ipa_write_indirect_edge_info, ipa_read_indirect_edge_info):
	Stream speculative context.
	* ipa-utils.h (ipa_polymorphic_call_context): Add speculative info
	(SPECULATIVE_OFFSET, SPECULATIVE_OUTER_TYPE,
	SPECULATIVE_MAYBE_DERIVED_TYPE).
	(possible_polymorphic_call_targets overriders): Update.
	(dump_possible_polymorphic_call_targets overriders): Update.
	(dump_possible_polymorphic_call_target_p overriders): Update.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213152 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Richard Biener  <rguenther@suse.de>

	PR middle-end/52478
	* expr.c (expand_expr_real_2): Revert last change.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213153 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c (sra_modify_constructor_assign): Change type of stmt
	parameter to gimple.
	(sra_modify_assign): Likewise.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213154 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
	formal parameter Obj_Id and update the comment on usage. Renamed
	Obj_Typ to Func_Typ and update all occurrences.
	(Find_Last_Init): Remove formal parameter Decl and update the comment
	on usage.
	Remove local constants Obj_Id and Obj_Typ. Remove local variables
	Init_Typ and Is_Conc. Remove the extraction of the initialization type.
	(Find_Last_Init_In_Block): Remove formal parameter
	Init_Typ and update the comment on usage.
	(Is_Init_Call): Remove formal parameter Init_Typ and update the comment
	on usage. Check whether the procedure call is an initialization
	procedure of either the object type or the initialization type.
	(Is_Init_Proc_Of): New routine.
	(Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
	routine. Add new variable Init_Typ. Add circuitry to extract the object
	type as well as the initialization type.

2014-07-29  Robert Dewar  <dewar@adacore.com>

	* sem_case.adb: Minor reformatting.
	* sem_aux.ads: Minor reformatting.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
	pointer on these fields, even though they are semantic, because
	subsequent analysis and expansion of action nades may require
	exploring the tree, for example to locate a node to be wrapped
	when a function with controlled result is called.

2014-07-29  Claire Dross  <dross@adacore.com>

	* sem_aux.adb (Get_Binary_Nkind): Use case on
	Name_Id instead of an intermediate string.
	(Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
	string.

2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>

	* gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
	about processing sources with preprocessor directives.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213155 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Thomas Quinot  <quinot@adacore.com>

	* errout.adb (Set_Error_Posted): When propagating flag to
	an enclosing named association, also propagate to the parent
	of that node, so that named and positional associations are
	treated consistently.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Resolve_Attribute, case 'Update):  Set
	Do_Range_Check properly on array component expressions that
	have a scalar type. In GNATprove mode, only checks on scalar
	components must be marked by the front-end.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Type_Conversion): If the type of the
	expression is a limited view, use the non-limited view when
	available.

2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
	case statement as coming from a conditional expression.
	(Expand_N_If_Expression): Mark the generated if statement as
	coming from a conditional expression.
	* exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
	objects found in case statement alternatives when the case
	statement is actually a case expression.
	(Expand_N_If_Statement):
	Do not process controlled objects found in an if statement when
	the if statement is actually an if expression.
	* sinfo.adb (From_Conditional_Expression): New routine.
	(Set_From_Conditional_Expression): New routine.
	* sinfo.ads Add new semantic flag From_Conditional_Expression and
	update related nodes.
	(From_Conditional_Expression): New routine along with pragma Inline.
	(Set_From_Conditional_Expression): New routine along with pragma Inline.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213156 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* errout.adb: Minor reformatting.

2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Default_Initialize_Object): Add new variables
	Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
	not allowed to ensure the symmetrical generation of symbols.
	* exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
	and E_Decl. Add new variables Decl and Dummy. Generate a dummy
	temporary when aborts are not allowed to ensure symmertrical
	generation of symbols.
	* exp_intr.adb (Expand_Unc_Deallocation): Add new variable
	Dummy. Generate a dummy temporary when aborts are not allowed
	to ensure symmertrical generation of symbols.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_dbug.adb (Debug_Renaming_Declaration): For an object
	renaming, indicate that the renamed entity itself needs debug
	information. This is necessary if that entity is a temporary,
	e.g. part of the expansion of an explicit dereference in an
	iterator.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213157 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Process_Transient_Object): Remove constant
	In_Cond_Expr, use its initialization expression in place.
	* exp_ch7.adb (Process_Declarations): There is no need to check
	that a transient object being hooked is controlled as it would
	not have been hooked in the first place.
	* exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
	objects are not considered aliased when the related context is
	a Boolean expression_with_actions.
	(Requires_Cleanup_Actions): There is no need to check that a transient
	object being hooked is controlled as it would not have been hooked in
	the first place.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213158 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
	to Is_OK_Static_Range.
	* sem_attr.adb (Eval_Attribute): Make sure we properly flag
	static attributes (Eval_Attribute, case Size): Handle size of
	zero properly (Eval_Attribute, case Value_Size): Handle size of
	zero properly.
	* sem_ch13.adb: Minor reformatting.
	* sem_ch3.adb (Process_Range_Expr_In_Decl): Change
	Is_Static_Range to Is_OK_Static_Range.
	* sem_eval.adb (Eval_Case_Expression): Total rewrite, was
	wrong in several ways (Is_Static_Range): Moved here from spec
	(Is_Static_Subtype): Moved here from spec Change some incorrect
	Is_Static_Subtype calls to Is_OK_Static_Subtype.
	* sem_eval.ads: Add comments to section on
	Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
	Add clarifying comments (Is_Static_Range): Moved to body
	(Is_Statically_Unevaluated): New function.
	* sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
	Is_Static_Range to Is_OK_Static_Range.
	* sinfo.ads: Additional commments for Is_Static_Expression noting
	that clients should almost always use Is_OK_Static_Expression
	instead. Many other changes throughout front end units to obey
	this rule.
	* tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
	for enumeration literal.
	* exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
	lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
	sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
	exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
	Replace all occurrences of Is_Static_Expression by
	Is_OK_Static_Expression.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213159 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
	* opt.adb: Handle Uneval_Old.
	* opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
	* par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
	* sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
	* sem_attr.adb (Uneval_Old_Msg): New procedure.
	* sem_ch8.adb (Push_Scope): Save Uneval_Old.
	(Pop_Scope): Restore Uneval_Old.
	* sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
	Implemented.
	* snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
	Add entries for Name_Warn, Name_Allow.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213160 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
	einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
	sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
	handling. Change name of Discrete_Predicate to
	Discrete_Static_Predicate, and replace testing of the presence of this
	field by testing the flag Has_Static_Expression.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213161 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
	(Set_Static_Real_Or_String_Predicate): New procedure
	* sem_ch13.adb (Build_Predicate_Functions): Accomodate static
	string predicates (Is_Predicate_Static): Handle static string
	predicates.
	* sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
	New procedure (Check_Expression_Against_Static_Predicate):
	Deal with static string predicates, now fully implemented
	(Eval_Relational_Op): Allow string equality/inequality as static
	if not comes from source.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213162 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* einfo.adb (Has_Protected): Test base type.
	* sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
	that we always properly check No_Protected_Type_Allocators.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.ads, sem_util.adb (Defining_Entity):	Now applies to
	loop declarations as well.
	* exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
	to an iterator loop, because it may contain local renaming
	declarations that require debugging information.

2014-07-29  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213163 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
	a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
	and then use it when a stream operation is used from a library generic
	when the restriction (No_Streams) is active.

2014-07-29  Thomas Quinot  <quinot@adacore.com>

	* projects.texi: Fix minor typo.

2014-07-29  Yannick Moy  <moy@adacore.com>

	* sem_attr.adb (Analyze_Attribute): Fix generation of warning.

2014-07-29  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
	CodePeer mode.

2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Find_Last_Init): Add local variable
	Deep_Init_Found. Check the statement immediately following the
	declaration if [Deep_]Initialization was not found.

2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (Is_Aliased): It appears that
	'reference-d and renamed objects still play some role in Boolean
	expression with actions and cannot be finalized immediately.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_dbug.adb (Qualify_Needed):  For debugging purposes,
	Loop names are not part of the full qualification of entity names.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213164 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
	to make sure that the Etype of a component of the corresponding
	record type is present before trying to freeze it.
	* sem_ch5.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213165 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
	(Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
	SSO_Default_Specified.
	* ali.ads (ALIs_Record): Add field SSO_Default
	(SSO_Default_Specified): New global switch.
	* bcheck.adb (Check_Consistent_SSO_Default): New procedure
	(Check_Configuration_Consistency): Call this procedure
	* einfo.adb (SSO_Set_High_By_Default): New
	function (SSO_Set_Low_By_Default): New function
	(Set_SSO_Set_High_By_Default): New procedure
	(Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
	List new flags
	* einfo.ads (SSO_Set_Low_By_Default): New flag
	(SSO_Set_High_By_Default): New flag
	* freeze.adb (Set_SSO_From_Default): New procedure
	(Freeze_Array_Type): Call Set_SSO_From_Default
	(Freeze_Record_Type): Call Set_SSO_From_Default
	* gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
	* lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
	* lib-writ.ads: Add OL/OH parameters to P line
	* opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
	* opt.ads (Default_SSO): New global switch (Default_SSO_Config):
	New global switch
	* repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
	set by default using pragma Default_Scalar_Storage_Order.
	* sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
	* sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
	Clear SSO defaults when explicit SSO is inherited.
	(Analyze_Attribute_Definition_Clause): Clear SSO defaults when
	explicit SSO is specified.
	(Inherit_Aspects_At_Freeze_Point):
	Clear SSO default when inheriting SSO.
	* sem_ch3.adb (Set_Default_SSO): New procedure
	(Analyze_Private_Extension_Declaration): Set defualt SSO
	(Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
	(Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
	ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
	(Record_Type_Declaration): ditto
	* sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
	Save Default_SSO
	* sem_prag.adb (Analyze_Pragma, case
	Default_Scalar_Storage_Order): Set Default_SSO

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Valid_Operator_Definition): Verify that
	all parameter have mode IN. This check must be done here for
	subprogram instantiations that have operator names, because their
	analysis does not follow the same path as that for subprogram
	declarations.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213167 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Clean up and correct documentation of warnings.
	* usage.adb: Minor corrections to make sure warnings are properly
	documented.
	* warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
	(WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.

2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
	created to match internal sequence numbers between compilations
	with/without abort must have its type properly set.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213168 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Olivier Hainque  <hainque@adacore.com>

	* g-debpoo.adb
	(Default_Alignment): Rename as Storage_Alignment. This is not
	a "default" that can be overriden. Augment comment to clarify
	intent and document why we need to manage alignment padding.
	(Header_Offset): Set to Header'Object_Size instead of 'Size
	rounded up to Storage_Alignment. Storage_Alignment on the
	allocation header is not required by our internals so was
	overkill. 'Object_Size is enough to ensure proper alignment
	of the header address when substracted from a storage address
	aligned on Storage_Alignment.
	(Minimum_Allocation): Rename as Extra_Allocation, conveying that
	this is always added on top of the incoming allocation requests.
	(Align): New function, to perform alignment rounding operations.
	(Allocate): Add comments on the Storage_Address computation
	scheme and adjust so that the alignment padding applies to that
	(Storage_Address) only.

2014-07-29  Robert Dewar  <dewar@adacore.com>

	* exp_ch3.adb (Default_Initialize_Object): Remove incorrect
	pragma Unreferenced.
	* cstand.adb (Create_Standard): Use E_Array_Type for standard
	string types. Make sure index of Any_String/Any_Array is in a list.
	* errout.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213169 138bc75d-0d04-0410-961f-82ee72b054a4
2014-07-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Complete_Object_Operation): If the type of the
	candidate subprogram is a limited view, use non-limited view
	when available.

2014-07-29  Robert Dewar  <dewar@adacore.com>

	* sem_ch13.adb: Minor change in RM reference.
	* sem_mech.ads: Minor reformatting.
	* einfo.ads: Minor comment fix.
	* types.ads: Minor correction to range given for Mechanism_Type.
	* exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
	check predicate on way out for OUT or IN OUT parameters.
	* par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
	better (P_Range_Constraint): Corresponding fix.
	* checks.ads: Minor comment clarification.

2014-07-29  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
	and Treat_As_Volatile flags based on whether the renamed object
	is a volatile object.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213170 138bc75d-0d04-0410-961f-82ee72b054a4