add a hash_set based on hash_table

This allows us to replace the usage of pointer_set outside of
pointer_map with a nicer interface.

gcc/ada/

	* gcc-interface/trans.c: Use hash_set instead of pointer_set.

gcc/c-family/

	* c-gimplify.c: Use hash_set instead of pointer_set.

gcc/c/

	* c-decl.c: Use hash_set instead of pointer_set.

gcc/cp/

	* class.c, cp-gimplify.c, cp-tree.h, decl.c, decl2.c, error.c,
	method.c, name-lookup.c, pt.c, semantics.c, tree.c: Use hash_set
	instead of pointer_set.

gcc/fortran/

	* openmp.c, trans-decl.c: Use hash_set instead of pointer_set.

gcc/

	* hash-set.h: new File.
	* cfgexpand.c, cfgloop.c, cgraph.c, cgraphbuild.c, cgraphunit.c,
	cprop.c, cse.c, gimple-walk.c, gimple-walk.h, gimplify.c, godump.c,
	ipa-devirt.c, ipa-pure-const.c, ipa-visibility.c, ipa.c, lto-cgraph.c,
	lto-streamer-out.c, stmt.c, tree-cfg.c, tree-core.h, tree-eh.c,
	tree-inline.c, tree-inline.h, tree-nested.c, tree-pretty-print.c,
	tree-ssa-loop-niter.c, tree-ssa-phiopt.c, tree-ssa-threadedge.c,
	tree-ssa-uninit.c, tree.c, tree.h, value-prof.c, varasm.c,
	varpool.c: Use hash_set instead of pointer_set.

gcc/lto/

	* lto-partition.c, lto-partition.h: Use hash_set instead of
	pointer_set.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213516 138bc75d-0d04-0410-961f-82ee72b054a4
convert many uses of pointer_map to hash_map

gcc/c-family/

	* cilk.c: Use hash_map instead of pointer_map.

gcc/c/

	* c-typeck.c: Use hash_map instead of pointer_map.

gcc/cp/

	* optimize.c, semantics.c: Use hash_map instead of pointer_map.

gcc/

	* hash-map.h (default_hashmap_traits::mark_key_deleted):
	Fix cast.
	(hash_map::remove): New method.
(hash_map::traverse): New method.
	* cgraph.h, except.c, except.h, gimple-ssa-strength-reduction.c,
	ipa-utils.c, lto-cgraph.c, lto-streamer.h, omp-low.c, predict.c,
	tree-cfg.c, tree-cfgcleanup.c, tree-eh.c, tree-eh.h, tree-inline.c,
	tree-inline.h, tree-nested.c, tree-sra.c, tree-ssa-loop-im.c,
	tree-ssa-loop-ivopts.c, tree-ssa-reassoc.c, tree-ssa-structalias.c,
	tree-ssa.c, tree-ssa.h, var-tracking.c: Use hash_map instead of
 pointer_map.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213517 138bc75d-0d04-0410-961f-82ee72b054a4
	* doc/invoke.texi (Wsuggest-final-types, Wsuggest-final-methods): Document.
	* ipa-devirt.c: Include hash-map.h
	(struct polymorphic_call_target_d): Add type_warning and decl_warning.
	(clear_speculation): Break out of ...
	(get_class_context): ... here; speed up handling obviously useless
	speculations.
	(odr_type_warn_count, decl_warn_count): New structures.
	(final_warning_record): New structure.
	(final_warning_records): New static variable.
	(possible_polymorphic_call_targets): Cleanup handling of speculative info;
	do not build speculation when user do not care; record info about warnings
	when asked for.
	(add_decl_warning): New function.
	(type_warning_cmp): New function.
	(decl_warning_cmp): New function.
	(ipa_devirt): Handle -Wsuggest-final-methods and -Wsuggest-final-types.
	(gate): Enable pass when warnings are requested.
	* common.opt (Wsuggest-final-types, Wsuggest-final-methods): New options.

	* g++.dg/warn/Wsuggest-final.C: New testcase.
	* g++.dg/ipa/devirt-34.C: Fix.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213518 138bc75d-0d04-0410-961f-82ee72b054a4
/cp
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/15339
	* decl.c (check_redeclaration_no_default_args): New.
	(duplicate_decls): Use it, handle default arguments
	in redeclarations of function templates.

/testsuite
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/15339
	* g++.dg/other/default9.C: New.
	* g++.dg/other/default10.C: Likewise.
	* g++.dg/other/default3.C: Remove xfail.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213519 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/15339
	* testsuite/26_numerics/headers/complex/synopsis.cc: Fix.


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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213523 138bc75d-0d04-0410-961f-82ee72b054a4
	* c-common.c (check_case_value):  Add location_t parameter.  Use it.
	(c_add_case_label): Pass loc to check_case_value.

	* gcc.dg/case-bogus-1.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213525 138bc75d-0d04-0410-961f-82ee72b054a4
	* ipa-devirt.c (odr_type_warn_count): Add type.
	(possible_polymorphic_call_targets): Set it.
	(ipa_devirt): Use it.


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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213529 138bc75d-0d04-0410-961f-82ee72b054a4
        * gnat.dg/discr6.adb, gnat.dg/discr6_pkg.ads: Removed, no longer
        relevant.
        * gnat.dg/debug1.ads: Adjust.
        * gnat.dg/formal_type.ads: Fix error in test.


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


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

	* exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
	if error already detected.  We may reach this point in spite of
	previous errors when compiling with -gnatq, to force all possible
	errors (this is the usual ACATS mode).

2014-08-04  Gary Dismukes  <dismukes@adacore.com>

	* checks.adb (Generate_Range_Check): For the case of converting
	a base type with a larger range to a smaller target subtype, only
	use unchecked conversions of bounds in the range check followed
	by conversion in the case where both types are discrete. In other
	cases, convert to the target base type and save in a temporary
	followed by the range check.
	(Convert_And_Check_Range): New procedure factoring code to save
	conversion to a temporary followed by a range check (called two
	places in Generate_Range_Check).
	* exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
	check-in, to generate range checks for conversions between
	any floating-point types rather than limiting it to matching
	base types.



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

	* sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
	cases related to equality.  Remove the special processing
	for dispatching abstract subprograms as it is not needed.
	(Interpretation_Error): Add a specialized error message for
	predefined operators.
	(Is_Intrinsic_Equality): New routine.
	(Is_Suitable_Candidate): New routine.

2014-08-04  Gary Dismukes  <dismukes@adacore.com>

	* checks.adb: Minor comment reformatting.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

	* restrict.adb (Check_Restriction): For checked max_parameter
	restrictions reset Violated flag, so that subsequent violations
	are properly detected.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
	mode.
	(Process_Discriminants): Fix bad test of GNATprove mode

2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Instantiate_Formal_Subprogram):
	Move variable to their own section. Propagate the source
	location of a formal parameter to the corresponding formal of
	the subprogram renaming declaration. Code reformatting.



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

	* sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
	referenced once resolution has taken place.

2014-08-04  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch4.adb (Expand_N_Type_Conversion): Don't
	compare access levels in the case where the target type is the
	anonymous type of an access discriminant, since the level of
	such types is defined based on context. Add comment.



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

	* exp_ch4.adb: Minor reformatting.

2014-08-04  Olivier Hainque  <hainque@adacore.com>

	* link.c: remove const on __gnat_objlist_file_supported for AIX

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads: Minor addition of comment.

2014-08-04  Vincent Celier  <celier@adacore.com>

	* prj-dect.adb (Check_Package_Allowed): Allow package IDE in
	all projects, including aggregate and aggregate library projects.

2014-08-04  Yannick Moy  <moy@adacore.com>

	* back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Test_In_Range): Always in range for
	Is_Known_Valid target type, where input type has smaller or
	equal size and does not have biased rep.

2014-08-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Eval_Attribute): Constrained is not treated as
	a static attribute, and the Static flag must not be set on it
	during resolution. It may be constant-folded during expansion,
	but if expansion is disabled it is not a static expression.



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

	* sem.adb, sem.ads (In_Default_Expr): Global flag that is set
	to True during analysis of a default component expression.
	(Semantics): Save and restore In_Default_Expr around analysis.
	* sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
	Call new wrapper Preanalyze_Default_Expression.
	(Preanalyze_Default_Expression): New wrapper on
	Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
	* sem_res.adb (Resolve_Call): Mark calls inside default
	expressions as not inlined in GNATprove mode.



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

	* sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
	sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
	exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
	sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
	SPARK_05 instead of SPARK.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem.ads: Minor reformatting.
	* sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
	reformatting.
	(Analyze_Aspect_Specifications, case Convention): Put External_Name
	before Link_Name when constructing pragma.



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

	* sem_util.adb (Is_Potentially_Unevaluated): If the original
	node of a parent node in the tree is a short-circuit operation,
	the node is potentially unevaluated.

2014-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
	conversion from a real type to an integer type.



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

	* s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
	* s-fatgen.adb (Pred): Handle Float'First.
	(Succ): Handle Float'Last.



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

	* s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
	(Unaligned_Valid): Remove now unused subprogram.
	* exp_attr.adb (Expand_N_Attribute_Reference, case
	Attribute_Valid): If the prefix is in reverse SSO or potentially
	unaligned, copy it using a byte copy operation to a temporary
	variable.
	* einfo.adb: Minor comment fix.

2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_Entity): Do not freeze formal subprograms.



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