2014-04-04  Richard Biener  <rguenther@suse.de>

	PR ipa/60746
	* tree-ssanames.c (make_ssa_name_fn): Fix assert.
	* gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
	non-GIMPLE_LABELs.
	* gimplify.h (gimple_add_tmp_var_fn): Declare.
	* gimplify.c (gimple_add_tmp_var_fn): New function.
	* gimple-expr.h (create_tmp_reg_fn): Declare.
	* gimple-expr.c (create_tmp_reg_fn): New function.
	* gimple-low.c (record_vars_into): Don't change cfun.
	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
	code generation without cfun.

	* g++.dg/torture/pr60746.C: New testcase.


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