/cp
2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56970
	* init.c (build_offset_ref): Add tsubst_flags_t parameter.
	* semantics.c (finish_qualified_id_expr): Likewise.
	(finish_id_expression): Update.
	* typeck.c (cp_build_addr_expr_1): Likewise.
	* pt.c (tsubst_qualified_id, resolve_nondeduced_context): Likewise.
	* cp-tree.h: Update declarations.

/testsuite
2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/56970
	* g++.dg/cpp0x/sfinae45.C: New.


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


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198233 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Yannick Moy  <moy@adacore.com>

	* adabkend.adb, ali-util.adb, ali.adb, debug.adb,
	errout.adb, errout.ads, erroutc.adb, exp_ch3.adb, exp_ch4.adb,
	exp_ch6.adb, exp_ch7.adb, exp_dbug.adb, exp_util.adb,
	expander.adb, freeze.adb, gnat1drv.adb, lib-writ.adb,
	lib-writ.ads, lib-xref.adb, lib-xref.ads, opt.adb, opt.ads,
	restrict.adb, sem_aggr.adb, sem_attr.adb, sem_ch3.adb,
	sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_eval.adb, sem_prag.adb,
	sem_res.adb, sem_util.adb: Everything with name
	'Alfa' renamed in 'SPARK'. Update comments.
	Renaming of units with name 'Alfa', renamed with 'SPARK' instead.
	* exp_alfa.adb: renamed exp_spark.adb.
	* exp_alfa.ads: renamed exp_spark.ads.
	* get_alfa.adb: renamed get_spark_xrefs.adb.
	* get_alfa.ads: renamed get_spark_xrefs.ads.
	* lib-xref-alfa.adb: renamed lib-xref-spark_specific.adb.
	* put_alfa.adb: renamed put_spark_xrefs.adb.
	* put_alfa.ads: renamed put_spark_xrefs.ads.
	* alfa.adb: renamed spark_xrefs.adb.
	* alfa.ads: renamed spark_xrefs.ads.
	* alfa_test.adb: renamed spark_xrefs_test.adb.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198234 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb (Host_Entry): Introduce intermediate copy of
	memory location pointed to by Hostent_H_Addr, as it might not
	have sufficient alignment.

2013-04-24  Yannick Moy  <moy@adacore.com>

	* repinfo.adb (List_Rep_Info): Set the value of Unit_Casing before
	calling subprograms which may read it.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb: Remove Loop_Entry_Attributes from the usage of
	nodes. Flag 260 is now used.
	(Has_Loop_Entry_Attributes): New routine.
	(Loop_Entry_Attributes): Removed.
	(Set_Has_Loop_Entry_Attributes): New routine.
	(Set_Loop_Entry_Attributes): Removed.
	(Write_Entity_Flags): Write out Flag 260.
	(Write_Field10_Name): Remove the output for Loop_Entry_Attributes.
	* einfo.ads: Remove attribute Loop_Entry_Attributes,
	its related comment and uses in nodes.	Add new attribute
	Has_Loop_Entry_Attributes, related comment and uses in loop nodes.
	(Has_Loop_Entry_Attributes): New routine and pragma Inline.
	(Loop_Entry_Attributes): Removed along with pragma Inline.
	(Set_Has_Loop_Entry_Attributes): New routine and pragma Inline.
	(Set_Loop_Entry_Attributes): Removed along with pragma Inline.
	* exp_attr.adb (Expand_Loop_Entry_Attribute): New routine.
	(Expand_N_Attribute_Reference): Expand attribute 'Loop_Entry.
	* exp_ch5.adb: Remove with and use clause for Elists.
	(Expand_Loop_Entry_Attributes): Removed.
	(Expand_N_Loop_Statement): Add local variable Stmt. Rename local
	constant Isc to Scheme. When a loop is subject to attribute
	'Loop_Entry, retrieve the nested loop from the conditional
	block. Move the processing of controlled object at the end of
	loop expansion.
	* sem_attr.adb (Analyze_Attribute): Do not chain attribute
	'Loop_Entry to its related loop.
	* sem_ch5.adb (Analyze_Loop_Statement): Add local variable
	Stmt. When the iteration scheme mentions attribute 'Loop_Entry,
	the entire loop is rewritten into a block.  Retrieve the nested
	loop in such cases to complete the analysis.
	* sem_util.ads, sem_util.adb (Find_Loop_In_Conditional_Block): New
	routine.
	(Subject_To_Loop_Entry_Attributes): New routine.

2013-04-24  Robert Dewar  <dewar@adacore.com>

	* exp_prag.adb (Expand_Loop_Variant): Generate pragma Check
	(Loop_Variant, xxx) rather than Assert (xxx).
	* gnat_rm.texi: Document pragma Loop_Variant.
	* sem_prag.adb (Analyze_Pragma, case Loop_Variant): Remove call
	to S14_Pragma.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198235 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Sergey Rybin  <rybin@adacore.com frybin>

	* gnat_ugn.texi: Add description of '--help' and '--version'
	options for ASIS tools: gnatelim, gnatmetric, gnatstub, gnatpp.

2013-04-24  Arnaud Charlet  <charlet@adacore.com>

	* gnat_rm.texi: Minor syntax fix.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Expand_Loop_Entry_Attribute): Add extra comments on
	what and why is being analyzed. Remove the decoration of renamings as
	this simply falls out of the general analysis mechanism.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Explain_Redundancy): New routine.
	(Resolve_Equality_Op): Place the error concerning a redundant
	comparison to True at the "=". Try to explain the nature of the
	redundant True.

2013-04-24  Javier Miranda  <miranda@adacore.com>


	* checks.adb, exp_ch6.adb (Install_Null_Excluding_Check): No
	check in interface thunks since it is performed at the caller
	side.
	(Expand_Simple_Function_Return): No accessibility check
	needed in thunks since the check is done by the target routine.

2013-04-24  Vincent Celier  <celier@adacore.com>

	* xref_lib.adb (Add_Entity): Use the canonical file names
	so that source file names with capital letters are found on
	platforms where file names are case insensitive.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* par-ch4.adb (P_Name): Continue to parse the name extension when the
	construct is attribute Loop_Entry. Do not convert the attribute
	reference into an indexed component when there is at least one
	expression / range following 'Loop_Entry.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Contains_Enabled_Pragmas): New routine.
	(Process_PPCs): Generate procedure _Postconditions
	only when the context has invariants or predicates or enabled
	aspects/pragmas.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198236 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Vincent Celier  <celier@adacore.com>

	* gnat_ugn.texi: Document new gnatls switch -aPdir.
	* gnatcmd.adb: Pass switch -aP<dir> to gnatls.
	* gnatls.adb (Scan_Ls_Arg): Process new switch -aP<dir>. Issue
	a warning for unknown switches.
	(Usage): Add line for new switch -aPdir.

2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb, sem_util.ads (Is_Limited_Class_Wide_Type): Return true
	if the type comes from a limited view, so that task attributes can be
	constructed.

2013-04-24  Yannick Moy  <moy@adacore.com>

	* checks.adb (Apply_Float_Conversion_Check): Do not apply checks if
	full expansion is not enabled.

2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Create_Extra_Formals): In Ada 2012, create extra
	formals if the type does not yet have a completion, and thus
	has no underlying view.

2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Treat an aspect
	specification for Address as a reference, to suppress warnings
	on entities that may be read by an external device.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198237 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Robert Dewar  <dewar@adacore.com>

	* gnatcmd.adb, xref_lib.adb, gnatls.adb, sem_ch13.adb: Minor
	reformatting.

2013-04-24  Yannick Moy  <moy@adacore.com>

	* sem_ch6.adb (Analyze_Generic_Subprogram_Body,
	Analyze_Subprogram_Body_Helper): Reset contract node to Empty
	before setting entity to E_Subprogram_Body.
	* sem_ch8.adb (Analyze_Subprogram_Renaming): Reset contract node to
	Empty before setting entity to E_Subprogram_Body.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198238 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Yannick Moy  <moy@adacore.com>

	* snames.ads-tmpl: Minor change to list
	Loop_(In)variant not in configuration pragma.
	* sem_ch3.adb (Analyze_Declarations): Do not look at the original node
	for analyzing the expressions in pre/postconditions.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198239 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch7.adb (Swap_Private_Dependents): New internal routine
	to Install_Private_Declarations, to make the installation of
	private dependents recursive in the presence of child units.
	* sem_ch3.adb (Build_Discriminated_Subtype): Initialize properly
	the Private_Dependents of a private subtype.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Expand_Loop_Entry_Attribute): Update the
	retrieval of the block declarations.
	* par-ch4.adb (P_Name): Let the name parsing machinery create
	a sequence of nested indexed components for attribute Loop_Entry.
	* sem_attr.adb (Analyze_Attribute): Add local constant
	Context. Reimplement part of the analysis of attribute Loop_Entry.
	(Convert_To_Indexed_Component): Removed.
	* sem_ch4.adb (Analyze_Indexed_Component_Form): Do not analyze
	an indexed component after it has been rewritten into attribute
	Loop_Entry.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198240 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, sem_ch7.adb: Minor reformatting.
	* gnat_rm.texi: Document pragma Loop_Invariant.
	* sem_attr.adb (Analyze_Attribute, case Loop_Entry): This is
	no longer an S14_Attribute.
	* sem_prag.adb (Analyze_Pragma, case Loop_Invariant): Combine
	processing with Assert, allow message parameter, remove call
	to S14_Pragma.

2013-04-24  Thomas Quinot  <quinot@adacore.com>

	* exp_ch4.adb: Minor reformatting.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198241 138bc75d-0d04-0410-961f-82ee72b054a4
2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Expand_Loop_Entry_Attribute): Clarify the
	extraction of the declarative part of the conditional block. Move
	the processing of simple infinite loops to the start of the
	expansion logic. Correct the check which determines whether the
	proper scope is installed in visibility.
	* sem_attr.adb (Analyze_Attribute): Add local variable Attr
	to keep track of the attribute in case the enclosing indexed
	component has to be rewritten. When searching for the enclosing
	loop, start from the proper attribute reference in case of a
	rewriting. Do not allow for 'Loop_Entry to appear in pragma
	Assert. Replace loop variable J with Index. Set the type of the
	proper attribute.
	* sem_ch5.adb (Check_Unreachable_Code): Detect a specialized
	block that services a loop statement subject to at least one
	'Loop_Entry attribute.

2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_type.adb (Disambiguate): In Ada 2012 mode, when trying to
	resolve a fixed point operation, use first subtype to determine
	whether type and operator are declared in the same list of
	declarations.

2013-04-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* par-ch6.adb (P_Subprogram): Detect an illegal
	placement of the aspect specification list in the context of
	expression functions.

2013-04-24  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator):  If the designated object
	has tasks, and the pointer type is an itype that has no master
	id, create a master renaming in the current context, which can
	only be an init_proc.



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