2014-02-19  Richard Biener  <rguenther@suse.de>

	PR ipa/60243
	* ipa-prop.c: Include stringpool.h and tree-ssanames.h.
	(ipa_modify_call_arguments): Emit an argument load explicitely and
	preserve virtual SSA form there and for the replacement call.
	Do not update SSA form nor free dominance info.


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

	* exp_attr.adb (Expand_Min_Max_Attribute): New procedure
	(Expand_N_Attribute_Reference): Use this procedure for Min and Max.
	* exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
	declarations from list of actions.
	* output.ads, output.adb (Delete_Last_Char): New procedure.
	* sinfo.ads: Document handling of Mod and expression with actions
	in Modify_Tree_For_C mode.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* par-ch9.adb (P_Task): Add a null statement to produce a
	well-formed task body when due to a previous syntax error the
	statement list is empty.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Check_Dependency_Clause): Account
	for the case where a state with a non-null refinement matches a
	null output list. Comment reformatting.
	(Inputs_Match): Copy a solitary input to avoid an assertion failure
	when trying to match the same input in multiple clauses.

2014-02-19  Gary Dismukes  <dismukes@adacore.com>

	* sem_attr.adb: Minor typo fix.



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

	* style.adb (Missing_Overriding): Warning does not apply in
	language versions prior to Ada 2005.
	* snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
	* sem_attr.adb: Add Attribute_Iterable where needed.
	* exp_attr.adb: ditto.
	* exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
	handle loops and quantified expressions over types that have an
	iterable aspect.  Called from Expand_Iterator_Loop.
	* sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
	with Iterable aspect.
	* sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
	subprograms specified in the Iterable aspect have the proper
	signature involving container and cursor.
	(Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
	* sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
	* sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
	New procedure to retrieve one of the primitives First, Last,
	or Has_Element, from the value of the iterable aspect of a
	formal container.
	(Is_Container_Element): Predicate to recognize expressions
	that denote an element of one of the predefined containers,
	for possible optimization.  This subprogram is not currently
	used, pending ARG discussions on the legality of the proposed
	optimization. Worth preserving for eventual use.
	(Is_Iterator): Recognize formal container types.
	* aspects.ads, aspects.adb: Add Aspect_Iterable where needed.



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

	* par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
	sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.



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

	* exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
	declarations get properly inserted in Modify_Tree_For_C mode.
	* sinfo.ads: Minor comment addition.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207883 138bc75d-0d04-0410-961f-82ee72b054a4
2014-02-19  Yannick Moy  <moy@adacore.com>

	* sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
	subunit in GNATprove_Mode.
	* sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* lib-xref.ads Alphabetize the contents of table
	Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
	for E_Abstract_State. List all letters and symbols in use.
	* sem_prag.adb (Analyze_Abstract_State): Update all calls
	to Create_Abstract_State to reflect the new signature.
	(Create_Abstract_State): Change subprogram profile and update
	the comment on usage. Use the proper location of the state
	declaration when creating a new abstract state entity. Do not
	generate an external name, but simply reuse the name coming from
	the state declaration.



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

	* lib-xref.ads Remove the small table of letter and symbol usage as we
	already have one.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
	messages depending on the offending misplaced aspect specifications.
	(Diagnose_Misplaced_Aspect_Specifications): New routine.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
	for iterable aspect primitives.
	(Resolve_Iterable_Operation): Use expected signature of iterable
	aspect to resolve primitive when overloading is present.
	(Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
	(Check_Signature): Removed.



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

	* sem_prag.adb (Check_Refined_Global_Item):
	A state or variable acts as a constituent only it is part of an
	encapsulating state and the state has visible refinement.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
	postcondition for a function when the expression does not mention
	'Result but the function has in-out parameters.

2014-02-19  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Add documentation on Value_Size forcing biased
	representation.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207886 138bc75d-0d04-0410-961f-82ee72b054a4
2014-02-19  Gary Dismukes  <dismukes@adacore.com>

	* gnat_rm.texi: Minor spelling fixes.

2014-02-19  Doug Rupp  <rupp@adacore.com>

	* init.c: Remove unneeded code.
	* fe.h (Float_Format): New macro
	* gcc-interface/trans.c (gigi): On VMS, set vms_float_format.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207887 138bc75d-0d04-0410-961f-82ee72b054a4
2014-02-19  Yannick Moy  <moy@adacore.com>

	* sinfo.ads: Minor comment update.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* atree.ads: Minor reformatting (change Entity_Info to Einfo).

2014-02-19  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
	that has the No_Ctrl_Actions flag is a suitable node to be
	wrapped if the assigned expression has no finalization actions.
	* sem_eval.adb (Eval_Entity_Name): For a compile time known
	boolean value, mark the corresponding condition SCO as constant.

2014-02-19  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb: Minor reformatting.
	* exp_util.ads (Matching_Standard_Type): New function.
	* exp_ch7.adb: Minor reformatting.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
	to find declaration for Cursor, to handle properly the case of
	a discriminated iterable type.

2014-02-19  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (GNATCmd): Always replace the object dirs of
	imported library projects with the library ALI dirs, when setting
	the object paths.
	* prj-env.ads (Ada_Objects_Path): Correct comments about
	argument Including_Libraries.



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

	* sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
	if Esize values do not match.



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

	* exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
	(Expand_Min_Max_Attribute): Use Matching_Standard_Type.
	* exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
	handling for the case of Modify_Tree_For_C, this approach did
	not work.
	* exp_util.adb (Matching_Standard_Type): New function
	(Side_Effect_Free): New top level functions (from
	Remove_Side_Effects).
	* exp_util.ads (Side_Effect_Free): New top level functions
	(moved from body).
	* sinfo.ads: Minor comment updates.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Simple_Function_Return): If return
	type is unconstrained and uses the secondary stack, mark the
	enclosing function accordingly, to ensure that the value is not
	prematurely removed.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* par.adb Alphabetize the routines in Par.Sync.
	(Resync_Past_Malformed_Aspect): New routine.
	* par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
	variables. Code and comment reformatting. Detect missing
	parentheses on aspects [Refined_]Global and [Refined_]Depends
	with a non-null definition.
	* par-sync.adb: Alphabetize all routines in this separate unit.
	(Resync_Past_Malformed_Aspect): New routine.



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

	* exp_util.adb: Update comments.

2014-02-19  Doug Rupp  <rupp@adacore.com>

	* bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
	* init.c (__gl_float_format): [VMS] New global.
	(__gnat_set_features): Call FP_CONTROL to set FPSR for the float
	representation in effect.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb Add with and use clause for Exp_Prag.
	(Expand_Contract_Cases): Relocated to Exp_Prag.
	* exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
	* exp_prag.adb Add with and use clauses for Checks and Validsw.
	(Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
	structure of the expanded code to showcase the evaluation of
	attribute 'Old prefixes. Add local variable Old_Evals. Expand
	any attribute 'Old references found within a consequence. Add
	circuitry to evaluate the prefixes of attribute 'Old that
	belong to a selected consequence.
	(Expand_Old_In_Consequence): New routine.
	* exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
	* sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
	potentially unevaluated prefix is always evaluated.



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

	* exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.



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

	* par-ch6.adb (P_Return): For extended return, end column lines
	up with RETURN.
	* par.adb: Minor documentation clarification.

2014-02-19  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Check_Loop_Pragma_Placement): Add check
	that Loop_Invariant and Loop_Variant appear consecutively.
	* gnat_rm.texi Update documentation of Loop_Invariant and
	Loop_Variant pragmas.

2014-02-19  Robert Dewar  <dewar@adacore.com>

	* debug.adb: Document -gnatd.X.
	* par-ch5.adb (P_If_Statement): Always check THEN, even if not
	first token
	(Check_Then_Column): Ditto.
	* styleg.adb (Check_Then): Allow THEN on line after IF.
	(Check_Then): Check THEN placement under control of -gnatd.X
	* styleg.ads (Check_Then): Now called even if THEN is not first
	token on line.
	* stylesw.ads (Style_Check_If_Then_Layout): Document new
	relaxed rules.
	* gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.

2014-02-19  Robert Dewar  <dewar@adacore.com>

	* a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
	a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
	prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
	vms_conv.adb: Fix bad layout of IF statements



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207893 138bc75d-0d04-0410-961f-82ee72b054a4
2014-02-19  Yannick Moy  <moy@adacore.com>

	* gnat_rm.texi: Doc clarifications.

2014-02-19  Yannick Moy  <moy@adacore.com>

	* exp_util.adb (Remove_Side_Effects): Do not remove side-effects
	inside a generic.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
	specified First primitive, rather than by name.
	(Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
	and extend error checking for missing primitives and incorrect
	signatures.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Check_Pragma_Implemented): Detect additional
	errors when a Synchronization aspect on an overriding protected
	operation does not match the given aspect on the overridden
	operation of an ancestor interface.

2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
	(Check_Loop_Pragma_Placement): Update
	comment on usage. Remove local variables Orig_Stmt and
	Within_Same_Sequence. Check that the current Loop_Invariant or
	Loop_Variant pragma is grouped together with other such pragmas.
	(Is_Loop_Pragma): New routine.
	(Prev_In_Loop): Removed.



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

	* sem_ch3.adb (Analyze_Declarations): Analyze
	a package contract at the end of the private declarations (if
	applicable), otherwise analyze it and the end of the visible
	declarations.

2014-02-19  Ed Schonberg  <schonberg@adacore.com>

	* style.adb (Missing_Overriding): If subprogram is an
	instantiation, place warning on the instance node itself,
	without mention of the original generic. Do not emit message
	if explicit Ada version is older than the introduction of the
	overriding indicator.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207895 138bc75d-0d04-0410-961f-82ee72b054a4
2014-02-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/60232
	* expr.c (gfc_get_variable_expr): Don't add REF_ARRAY for dimensionful
	functions, which are used as procedure pointer target.


2014-02-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/60232
	* gfortran.dg/typebound_proc_33.f90: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207896 138bc75d-0d04-0410-961f-82ee72b054a4
XFAIL gcc.dg/torture/pr60092.c execution on Solaris 11

	* gcc.dg/torture/pr60092.c: xfail execution on *-*-solaris2.11* at -O0.

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

	PR ipa/60243
	* tree-inline.c (estimate_num_insns): Avoid calling cgraph_get_node
	for all calls.


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