2013-08-23  Kaz Kojima  <kkojima@gcc.gnu.org>

        PR rtl-optimization/58220
        PR regression/58221
	* final.c (reemit_insn_block_notes): Use NEXT_INSN to
        handle SEQUENCE insns properly.


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


	* g++.dg/ipa/devirt-13.C: New testcase.
	* g++.dg/ipa/devirt-14.C: New testcase.
	* cgraphunit.c (analyze_functions): Do basic devirtualization;
	do not walk base classes of anonymous types.



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

	* ipa-utils.h (method_class_type): Declare.
	* ipa-devirt.c (method_class_type): Export.

	* cgraphunit.c (analyze_functions): Do basic devirtualization;
	do not walk base classes of anonymous types.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201944 138bc75d-0d04-0410-961f-82ee72b054a4
2013-08-23  Mikael Morin  <mikael@gcc.gnu.org>

	* trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
	to the callers.
	(gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.




git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201945 138bc75d-0d04-0410-961f-82ee72b054a4
2013-08-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/57843
	* interface.c (gfc_extend_assign): Look for type-bound assignment
	procedures before non-typebound.


2013-08-23  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/57843
	* gfortran.dg/typebound_assignment_7.f90: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201946 138bc75d-0d04-0410-961f-82ee72b054a4
fortran/
	PR fortran/57798
	* trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
	gfc_set_delta): Generate preliminary code before the outermost loop.

testsuite/
	PR fortran/57798
	* gfortran.dg/inline_sum_5.f90: New.



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


	* cgraph.c (cgraph_turn_edge_to_speculative): Mark target node
	as having address taken.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201948 138bc75d-0d04-0410-961f-82ee72b054a4
compiler: don't export embedded builtins.

The panic in test/fixedbugs/bug461.go was caused by the fact that
reflect expects unexported fields in a struct to have a valid
package path. If a struct field is an embedded built-in type, it is
now given the package name of the currently compiling package, so it
remains unexported for purposes of reflect.

Fixed Issue 25.


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

	PR other/57324
	* hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1,
	HOST_WIDE_INT_M1U): New macros.
	* fold-const.c (sign_bit_p, build_range_check, fold_unary_loc,
	fold_binary_loc, fold_ternary_loc): Use the new macros. Use an
	unsigned -1 for lshift.
	* cse.c (cse_insn): Likewise.
	* double-int.c (rshift_double, lshift_double): Likewise.
	* builtins.c (fold_builtin_bitop): Likewise.
	* combine.c (force_to_mode): Likewise.
	* tree.c (integer_pow2p, tree_log2, tree_floor_log2): Likewise.
	* simplify-rtx.c (simplify_const_unary_operation,
	simplify_const_binary_operation): Likewise.
	* tree-stdarg.c (va_list_counter_bump, va_list_ptr_read,
	check_va_list_escapes): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	* expmed.c (expand_smod_pow2): Likewise.
	* tree-ssa-structalias.c (UNKNOWN_OFFSET): Use HOST_WIDE_INT_MIN.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201953 138bc75d-0d04-0410-961f-82ee72b054a4
	* diagnostic.c (diagnostic_set_caret_max_width): Use pp_buffer.
	* gimple-pretty-print.c (gimple_dump_bb_buff): Likewise.
	* pretty-print.c (pp_formatted_text_data): Likewise.
	(pp_write_text_to_stream): Likewise.
	(pp_write_text_as_dot_label_to_stream): Likewise.
	(pp_append_r): Likewise.
	(pp_format): Likewise.
	(pp_flush): Likewise.
	(pp_clear_output_area): Likewise.
	(pp_append_text): Likewise.
	(pp_formatted_text): Likewise.
	(pp_remaining_character_count_for_line): Likewise.
	(pp_newline): Likewise.
	(pp_character): Likewise.
	(output_buffer::~output_buffer): Define.
	(pretty_printer::~pretty_printer): Destruct output buffer.
	* pretty-print.h (output_buffer::~output_buffer): Declare.
	(pretty_printer::~pretty_printer): Declare virtual.

c/
	* c-objc-common.c (c_tree_printer): Document the nature of the cast.
	(c_initialize_diagnostics): Call a destructor for the early printer.

cp/
	* cp-objcp-common.c (cxx_initialize_diagnostics): Call a
	destructor for the early printer.
	* error.c (type_to_string): Use pp_buffer.



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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201959 138bc75d-0d04-0410-961f-82ee72b054a4
        * tree-ssa-pre.c (do_regular_insertion): Include the expression
        in the debugging dump when the expression is fully redundant.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201963 138bc75d-0d04-0410-961f-82ee72b054a4
	* c-pretty-print.h (c_pretty_printer::constant): Now a virtual
	member function.
	(pp_constant): Adjust.
	(pp_c_constant): Remove.
	* c-pretty-print.c (c_pretty_printer::constant): Rename from
	pp_c_constant.  Adjust.
	(pp_c_constant)
	(pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
	(c_pretty_printer::c_pretty_printer): Remove assignment to constant.

cp/
	* cxx-pretty-print.h (cxx_pretty_printer::constant): Now a member
	function, overriding c_pretty_printer::constant.
	* cxx-pretty-print.c (cxx_pretty_printer::constant): Rename from
	pp_cxx_constant.  Adjust.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to constant.



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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201972 138bc75d-0d04-0410-961f-82ee72b054a4
c-family/
	* c-pretty-print.h (c_pretty_printer::id_expression): Now a
	virtual function.
	(pp_c_id_expression): Remove.
	(pp_id_expression): Adjust.
	* c-pretty-print.c (c_pretty_printer::id_expression): Rename from
	pp_c_id_expression.  Adjust.
	(pp_c_postfix_expression): Use pp_id_expression.
	(c_pretty_printer::c_pretty_printer): Do not assign to id_expression.

cp/
	* cxx-pretty-print.h (cxx_pretty_printer::id_expression): Declare.
	* cxx-pretty-print.c (cxx_pretty_printer::id_expression): Rename
	from pp_cxx_id_expression.  Adjust.
	(pp_cxx_userdef_literal): Use pp_id_expression.
	(pp_cxx_primary_expression): Likewise.
	(pp_cxx_direct_declarator): Likewise.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	id_expression.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201973 138bc75d-0d04-0410-961f-82ee72b054a4
c-family/
	* c-pretty-print.h (c_pretty_printer::translate_string): Declare.
	* c-pretty-print.c (M_): Remove.
	(c_pretty_printer::translate_string): Define.
	(pp_c_type_specifier): Use it.
	(pp_c_primary_expression): Likewise.
	(pp_c_expression): Likewise.

cp/
	* cxx-pretty-print.c (M_): Remove.
	(pp_cxx_unqualified_id): Use translate_string instead of M_.
	(pp_cxx_canonical_template_parameter): Likewise.



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

	* tree.h (TYPE_FINAL_P, DECL_FINAL_P): New macros.
	(tree_decl_with_vis): Add FINAL field.

	* cp-tree.h (struct lang_type_class): Free is_final bit.
	(CLASSTYPE_FINAL): Define using TYPE_FINAL_P.
	(DECL_FINAL_P): Remove.
	* pt.c (instantiate_class_template_1): Guard that CLASSTYPE_FINAL
	is called on CLASS_TYPE_P.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201975 138bc75d-0d04-0410-961f-82ee72b054a4
	* g++.dg/ipa/devirt-14.C: Fix typo.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201976 138bc75d-0d04-0410-961f-82ee72b054a4
	* cgraph.c (cgraph_turn_edge_to_speculative):
	Fix debug output.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201977 138bc75d-0d04-0410-961f-82ee72b054a4
c-family/
	* c-pretty-print.h (c_pretty_printer::primary_expression): Now a
	virtua member function.
	(pp_primary_expression): Adjust.
	(pp_c_primary_expression): Remove.
	* c-pretty-print.c (c_pretty_printer::primary_expression): Rename
	from pp_c_primary_expression.  Adjust.
	(pp_c_initializer_list): Use pp_primary_expression.
	(c_pretty_printer::c_pretty_printer): Do not assign to
	primary_expression.

cp/
	* cxx-pretty-print.h (cxx_pretty_printer::primary_expression): Now
	an overrider of c_pretty_printer::primary_expression.
	* cxx-pretty-print.c (cxx_pretty_printer::primary_expression):
	Rename from pp_cxx_primary_expression.  Adjust.
	(pp_cxx_postfix_expression): Use pp_primary_expression.
	(pp_cxx_ctor_initializer): Likewise.
	(cxx_pretty_printer::cxx_pretty_printer): Do not assign to
	primary_expression.



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