gcc/ChangeLog:

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* diagnostic.c (default_diagnostic_finalizer): Move caret printing
	 to here ...
	(diagnostic_report_diagnostic): ... from here.
	* toplev.c (general_init): Move code to c-family.

gcc/cp/ChangeLog:

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* error.c (cp_diagnostic_finalizer): Delete.
	(init_error): Do not set diagnostic_finalizer here.

gcc/c-family/ChangeLog:

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* c-opts.c: Include tree-diagnostics.h.
	(c_diagnostic_finalizer): New.
	(c_common_initialize_diagnostics): Use it.

gcc/fortran/ChangeLog:

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* error.c (gfc_diagnostic_finalizer): Call default finalizer.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214245 138bc75d-0d04-0410-961f-82ee72b054a4
get_last_bb_insn returns an rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* basic-block.h (get_last_bb_insn): Strengthen return type from
	rtx to rtx_insn *.
	* cfgrtl.c (get_last_bb_insn): Likewise, and for locals "tmp" and
	end".



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214246 138bc75d-0d04-0410-961f-82ee72b054a4
sel_bb_{head|end} return rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* sel-sched-ir.h (exit_insn): Strengthen from rtx to rtx_insn *.
	(sel_bb_head): Strengthen return type insn_t (currently just an
	rtx) to rtx_insn *.
	(sel_bb_end): Likewise.

	* sel-sched-ir.c (exit_insn): Strengthen from rtx to rtx_insn *.
	(sel_bb_head): Strengthen return type and local "head" from
	insn_t (currently just an rtx) to rtx_insn *.
	(sel_bb_end): Likewise for return type.
	(free_nop_and_exit_insns): Replace use of NULL_RTX with NULL when
	working with insn.



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

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

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* diagnostic.c: Set default caret.
	(diagnostic_show_locus): Use it. Tell pretty-printer that a new
	line is needed.
	* diagnostic.h (struct diagnostic_context):


gcc/fortran/ChangeLog:

2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR fortran/44054
	* error.c (gfc_diagnostic_build_locus_prefix): New function.
	(gfc_diagnostic_starter): Follow Fortran FE diagnostics.
	(gfc_diagnostic_finalizer): Do not call default finalizer.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214251 138bc75d-0d04-0410-961f-82ee72b054a4
find_first_parameter_load returns an rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (find_first_parameter_load): Strengthen return type from
	rtx to rtx_insn *.
	* rtlanal.c (find_first_parameter_load): Strengthen return type
	from rtx to rtx_insn *.  Add checked cast for now, to postpone
	strengthening the params.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214252 138bc75d-0d04-0410-961f-82ee72b054a4
create_insn_rtx_from_pattern and create_copy_of_insn_rtx return rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* sel-sched-ir.h (create_insn_rtx_from_pattern): Strengthen return
	type from rtx to rtx_insn *.
	(create_copy_of_insn_rtx): Likewise.
	* sel-sched-ir.c (create_insn_rtx_from_pattern): Likewise.
	(create_copy_of_insn_rtx): Likewise, also for local "res".



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

2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (context.h): New include.
	(tree-pass.h): Likewise.
	(make_pass_analyze_swaps): New decl.
	(rs6000_option_override): Register pass_analyze_swaps.
	(swap_web_entry): New subsclass of web_entry_base (df.h).
	(special_handling_values): New enum.
	(union_defs): New function.
	(union_uses): Likewise.
	(insn_is_load_p): Likewise.
	(insn_is_store_p): Likewise.
	(insn_is_swap_p): Likewise.
	(rtx_is_swappable_p): Likewise.
	(insn_is_swappable_p): Likewise.
	(chain_purpose): New enum.
	(chain_contains_only_swaps): New function.
	(mark_swaps_for_removal): Likewise.
	(swap_const_vector_halves): Likewise.
	(adjust_subreg_index): Likewise.
	(permute_load): Likewise.
	(permute_store): Likewise.
	(handle_special_swappables): Likewise.
	(replace_swap_with_copy): Likewise.
	(dump_swap_insn_table): Likewise.
	(rs6000_analyze_swaps): Likewise.
	(pass_data_analyze_swaps): New pass_data.
	(pass_analyze_swaps): New rtl_opt_pass.
	(make_pass_analyze_swaps): New function.
	* config/rs6000/rs6000.opt (moptimize-swaps): New option.

[gcc/testsuite]

2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/swaps-p8-1.c: New test.
	* gcc.target/powerpc/swaps-p8-2.c: New test.
	* gcc.target/powerpc/swaps-p8-3.c: New test.
	* gcc.target/powerpc/swaps-p8-4.c: New test.
	* gcc.target/powerpc/swaps-p8-5.c: New test.
	* gcc.target/powerpc/swaps-p8-6.c: New test.
	* gcc.target/powerpc/swaps-p8-7.c: New test.
	* gcc.target/powerpc/swaps-p8-8.c: New test.
	* gcc.target/powerpc/swaps-p8-9.c: New test.
	* gcc.target/powerpc/swaps-p8-10.c: New test.
	* gcc.target/powerpc/swaps-p8-11.c: New test.
	* gcc.target/powerpc/swaps-p8-12.c: New test.



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

2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.h (vec_cpsgn): New #define.
	(vec_mergee): Likewise.
	(vec_mergeo): Likewise.
	(vec_cntlz): Likewise.
	* config/rs600/rs6000-c.c (altivec_overloaded_builtins): Add new
	entries for VEC_AND, VEC_ANDC, VEC_MERGEH, VEC_MERGEL, VEC_NOR,
	VEC_OR, VEC_PACKSU, VEC_XOR, VEC_PERM, VEC_SEL, VEC_VCMPGT_P,
	VMRGEW, and VMRGOW.
	* doc/extend.texi: Document various forms of vec_cpsgn,
	vec_splats, vec_and, vec_andc, vec_mergeh, vec_mergel, vec_nor,
	vec_or, vec_perm, vec_sel, vec_sub, vec_xor, vec_all_eq,
	vec_all_ge, vec_all_gt, vec_all_le, vec_all_lt, vec_all_ne,
	vec_any_eq, vec_any_ge, vec_any_gt, vec_any_le, vec_any_lt,
	vec_any_ne, vec_mergee, vec_mergeo, vec_packsu, and vec_cntlz.

[gcc/testsuite]

2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* testsuite/gcc.target/powerpc/builtins-1.c: New test.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214255 138bc75d-0d04-0410-961f-82ee72b054a4
	* tree-profile.c (tree_profiling): Skip external functions
	when doing coverage instrumentation.
	* cgraphunit.c (compile): Do not assert that all nodes are reachable.

	* gcc.dg/ipa/ctor-empty-1.c: Update template.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214256 138bc75d-0d04-0410-961f-82ee72b054a4
Use rtx_insn internally within generated functions

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* recog.h (insn_output_fn): Update this function typedef to match
	the changes below to the generated output functions, strengthening
	the 2nd param from rtx to rtx_insn *.

	* final.c (get_insn_template): Add a checked cast to rtx_insn * on
	insn when invoking an output function, to match the new signature
	of insn_output_fn with a stronger second param.

	* genconditions.c (write_header): In the generated code for
	gencondmd.c, strengthen the global "insn" from rtx to rtx_insn *
	to match the other changes in this patch.

	* genemit.c (gen_split): Strengthen the 1st param "curr_insn" of
	the generated "gen_" functions from rtx to rtx_insn * within their
	implementations.

	* genrecog.c (write_subroutine): Strengthen the 2nd param "insn" of
	the subfunctions within the generated "recog_", "split", "peephole2"
	function trees from rtx to rtx_insn *.  For now, the top-level
	generated functions ("recog", "split", "peephole2") continue to
	take a plain rtx for "insn", to avoid introducing dependencies on
	other patches.  Rename this 2nd param from "insn" to
	"uncast_insn", and reintroduce "insn" as a local variable of type
	rtx_insn *, initialized at the top of the generated function with
	a checked cast on "uncast_insn".
	(make_insn_sequence): Strengthen the 1st param "curr_insn" of
	the generated "gen_" functions from rtx to rtx_insn * within their
	prototypes.

	* genoutput.c (process_template): Strengthen the 2nd param within
	the generated "output_" functions "insn" from rtx to rtx_insn *.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214257 138bc75d-0d04-0410-961f-82ee72b054a4
Debug hooks: use rtx_insn and rtx_code_label

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* debug.h (struct gcc_debug_hooks): Strengthen param 1 of hook
	"label" from rtx to rtx_code_label *.  Strengthen param 1 of
	"var_location" hook from rtx to rtx_insn *.
	(debug_nothing_rtx): Delete in favor of...
	(debug_nothing_rtx_code_label): New prototype.
	(debug_nothing_rtx_rtx): Delete unused prototype.
	(debug_nothing_rtx_insn): New prototype.

	* final.c (final_scan_insn): Add checked cast to rtx_insn * when
	invoking debug_hooks->var_location (in two places, one in a NOTE
	case of a switch statement, the other guarded by a CALL_P
	conditional.  Add checked cast to rtx_code_label * when invoking
	debug_hooks->label (within CODE_LABEL case of switch statement).

	* dbxout.c (dbx_debug_hooks): Update "label" hook from
	debug_nothing_rtx to debug_nothing_rtx_code_label.  Update
	"var_location" from debug_nothing_rtx to debug_nothing_rtx_insn.
	(xcoff_debug_hooks): Likewise.
	* debug.c (do_nothing_debug_hooks): Likewise.
	(debug_nothing_rtx): Delete in favor of...
	(debug_nothing_rtx_insn): New function.
	(debug_nothing_rtx_rtx): Delete unused function.
	(debug_nothing_rtx_code_label): New function.
	* dwarf2out.c (dwarf2_debug_hooks): Update "label" hook from
	debug_nothing_rtx to debug_nothing_rtx_code_label.
	(dwarf2out_var_location): Strengthen param "loc_note" from rtx
	to rtx_insn *.
	* sdbout.c (sdb_debug_hooks): Update "var_location" hook from
	debug_nothing_rtx to debug_nothing_rtx_insn.
	(sdbout_label): Strengthen param "insn" from rtx to
	rtx_code_label *.
	* vmsdbgout.c (vmsdbg_debug_hooks): Update "label" hook from
	debug_nothing_rtx to debug_nothing_rtx_code_label.  Update
	"var_location" hook from debug_nothing_rtx to
	debug_nothing_rtx_insn.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214259 138bc75d-0d04-0410-961f-82ee72b054a4
try_split returns an rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* rtl.h (try_split): Strengthen return type from rtx to rtx_insn *.

	* emit-rtl.c (try_split): Likewise, also for locals "before" and
	"after".  For now, don't strengthen param "trial", which requires
	adding checked casts when returning it.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214260 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-21  Tony Wang  <tony.wang@arm.com>

    libstdc++-v3/
    * testsuite/18_support/nested_exception/62154.cc: Disable when the
    target doesn't provide atomic builtins.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214261 138bc75d-0d04-0410-961f-82ee72b054a4
2014-08-21  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/62112
gcc/
	* gimple-iterator.c (gsi_replace): Return whether EH cleanup is needed.
	* gimple-iterator.h (gsi_replace): Return bool.
	* tree-ssa-alias.c (ref_may_alias_global_p_1): New helper, code
	moved from ref_may_alias_global_p.
	(ref_may_alias_global_p, refs_may_alias_p, ref_maybe_used_by_stmt_p):
	New overloads.
	(ref_maybe_used_by_call_p): Take ao_ref* instead of tree.
	(stmt_kills_ref_p_1): Rename...
	(stmt_kills_ref_p): ... to this.
	* tree-ssa-alias.h (ref_may_alias_global_p, ref_maybe_used_by_stmt_p,
	stmt_kills_ref_p): Declare.
	* tree-ssa-dse.c (dse_possible_dead_store_p): New argument, use it.
	Move the self-assignment case...
	(dse_optimize_stmt): ... here. Handle builtin calls. Remove dead code.
gcc/testsuite/
	* gcc.dg/tree-ssa/pr62112-1.c: New file.
	* gcc.dg/tree-ssa/pr62112-2.c: Likewise.
	* gcc.c-torture/execute/pr35472.c: Add noclone attribute.
	* gcc.c-torture/execute/20071219-1.c: Likewise.



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

	config/ChangeLog
	* isl.m4 (ISL_CHECK_VERSION): Check link of isl library
	for cross_compiling.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214263 138bc75d-0d04-0410-961f-82ee72b054a4
peephole returns an rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* output.h (peephole): Strengthen return type from rtx to
	rtx_insn *.
	* rtl.h (delete_for_peephole): Likewise for both params.
	* genpeep.c (main): In generated "peephole" function, strengthen
	return type and local "insn" from rtx to rtx_insn *.  For now,
	rename param "ins1" to "uncast_ins1", adding "ins1" back as an
	rtx_insn *, with a checked cast.
	* jump.c (delete_for_peephole): Strengthen params "from", "to" and
	locals "insn", "next", "prev" from rtx to rtx_insn *.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214264 138bc75d-0d04-0410-961f-82ee72b054a4
Pass "insn" as an rtx_insn within generated get_attr_ fns in insn-attrtab.c

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* genattrtab.c (write_attr_get): Within the generated get_attr_
	functions, rename param "insn" to "uncast_insn" and reintroduce
	"insn" as an local rtx_insn * using a checked cast, so that "insn"
	is an rtx_insn * within insn-attrtab.c



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214265 138bc75d-0d04-0410-961f-82ee72b054a4
	PR tree-optimization/62091
	* g++.dg/ipa/devirt-37.C: Update template.
	* g++.dg/ipa/devirt-40.C: New testcase.
	* ipa-devirt.c (ipa_polymorphic_call_context::restrict_to_inner_type):
	handle correctly arrays.
	(extr_type_from_vtbl_ptr_store): Add debug output; handle multiple
	inheritance binfos.
	(record_known_type): Walk into inner type.
	(ipa_polymorphic_call_context::get_dynamic_type): Likewise; strenghten
	condition on no type changes.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214271 138bc75d-0d04-0410-961f-82ee72b054a4
define_bypass guard functions take a pair of rtx_insn

2014-08-21  David Malcolm  <dmalcolm@redhat.com>

	* genautomata.c (output_internal_insn_latency_func): When writing
	the function "internal_insn_latency" to insn-automata.c,
	strengthen params "insn" and "insn2" from rtx to rtx_insn *, thus
	allowing the optional guard function of (define_bypass) clauses to
	expect a pair of rtx_insn *, rather than a pair of rtx.
	(output_insn_latency_func): When writing the function
	"insn_latency", add an "uncast_" prefix to params "insn" and
	"insn2", reintroducing "insn" and "insn2" as rtx_insn * locals
	using checked casts from the params, thus enabling the above
	change to the generated "internal_insn_latency" function.



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