Commit Graph

107221 Commits

Author SHA1 Message Date
Diego Novillo f617201f55 Make-lang.in (CXX_PARSER_H): New.
* Make-lang.in (CXX_PARSER_H): New.
	(cp/parser.o): Add dependency on CXX_PARSER_H.
	Add dependency on tree-pretty-print.h
	(cp/cp-lang.o): Add dependency on CXX_PARSER_H.
	* cp-lang.c: Include parser.h.
	* parser.c: Include parser.h.
	(struct cp_token): Add bitfield purged_p.
	Update all users.
	Move to parser.h.
	(CPP_PURGED): Remove.  Update all users.
	(struct cp_lexer): Change field buffer to be a VEC of cp_token.
	Remove field buffer_length.
	Update all users.
	Move to parser.h.
	(struct tree_check): Move to parser.h.
	(cp_token_position): Likewise.
	(struct cp_token_cache): Likewise.
	(CPP_KEYWORD): Likewise.
	(CPP_TEMPLATE_ID): Likewise.
	(CPP_NESTED_NAME_SPECIFIER): Likewise.
	(N_CP_TTYPES): Likewise.
	(enum cp_parser_status_kind): Likewise.
	(struct cp_parser_context): Likewise.
	(struct cp_default_arg_entry_d): Likewise.
	(struct cp_unparsed_functions_entry_d): Likewise.
	(struct cp_parser): Likewise.
	(cp_lexer_dump_tokens): New.
	(cp_lexer_debug_tokens): New.
	(cp_lexer_finished_p): New.
	(cp_lexer_alloc): Factor out of cp_lexer_new_main.
	(cp_lexer_new_main): Re-write main lexing loop to push
	tokens into the new VEC buffer.
	(cp_lexer_print_token): Improve printing of CPP_NUMBER tokens.
	Do not abort if the token type is not recognized, just print
	its code.
	* parser.h: New file.
	* config-lang.in (gtfiles): Add cp/parser.h.

From-SVN: r171075
2011-03-16 18:03:56 -04:00
Dodji Seketeli 7b5cb7d634 re PR debug/47510 (DW_TAG_typedef can have children when designating a naming typedef)
PR debug/47510

gcc/

	PR debug/47510
	* dwarf2out.c (strip_naming_typedef): Factorize out of ...
	(lookup_type_die_strip_naming_typedef): ... here.
	(get_context_die): Use it.
	(gen_typedef_die): Add a DW_AT_{,MIPS_}linkage_name attribute to
	the anonymous struct named by the naming typedef.

gcc/testsuite/

        PR debug/47510
	* g++.dg/debug/dwarf2/typedef6.C: New test.

From-SVN: r171073
2011-03-16 22:04:58 +01:00
Jason Merrill 532c679ea9 Core 1148
Core 1148
	* typeck.c (check_return_expr): Fix conditions for setting
	LOOKUP_PREFER_RVALUE.

From-SVN: r171071
2011-03-16 16:15:37 -04:00
Jason Merrill e676810ed1 * call.c (build_over_call): Remove require_complete_type_sfinae call.
From-SVN: r171070
2011-03-16 16:15:24 -04:00
H.J. Lu 585e9d9de3 Check TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins.
2011-03-16  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/48154
	* config/i386/i386.c (ix86_builtin_vectorized_function): Check
	TARGET_ROUND for BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins.

From-SVN: r171069
2011-03-16 13:04:40 -07:00
Jason Merrill 0136dc743a re PR c++/48132 ([C++0x] Internal compiler error on array of std::complex with -std=c++0x)
PR c++/48132
	* decl.c (check_array_designated_initializer): Allow integer index.
	(reshape_init_array_1): Set index on the elements.

From-SVN: r171068
2011-03-16 16:04:06 -04:00
Jason Merrill f8f122781f re PR c++/48113 ([C++0x] bind with tuple argument fails)
PR c++/48113
	* typeck.c (convert_for_initialization): Use
	perform_implicit_conversion_flags.
	* call.c (standard_conversion): If LOOKUP_PREFER_RVALUE, set
	rvaluedness_matches_p on ck_rvalue.
	(convert_like_real) [ck_rvalue]: And restore it here.

From-SVN: r171067
2011-03-16 16:03:56 -04:00
Jason Merrill 85a273bae4 re PR c++/48115 (internal compiler error: in type_has_nontrivial_copy_init, at cp/tree.c:2482)
PR c++/48115
	* call.c (convert_arg_to_ellipsis): Handle incomplete type.

From-SVN: r171066
2011-03-16 16:03:46 -04:00
Jack Howarth 51fd6b9057 re PR lto/48086 (bootstrap-lto creates c-common.s with too many sections on x86_64-apple-darwin10)
2011-03-16  Jack Howarth  <howarth@bromo.med.uc.edu>

	PR lto/48086
	* configure.ac: Re-enable LTO on *-apple-darwin9.
	* configure: Regenerate.

From-SVN: r171058
2011-03-16 18:19:12 +00:00
Francois-Xavier Coudert de15ea9461 re PR libfortran/47883 (libgfortran configuration should use AC_LINK_IFELSE instead of AC_TRY_LINK)
PR libfortran/47883
	* acinclude.m4: Don't use AC_TRY_ macros.
	* configure.ac: Likewise.
	* configure: Regenerate.

From-SVN: r171056
2011-03-16 17:43:41 +00:00
Jeff Law 6261ab0ee6 tree-vrp.c (identify_jump_threads): Slightly simplify type check for operands of conditional.
* tree-vrp.c (identify_jump_threads): Slightly simplify type
 	check for operands of conditional.  Allow type to be a
 	pointer.
 
 
 	* gcc.dg/tree-ssa/vrp55.c: New test.

From-SVN: r171055
2011-03-16 11:32:58 -06:00
Jason Merrill 23d956f935 parser.c (cp_parser_abort_tentative_parse): Make sure we haven't committed to this tentative parse.
* parser.c (cp_parser_abort_tentative_parse): Make sure we haven't
	committed to this tentative parse.

From-SVN: r171054
2011-03-16 13:04:41 -04:00
Jason Merrill bb4586d388 re PR c++/47999 ([C++0x] auto type deduction works incorrectly in a function template)
PR c++/47999
	* semantics.c (finish_call_expr): Preserve reference semantics
	in templates.

From-SVN: r171053
2011-03-16 13:04:30 -04:00
Jason Merrill a8d7041a30 * call.c (convert_default_arg): Use LOOKUP_IMPLICIT.
From-SVN: r171052
2011-03-16 13:00:13 -04:00
Richard Guenther 51cdce9ab6 vla-1.c (main): Use result of f1 to avoid optimizing it away if promoted to const.
2011-03-16  Richard Guenther  <rguenther@suse.de>

	* gcc.dg/guality/vla-1.c (main): Use result of f1 to avoid
	optimizing it away if promoted to const.

From-SVN: r171050
2011-03-16 16:51:35 +00:00
Benjamin Kosnik 4db6d7d79d gnu.ver: Add base destructors for stdexcept classes.
2011-03-16  Benjamin Kosnik  <bkoz@redhat.com>

	* config/abi/pre/gnu.ver: Add base destructors for stdexcept classes.
	* testsuite/19_diagnostics/stdexcept.cc: New.

From-SVN: r171049
2011-03-16 16:05:45 +00:00
Richard Guenther 0b0081eca4 re PR tree-optimization/48149 (Piecewise complex pass-through not optimized)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48149
	* fold-const.c (fold_binary_loc): Fold
	COMPLEX_EXPR <REALPART_EXPR <x>, IMAGPART_EXPR <x>>.

	* gcc.dg/fold-complex-1.c: New testcase.

From-SVN: r171048
2011-03-16 15:55:48 +00:00
Richard Guenther 9977914ea5 re PR debug/48147 (New debug test failures)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR testsuite/48147
	* gcc.dg/guality/pr45882.c: Really make sure no inlining
	or cloning happens.

From-SVN: r171047
2011-03-16 13:57:28 +00:00
Richard Guenther 64a3d6470e re PR middle-end/26134 (fold *(float*)(&complex_float_var) into REALPART_EXPR<complex_float_var>)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/26134
	* tree-ssa.c (maybe_rewrite_mem_ref_base): Handle rewriting
	complex part accesses to REALPART_EXPR and IMAGPART_EXPR.
	(non_rewritable_mem_ref_base): Handle complex type component
	accesses, constrain offsets for vector and complex extracts
	more properly.

	* gcc.dg/tree-ssa/complex-6.c: New testcase.

From-SVN: r171046
2011-03-16 13:53:09 +00:00
Richard Guenther ef13324eca re PR c/48146 (ICE tree check: expected ssa_name, have var_decl in has_zero_uses, at tree-flow-inline.h:342)
2011-03-16  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48146
	* tree-ssa-sink.c (sink_code_in_bb): Manually update virtual
	operands avoiding the need for renaming.

	* gcc.dg/torture/pr48146.c: New testcase.

From-SVN: r171045
2011-03-16 12:41:08 +00:00
Richard Guenther f0eddb9019 gimple-fold.c (maybe_fold_reference): Open-code relevant constant folding.
2011-03-16  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (maybe_fold_reference): Open-code relevant
	constant folding.  Move MEM_REF canonicalization first.
	Rely on fold_const_aggregate_ref for initializer folding.
	* tree-ssa-ccp.c (ccp_fold): Handle constant vector extracts.

	* gcc.dg/tree-ssa/pr14814.c: Adjust.
	* gcc.dg/tree-ssa/ssa-ccp-19.c: Likewise.

From-SVN: r171043
2011-03-16 11:36:30 +00:00
Jakub Jelinek 29f10e7178 re PR middle-end/48136 (verify_gimple failed at -O0)
PR middle-end/48136
	* fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Make sure
	arg0/arg1 or their arguments are always fold converted to matching
	types.

	* gcc.c-torture/compile/pr48136.c: New test.

From-SVN: r171041
2011-03-16 11:24:44 +01:00
Jakub Jelinek e42348b8cd var-tracking.c (prepare_call_arguments): Add ATTRIBUTE_UNUSED to nargs.
* var-tracking.c (prepare_call_arguments): Add ATTRIBUTE_UNUSED
	to nargs.

From-SVN: r171040
2011-03-16 11:23:14 +01:00
Rainer Orth 55b465747a re PR driver/46944 (gcc should accept -fuse-linker-plugin only if linker handles -plugin)
PR lto/46944
	* configure.ac (gcc_cv_gld_major_version, gcc_cv_gld_minor):
	Handle in-tree gold.
	(ld_vers): Extract binutils version for gold.
	(gcc_cv_ld_hidden): Handle gold here.
	(gcc_cv_lto_plugin): Determine level of linker plugin support.
	* configure: Regenerate.
	* config.in: Regenerate.
	* gcc.c: Only use LTO plugin if HAVE_LTO_PLUGIN > 0, reject
	-fuse-linker-plugin otherwise.
	(LINK_PLUGIN_SPEC): Define.  Extract from LINK_COMMAND_SPEC.
	(LINK_COMMAND_SPEC): Use it.
	(main): Only look for LTOPLUGINSONAME if HAVE_LTO_PLUGIN > 0.

From-SVN: r171039
2011-03-16 09:41:16 +00:00
Jakub Jelinek c2969d8ee4 emit-rtl.c (try_split): Don't call copy_call_info debug hook.
* emit-rtl.c (try_split): Don't call copy_call_info debug hook.
	* calls.c: Remove debug.h include.
	(emit_call_1): Don't call virtual_call_token debug hook.
	* dwarf2out.c (debug_dcall_section, debug_vcall_section,
	dcall_entry, vcall_entry, dcall_table, vcall_table, vcall_insn,
	vcall_insn_table, DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION,
	size_of_dcall_table, output_dcall_table, size_of_vcall_table,
	output_vcall_table, dwarf2out_direct_call, vcall_insn_table_hash,
	vcall_insn_table_eq, store_vcall_insn, lookup_vcall_insn,
	dwarf2out_virtual_call_token, dwarf2out_copy_call_info,
	dwarf2out_virtual_call): Remove.
	(dwarf2_debug_hooks): Remove direct_call, virtual_call_token,
	copy_call_info and virtual_call hooks.
	(dwarf2out_init): Don't initialize vcall_insn_table,
	debug_dcall_section and debug_vcall_section.
	(prune_unused_types): Don't mark nodes from dcall_table.
	(dwarf2out_finish): Don't output dcall or vcall tables.
	* final.c (final_scan_insn): Don't call direct_call or
	virtual_call debug hooks.
	* debug.h (struct gcc_debug_hooks): Remove direct_call,
	virtual_call_token, copy_call_info and virtual_call hooks.
	(debug_nothing_uid): Remove prototype.
	* sdbout.c (sdb_debug_hooks): Remove direct_call, virtual_call_token,
	copy_call_info and virtual_call hooks.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
	* debug.c (do_nothing_debug_hooks): Likewise.
	(debug_nothing_uid): Remove.
	* doc/invoke.texi (-fenable-icf-debug): Remove.
	* common.opt (-fenable-icf-debug): Likewise.

	* g++.dg/debug/dwarf2/icf.C: Adjust for -fenable-icf-debug removal.

From-SVN: r171037
2011-03-16 09:40:07 +01:00
Jakub Jelinek 325f5379f1 calls.c (emit_call_1): Set MEM_EXPR on call's MEM.
* calls.c (emit_call_1): Set MEM_EXPR on call's MEM.
	* var-tracking.c (prepare_call_arguments): Use MEM_EXPR on
	call's MEM.  Handle functions returning aggregate through a hidden
	first pointer.  For virtual calls add clobbered pc to call arguments
	chain.
	* dwarf2out.c (gen_subprogram_die): Emit
	DW_AT_GNU_call_site_target_clobbered if DW_AT_GNU_call_site_target
	can't be emitted.

From-SVN: r171036
2011-03-16 09:36:42 +01:00
Jakub Jelinek a58a8e4b1f re PR debug/45882 (No debug info for vars depending on unused parameter)
PR debug/45882
	* rtl.def (ENTRY_VALUE): Change format from "e" to "0".
	* rtl.h (ENTRY_VALUE_EXP): Define.
	* rtl.c (rtx_equal_p_cb, rtx_equal_p): Handle ENTRY_VALUE.
	* cselib.c (rtx_equal_for_cselib_p, cselib_hash_rtx): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* gengtype.c (adjust_field_rtx_def): Likewise.
	* var-tracking.c (vt_add_function_parameter): Adjust
	gen_rtx_ENTRY_VALUE uses, use ENTRY_VALUE_EXP macro.
	* dwarf2out.c (mem_loc_descriptor): Use ENTRY_VALUE_EXP macro.
	* cfgexpand.c (expand_debug_expr): If a SSA_NAME without
	partition is a default definition of a PARM_DECL, use ENTRY_VALUE
	of its DECL_INCOMING_RTL if possible, or its DECL_RTL if set.

	* gcc.dg/guality/pr45882.c: New test.

From-SVN: r171035
2011-03-16 09:35:31 +01:00
Jakub Jelinek 2b1c543325 final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
* final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
	Call var_location debug hook even on CALL_INSNs.
	(rest_of_clean_state): Don't print NOTE_INSN_CALL_ARG_LOCATION.
	* rtl.def (ENTRY_VALUE): New.
	* dwarf2out.c: Include cfglayout.h.
	(dwarf_stack_op_name, size_of_loc_descr, output_loc_operands,
	output_loc_operands_raw): Handle DW_OP_GNU_entry_value.
	(struct call_arg_loc_node): New type.
	(call_arg_locations, call_arg_loc_last, block_map, call_site_count,
	tail_call_site_count): New variables.
	(dwarf_tag_name): Handle DW_TAG_GNU_call_site and
	DW_TAG_GNU_call_site_parameter.
	(dwarf_attr_name): Handle DW_AT_GNU_call_site_value,
	DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
	DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
	DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites
	and DW_AT_GNU_all_source_call_sites.
	(mem_loc_descriptor): Handle ENTRY_VALUE.
	(add_src_coords_attributes): Don't add enything if
	DECL_SOURCE_LOCATION is UNKNOWN_LOCATION.
	(dwarf2out_abstract_function): Save and clear call_arg_location,
	call_site_count and tail_call_site_count around dwarf2out_decl call.
	(gen_call_site_die): New function.
	(gen_subprogram_die): Emit DW_TAG_GNU_call_site DIEs for call sites.
	(gen_lexical_block_die, gen_inlined_subroutine_die): Update block_map.
	(dwarf2out_function_decl): Clear call_arg_locations,
	call_arg_loc_last, set call_site_count and tail_call_site_count
	to -1 and free block_map.
	(dwarf2out_var_location): Handle NOTE_INSN_CALL_ARG_LOCATION and
	CALL_INSNs.  Add NOTE_DURING_CALL_P var location notes even when not
	followed by any real instructions.
	(dwarf2out_begin_function): Set call_site_count and
	tail_call_site_count to 0.
	(resolve_addr): If DW_AT_abstract_origin of DW_TAG_GNU_call_site
	is dw_val_class_addr, attempt to look it up again, for DECL_EXTERNAL
	attempt to force a DIE for it and worst case remove the attribute.
	(resolve_one_addr): For TREE_CONSTANT_POOL_ADDRESS_P SYMBOL_REFs
	check TREE_ASM_WRITTEN of DECL_INITIAL of the decl instead of
	the decl itself.
	* var-tracking.c: Include tm_p.h.
	(vt_stack_adjustments): For calls call note_register_arguments.
	(argument_reg_set): New variable.
	(add_stores): For MO_VAL_SET of non-tracked regs from argument_reg_set
	ensure the VALUE is resolved.
	(call_arguments): New variable.
	(prepare_call_arguments): New function.
	(add_with_sets): For MO_CALL set u.loc from call_arguments and clear it.
	(struct expand_loc_callback_data): Add ignore_cur_loc field.
	(vt_expand_loc_callback): If ignore_cur_loc, don't look at cur_loc and
	always use the best expression.
	(vt_expand_loc): Add ignore_cur_loc argument.
	(vt_expand_loc_dummy): Clear ignore_cur_loc field.
	(emit_note_insn_var_location): Adjust vt_expand_loc callers.
	(emit_notes_in_bb) <case MO_CALL>: Add NOTE_INSN_CALL_ARG_LOCATION
	note for all calls.
	(vt_add_function_parameter): Use cselib_lookup_from_insn.
	If dv is a VALUE, enter into hash table also ENTRY_VALUE for the
	argument.  Don't call cselib_preserve_only_values and
	cselib_reset_table.
	(note_register_arguments): New function.
	(vt_initialize): Compute argument_reg_set.  Call
	vt_add_function_parameters before processing basic blocks instead of
	afterwards.  For calls call prepare_call_arguments before calling
	cselib_process_insn.
	* print-rtl.c (print_rtx): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* Makefile.in (dwarf2out.o): Depend on $(CFGLAYOUT_H).
	(var-tracking.o): Depend on $(TM_P_H).
	* cfglayout.h (insn_scope): New prototype.
	* gengtype.c (adjust_field_rtx_def): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* cfglayout.c (insn_scope): No longer static.
	* insn-notes.def (CALL_ARG_LOCATION): New.
	* calls.c (expand_call, emit_library_call_value_1): Put USEs for
	MEM arguments into CALL_INSN_FUNCTION_USAGE unconditionally.
	* integrate.c (set_block_origin_self, set_block_abstract_flags): Do
	nothing for DECL_EXTERNAL BLOCK_VARS.
cp/
	* cp-objcp-common.c (cp_function_decl_explicit_p): Don't crash if
	DECL_LANG_SPECIFIC is NULL.
include/
	* dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter,
	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
	DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
	DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
	DW_OP_GNU_entry_value): New.

From-SVN: r171033
2011-03-16 09:32:13 +01:00
Alan Modra 9ef13bd018 re PR target/45844 (FAIL: gfortran.dg/vect/pr45714-b.f -O (internal compiler error))
PR target/45844
	* config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Don't
	create invalid offset address for vsx splat insn.
	* config/rs6000/predicates.md (splat_input_operand): New.
	* config/rs6000/vsx.md (vsx_splat_*): Use it.

From-SVN: r171031
2011-03-16 16:56:29 +10:30
GCC Administrator 338241572a Daily bump.
From-SVN: r171026
2011-03-16 00:18:29 +00:00
Benjamin Kosnik d554574428 thread: Revert.
2011-03-15  Benjamin Kosnik  <bkoz@redhat.com>

        * include/std/thread: Revert.
        * src/thread.cc: Same.
        * config/abi/pre/gnu.ver: Same.

From-SVN: r171021
2011-03-16 00:02:11 +00:00
Doug Kwan 38b8f67a6d re PR libstdc++/48123 (bits/cpu_defines.h not installed in freestanding mode.)
2011-03-15  Doug Kwan  <dougkwan@google.com>

        PR libstdc++/48123
        * include/Makefile.am (install-freestanding-headers): Install
        cpu_defines.h
        * include/Makefile.in: Regenerate.

From-SVN: r171019
2011-03-15 20:56:52 +00:00
Benjamin Kosnik 3b0f203438 gnu.ver: Make nested_exception exports super clear.
2011-03-15  Benjamin Kosnik  <bkoz@redhat.com>

	* config/abi/pre/gnu.ver: Make nested_exception exports super clear.
	Move bad_function_call exports from CXXABI_1.3.5 to GLIBCXX_3.4.15.

From-SVN: r171014
2011-03-15 18:58:12 +00:00
Jason Merrill 6871351bb0 pt.c (value_dependent_expression_p): Don't check value_dependent_expression_p on the operand.
* pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Don't
	check value_dependent_expression_p on the operand.

From-SVN: r171013
2011-03-15 14:31:12 -04:00
Jason Merrill 17bc631c68 c-common.c (max_constexpr_depth): New.
c-family/
	* c-common.c (max_constexpr_depth): New.
	* c-common.h: Declare it.
	* c-opts.c (c_common_handle_option): Set it.
	* c.opt (fconstexpr-depth): New option.
cp/
	* semantics.c (push_cx_call_context): Return bool.
	(cxx_eval_call_expression): Handle excess depth.

From-SVN: r171012
2011-03-15 14:29:00 -04:00
Jason Merrill 92d0652c1e Core 1191
Core 1191
	* method.c (synthezized_method_walk): Cleanups don't affect the
	triviality of a constructor, but do affect deletion and exception
	specification.

From-SVN: r171011
2011-03-15 14:27:29 -04:00
Rodrigo Rivas Costa 437697b8ee decl2.c (cp_check_const_attributes): New.
* decl2.c (cp_check_const_attributes): New.
	(cplus_decl_attributes): Call cp_check_const_attributes.

From-SVN: r171010
2011-03-15 14:27:19 -04:00
Jason Merrill 4c66d85a55 re PR c++/34758 (Bad diagnostic for circular dependency in constructor default argument)
PR c++/34758
	* call.c (convert_default_arg): Use DECL_ORIGIN of fn.  Check for
	recursion first.
	(push_defarg_context, pop_defarg_context): New.
	* parser.c (cp_parser_late_parsing_default_args): Use them.
	* cp-tree.h: Declare them.

From-SVN: r171009
2011-03-15 14:27:09 -04:00
Xinliang David Li 56b6751058 Fix pr47837
From-SVN: r171008
2011-03-15 18:15:01 +00:00
Ramana Radhakrishnan df06baf294 Actually delete it as svn rename seemed to fail
From-SVN: r171005
2011-03-15 17:37:05 +00:00
Ramana Radhakrishnan 9751171ca4 Fixup last commit.
Fixed PR target/46788 and not PR 47688

From-SVN: r171002
2011-03-15 17:05:51 +00:00
Ramana Radhakrishnan 80fffdef8f re PR c++/47688 ([C++0x] Segfault when assigning lambda to std::function variable)
Fix PR 47688

2011-03-18  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	PR target/47668
	gcc/
	* config/arm/arm.md (arm_movtas_ze): Use 'L' instead of 'c'
	in the output template.
	gcc/testsuite/
	* gcc.target/arm/pr47688.c: New.

From-SVN: r171000
2011-03-15 16:14:21 +00:00
Richard Guenther 930672adb7 re PR middle-end/47650 (wrong output of print_generic_decl() called from a plugin)
2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/47650
	* tree-pretty-print.c (dump_function_declaration): Properly
	dump unprototyped and varargs function types.

	* gfortran.dg/c_f_pointer_tests_3.f90: Adjust.
	* gfortran.dg/ishft_4.f90: Likewise.
	* gfortran.dg/leadz_trailz_3.f90: Likewise.

From-SVN: r170995
2011-03-15 13:39:28 +00:00
Richard Guenther c7ee7b4534 re PR c++/13954 ([tree-ssa] SRA does not work for classes that use inheritance with an empty base)
2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/13954
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Look through memcpy
	and friends.

	* g++.dg/tree-ssa/pr13954.C: New testcase.

From-SVN: r170994
2011-03-15 13:37:23 +00:00
Richard Guenther b2ad5e3738 re PR rtl-optimization/48037 (Missed optimization: unnecessary register moves)
2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/48037
	* tree-ssa.c (maybe_rewrite_mem_ref_base): Rewrite vector
	selects into BIT_FIELD_REFs.
	(non_rewritable_mem_ref_base): Check if a MEM_REF is a
	vector select.

	* gcc.target/i386/pr48037-1.c: New testcase.

From-SVN: r170986
2011-03-15 12:22:12 +00:00
Jakub Jelinek 7ee93d4e34 re PR tree-optimization/48129 (gcc.c-torture/execute/builtins/snprintf-chk.c ICE)
PR tree-optimization/48129
	* builtins.c (fold_builtin_snprintf): Convert to type of
	built_in_decls[BUILT_IN_SNPRINTF] retval instead of
	implicit_built_in_decls[BUILT_IN_SNPRINTF] retval.

From-SVN: r170985
2011-03-15 12:28:35 +01:00
Richard Guenther e106efc780 re PR tree-optimization/41490 (tree-ssa-sink does not really work)
2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/41490
	* tree-ssa-dce.c (propagate_necessity): Handle returns without
	value but with VUSE.
	* tree-ssa-operands.c (parse_ssa_operands): Add a VUSE on all
	return statements.
	* tree-ssa-sink.c (statement_sink_location): Fix store sinking.
	* tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Handle virtual PHIs.
	* tree-tailcall.c (find_tail_calls): Ignore returns.

	* gcc.dg/tree-ssa/ssa-sink-6.c: New testcase.
	* gcc.dg/tree-ssa/ssa-sink-7.c: Likewise.
	* gcc.dg/tree-ssa/ssa-sink-8.c: Likewise.
	* gcc.dg/tree-ssa/ssa-sink-9.c: Likewise.
	* g++.dg/tree-ssa/pr33604.C: Adjust.

From-SVN: r170984
2011-03-15 11:09:09 +00:00
Richard Guenther 17dea42fc4 re PR tree-optimization/48031 (gcc.c-torture/compile/pr42956.c ICEs gcc on m68k-linux, ivopts related?)
2011-03-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/48031
	* fold-const.c (fold_indirect_ref_1): Do not create new variable-sized
	or variable-indexed array accesses when in gimple form.

From-SVN: r170983
2011-03-15 09:49:33 +00:00
Richard Guenther 01c77a6055 i386.c (ix86_emit_swdivsf): Implement more efficiently.
2011-03-15  Richard Guenther  <rguenther@suse.de>

	* config/i386/i386.c (ix86_emit_swdivsf): Implement more
	efficiently.

From-SVN: r170981
2011-03-15 09:30:13 +00:00
Francois-Xavier Coudert cc9ce9ffd6 * arith.c (arith_power): Plug memory leak.
From-SVN: r170980
2011-03-15 08:56:16 +00:00