Commit Graph

124682 Commits

Author SHA1 Message Date
Gabriel Dos Reis
e0aec1e930 c-pretty-print.c (print_c_tree): Simplify.
* c-pretty-print.c (print_c_tree): Simplify.  Use non-static local
	c_pretty_printer variable.

From-SVN: r201481
2013-08-05 06:29:18 +00:00
Gabriel Dos Reis
11a877b33a asan.c (asan_pp): Remove.
* asan.c (asan_pp): Remove.
	(asan_pp_initialized): Likewise.
	(asan_pp_initialize): Likewise.
	(asan_pp_string): Take a pretty_printer parameter.  Adjust callers.
	(asan_emit_stack_protection): Tidy.  Use local pretty printer.
	(asan_add_global): Likewise.

From-SVN: r201480
2013-08-05 05:16:29 +00:00
Gabriel Dos Reis
b066401f26 pretty-print.h (pp_base): Remove.
* pretty-print.h (pp_base): Remove.  Adjust dependent macros.
	* diagnostic.h (diagnostic_flush_buffer): Adjust.
	* pretty-print.c (pp_formatted_text_data): Likewise.
	(pp_indent): Rename from pp_base_indent.
	(pp_format): Rename from pp_base_format.
	(pp_output_formatted_text): Rename from pp_base_output_formatted_text.
	(pp_format_verbatim): Rename from pp_base_format_verbatim.
	(pp_flush): Rename from pp_base_flush.
	(pp_set_line_maximum_length): Rename from
	pp_base_set_line_maximum_length.
	(pp_clear_output_area): Rename from pp_base_clear_output_area.
	(pp_set_prefix): Rename from pp_base_set_prefix.
	(pp_destroy_prefix): Rename from pp_base_destroy_prefix.
	(pp_emit_prefix): Rename from pp_base_emit_prefix.
	(pp_append_text): Rename from pp_base_append_text.
	(pp_formatted_text): Rename from pp_base_formatted_text.
	(pp_last_position_in_text): Rename from pp_base_last_position_in_text.
	(pp_remaining_character_count_for_line): Rename from
	pp_base_remaining_character_count_for_line.
	(pp_newline): Rename from pp_base_newline.
	(pp_character): Rename from pp_base_character.
	(pp_string): Rename from pp_base_string.
	(pp_maybe_space): Rename from pp_base_maybe_space.
	* asan.c (asan_pp_string): Adjust.
	(asan_emit_stack_protection): Likewise.
	(asan_add_global): Likewise.
	* sched-vis.c (str_pattern_slim): Adjust pretty printer function call.
	* tree-mudflap.c (mf_varname_tree): Likewise.
	* tree-pretty-print.c (pp_tree_identifier): Rename from
	pp_base_tree_identifier.
	* tree-pretty-print.h (pp_tree_identifier): Remove macro definition.
	Declare as function.

c/
	* c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.

c-family/
	* c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
	(pp_base): Remove.
	(pp_c_base): Likewise.  Adjust users.
	* c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
	(pp_c_whitespace): Do not call pp_base.
	(pp_c_left_paren): Likewise.
	(pp_c_right_paren): Likewise.
	(pp_c_left_brace): Likewise.
	(pp_c_right_brace): Likewise.
	(pp_c_left_bracket): Likewise.
	(pp_c_right_bracket): Likewise.
	(pp_c_dot): Likewise.
	(pp_c_ampersand): Likewise.
	(pp_c_star): Likewise.
	(pp_c_arrow): Likewise.
	(pp_c_semicolon): Likewise.
	(pp_c_complement): Likewise.
	(pp_c_exclamation): Likewise.
	(pp_c_direct_declarator): Likewise.
	(pp_c_ws_string): Likewise.
	(pp_c_identifier): Likewise.
	(pp_c_statement): Likewise.
	(print_c_tree): Likewise.

cp/
	* cxx-pretty-print.h (pp_c_base): Remove.
	(cxx_pretty_printer): Derive from c_pretty_printer.
	Adjust macros using pp_c_base.
	* cp-objcp-common.c (cxx_initialize_diagnostics): Do not call pp_base.
	* cxx-pretty-print.c (pp_cxx_nonconsecutive_character): Likewise.
	(pp_cxx_colon_colon): Likewise.
	(pp_cxx_separate_with): Likewise.
	(pp_cxx_storage_class_specifier): Do not call pp_c_base.
	(pp_cxx_expression_list): Likewise.
	(pp_cxx_space_for_pointer_operator): Likewise.
	(pp_cxx_init_declarator): Likewise.
	(pp_cxx_call_argument_list): Likewise.
	(pp_cxx_constant): Likewise.
	(pp_cxx_postfix_expression): Likewise.
	(pp_cxx_new_expression): Likewise.
	(pp_cxx_unary_expression): Likewise.
	(pp_cxx_cast_expression): Likewise.
	(pp_cxx_conditional_expression): Likewise.
	(pp_cxx_assignment_expression): Likewise.
	(pp_cxx_expression): Likewise.
	(pp_cxx_function_specifier): Likewise.
	(pp_cxx_decl_specifier_seq): Likewise.
	(pp_cxx_simple_type_specifier): Likewise.
	(pp_cxx_type_specifier_seq): Likewise.
	(pp_cxx_ptr_operator): Likewise.
	(pp_cxx_parameter_declaration_clause): Likewise.
	(pp_cxx_direct_declarator): Likewise.
	(pp_cxx_direct_abstract_declarator): Likewise.
	(pp_cxx_type_id): Likewise.
	(pp_cxx_statement): Likewise.
	(pp_cxx_pretty_printer_init): Tidy.
	* error.c (init_error): Do not use pp_base.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_global_iord): Likewise.
	(dump_decl): Likewise.
	(dump_function_decl): Likewise.
	(dump_ref_qualifier): Likewise.
	(reinit_cxx_pp): Likewise.
	(decl_as_dwarf_string): Likewise.
	(lang_decl_dwarf_name): Likewise.
	(type_to_string): Likewise.
	(cv_to_string): Likewise.
	(cxx_print_error_function): Likewise.
	(cp_diagnostic_starter): Likewise.
	(cp_diagnostic_finalizer): Likewise.
	(cp_print_error_function): Likewise.
	(print_instantiation_context): Likewise.
	(cp_printer): Likewise.

From-SVN: r201479
2013-08-05 04:00:57 +00:00
GCC Administrator
5edf2c603c Daily bump.
From-SVN: r201478
2013-08-05 00:16:53 +00:00
Ed Smith-Rowland
65e5a578a8 re PR c++/58072 ([C++11] Error messages involving user-defined literals are poor (refer to tokens))
gcc/c-family:

2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/58072
	* c-common.c (c_parse_error): Catch user-defined literal tokens and
	provide useful error strings.


gcc/testsuite:

2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/58072
	* g++.dg/cpp0x/pr58072.C: New.

From-SVN: r201475
2013-08-04 19:11:21 +00:00
Gabriel Dos Reis
137a1a27e2 pretty-print.h (pp_bar_bar): New.
* pretty-print.h (pp_bar_bar): New.
	(pp_ampersand_ampersand): Likewise.
	(pp_less_equal): Likewise.
	(pp_greater_equal): Likewise.
	* gimple-pretty-print.c (dump_ternary_rhs): Use specialized pretty
	printer functions instead of pp_string or operators and punctuators.
	(dump_gimple_call): Likewise.
	(dump_gimple_omp_for): Likewise.
	(dump_gimple_transaction): Likewise.
	(dump_gimple_phi): Likewise.
	(pp_gimple_stmt_1): Likewise.
	* sched-vis.c (print_insn): Likewise.
	* tree-mudflap.c (mf_varname_tree): Likewise.
	* tree-pretty-print.c (dump_block_node): Likewise.
	(dump_generic_node): Likewise.

c-family/ 
	* c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
	printer functions instead of pp_string or operators and punctuators.
	(dump_generic_ada_node): Likewise.
	* c-pretty-print.c (pp_c_type_specifier): Likewise.
	(pp_c_relational_expression): Likewise.
	(pp_c_logical_or_expression): Likewise.

cp/
	* error.c (dump_type_prefix): Use specialized pretty printer
	functions instead of pp_string or operators and punctuators.
	(dump_decl): Likewise.
	(dump_expr): Likewise.

From-SVN: r201474
2013-08-04 16:47:42 +00:00
GCC Administrator
8ee9fbe197 Daily bump.
From-SVN: r201473
2013-08-04 00:16:48 +00:00
Jason Merrill
45d765871b DR 1286
DR 1286
	* pt.c (get_underlying_template): New.
	(convert_template_argument, lookup_template_class_1): Use it.

From-SVN: r201470
2013-08-03 16:32:08 -04:00
Jason Merrill
9e356571d4 DR 1430 PR c++/51239
DR 1430
	PR c++/51239
	* pt.c (pack_expansion_args_count): Rename from
	any_pack_expanson_args_p.
	(coerce_template_parms): Reject pack expansion to
	non-pack template parameter of alias template.

From-SVN: r201469
2013-08-03 16:32:00 -04:00
Jan Hubicka
815effe155 lto-cgraph.c (compute_ltrans_boundary): Add abstract origins into boundaries.
* lto-cgraph.c (compute_ltrans_boundary): Add abstract origins into
	boundaries.
	* lto-streamer-out.c (tree_is_indexable): Results decls and
	parm decls are not indexable.
	(DFS_write_tree_body): Do not follow args and results.
	(hash_tree): Likewise.
	(output_functions): Rearrange so struct function is needed
	only when real body is output; be able to also ouptut abstract
	functions; output DECL_ARGUMENTS and DECL_RESULT.
	(lto_output): When not in WPA, ale store abstract functions.
	(write_symbol): Do not care about RESULT_DECL.
	(output_symbol_p): Handle correctly sbtract decls.
	* lto-streamer-in.c (input_function): Rearrange so struct
	function can be NULL at entry; allow streaming of
	functions w/o body; store DECL_ARGUMENTS and DECL_RESULT.
	* ipa.c (symtab_remove_unreachable_nodes): Silence confused
	sanity check during LTO.
	* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers): Skip
	RESULT_DECl and DECL_ARGUMENTS.
	* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
	Likewise.

	* lto.c (lto_materialize_function): Do not push struct function.
	* lto-partition.c (get_symbol_class): Handle abstracts correctly.
	(may_need_named_section_p): Even abstract origins may need
	named section.

From-SVN: r201468
2013-08-03 19:54:18 +00:00
Gabriel Dos Reis
07838b1363 pretty-print.h (pp_underscore): New.
* pretty-print.h (pp_underscore): New.
	(pp_comma): Tidy.
	* gimple-pretty-print.c (dump_unary_rhs): Use specialized pretty
	printer functions instead of pp_character.
	(dump_binary_rhs): Likewise.
	(dump_ternary_rhs): Likewise.
	(dump_gimple_call_args): Likewise.
	(pp_points_to_solution): Likewise.
	(dump_gimple_call): Likewise.
	(dump_gimple_switch): Likewise.
	(dump_gimple_cond): Likewise.
	(dump_gimple_bind): Likewise.
	(dump_gimple_try): Likewise.
	(dump_gimple_omp_for): Likewise.
	(dump_gimple_omp_continue): Likewise.
	(dump_gimple_omp_single): Likewise.
	(dump_gimple_omp_sections): Likewise.
	(dump_gimple_omp_block): Likewise.
	(dump_gimple_omp_critical): Likewise.
	(dump_gimple_transaction): Likewise.
	(dump_gimple_asm): Likewise.
	(dump_gimple_phi): Likewise.
	(dump_gimple_omp_parallel): Likewise.
	(dump_gimple_omp_task): Likewise.
	(dump_gimple_omp_atomic_load): Likewise.
	(dump_gimple_omp_atomic_store): Likewise.
	(dump_gimple_mem_ops): Likewise.
	(pp_gimple_stmt_1): Likewise.
	(pp_cfg_jump): Likewise.
	(dump_implicit_edges): Likewise.
	(gimple_dump_bb_for_graph): Likewise.
	* graph.c (draw_cfg_node): Likewise.
	* langhooks.c (lhd_print_error_function): Likewise.
	* sched-vis.c (print_exp): Likewise.
	(print_value): Likewise.
	(print_pattern): Likewise.
	(print_insn): Likewise.
	(rtl_dump_bb_for_graph): Likewise.
	* tree-pretty-print.c (dump_function_declaration): Likewise.
	(dump_array_domain): Likewise.
	(dump_omp_clause): Likewise.
	(dump_location): Likewise.
	(dump_generic_node): Likewise.
	(print_struct_decl): Likewise.
	* diagnostic.c (diagnostic_show_locus): Use pp_space.

c-family/
	* c-ada-spec.c (print_ada_macros): Use specialized pretty printer
	functions instead of pp_character.
	(pp_ada_tree_identifier): Likewise.
	(dump_ada_double_name): Likewise.
	(dump_ada_function_declaration): Likewise.
	(dump_ada_array_domains): Likewise.
	(dump_template_types): Likewise.
	(dump_generic_ada_node): Likewise.
	(print_ada_declaration): Likewise.
	(print_ada_struct_decl): Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.

cp/
	* error.c (dump_aggr_type): Use specialized pretty printer
	functions instead of pp_character.
	(dump_type_prefix): Likewise.
	(dump_simple_decl): Likewise.
	(type_to_string): Likewise.

From-SVN: r201467
2013-08-03 18:57:25 +00:00
Bill Schmidt
bb0d2039ba gimple-ssa-strength-reduction.c (replace_mult_candidate): Update candidate table when replacing a candidate statement.
gcc:

2013-08-03  Bill Schmidt  <wschmidt@vnet.linux.ibm.com>

	* gimple-ssa-strength-reduction.c (replace_mult_candidate): Update
	candidate table when replacing a candidate statement.
	(replace_rhs_if_not_dup): Likewise.
	(replace_one_candidate): Likewise.

gcc/testsuite:

2013-08-03  Bill Schmidt  <wschmidt@vnet.linux.ibm.com>

	* gcc.dg/torture/pr57993-2.cpp: New.

From-SVN: r201466
2013-08-03 14:37:26 +00:00
Tim Shen
399eeef978 Implement bracket expression.
2013-08-03  Tim Shen  <timshen91@gmail.com>

	Implement bracket expression.
	* include/bits/regex.h: Remove constexpr from "|=", etc.
	* include/bits/regex_compiler.h: Parse bracket expression.
	* include/bits/regex_nfa.h: _Comparator and _BracketMatcher(old
	_RangeMatcher).
	* include/bits/regex_nfa.tcc: Implement them.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	from regex_search to regex_match.
	* testsuite/28_regex/algorithms/regex_match/extended/
	cstring_bracket_01.cc: New.

From-SVN: r201465
2013-08-03 14:32:54 +00:00
Jan Hubicka
cdaa808aed Add Martin.
From-SVN: r201464
2013-08-03 11:03:19 +00:00
Jan Hubicka
bc0ec02766 cgraphunit.c (add_new_function): Fix logic when adding from late IPA pass.
* cgraphunit.c (add_new_function): Fix logic when adding from
	late IPA pass.
	(assemble_thunk): Rename to ...
	(expand_thunk); .. this one; export; get it working with general functions;
	make produced gimple valid.
	* cgraph.h (expand_thunk): Declare.

From-SVN: r201463
2013-08-03 11:02:37 +00:00
Jan Hubicka
0e8853eefb ipa-cp.c (gather_context_independent_values): Use ipa_get_param_move_cost.
* ipa-cp.c (gather_context_independent_values): Use ipa_get_param_move_cost.
	(get_replacement_map): Remove PARAM; move parameter folding into tree-inline.c
	(create_specialized_node): Update.
	* ipa-prop.c (ipa_populate_param_decls): Do not look for origins;
	assert that we have gimple body; update move_cost.
	(count_formal_params): Assert that we have gimple body.
	(ipa_dump_param): New function.
	(ipa_alloc_node_params): Break out from ...
	(ipa_initialize_node_params): ... here.
	(ipa_get_vector_of_formal_parms): ICE when used in WPA.
	(ipa_write_node_info): Stream move costs.
	(ipa_read_node_info): Read move costs.
	(ipa_update_after_lto_read): Do not recompute node params.
	* ipa-prop.h (ipa_param_descriptor): Add move_cost.
	(ipa_get_param): Check we are not in WPA.
	(ipa_get_param_move_cost): New.
	* tree-inline.c (tree_function_versioning): Fold replacement as needed.
	* ipa-inline-analysis.c (inline_node_duplication_hook): Expect only
	parm numbers to be present.

	* gcc.dg/ipa/ipa-1.c: Update.
	* gcc.dg/ipa/ipa-2.c: Update.
	* gcc.dg/ipa/ipa-3.c: Update.
	* gcc.dg/ipa/ipa-4.c: Update.
	* gcc.dg/ipa/ipa-5.c: Update.
	* gcc.dg/ipa/ipa-7.c: Update.
	* gcc.dg/ipa/ipa-8.c: Update.
	* gcc.dg/ipa/ipcp-1.c: Update.
	* gcc.dg/ipa/ipcp-2.c: Update.

From-SVN: r201462
2013-08-03 08:23:55 +00:00
GCC Administrator
563430f7f3 Daily bump.
From-SVN: r201461
2013-08-03 00:16:39 +00:00
Ian Lance Taylor
1b3dc031eb syscall: Change AWK split call to use []+ rather than []*.
Using []* fails with the awk that is part of busybox:
https://groups.google.com/d/msg/gofrontend-dev/NbQsG_AMDpY/sXCc03kkwn4J

From-SVN: r201455
2013-08-02 22:30:30 +00:00
Vladimir Makarov
ecee672b46 re PR rtl-optimization/58048 (internal compiler error: Max. number of generated reload insns per insn is achieved (90))
2013-08-02  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/58048
	* lra-constraints.c (process_alt_operands): Don't check asm
	operand on register.

2013-08-02  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/58048
	* gcc.target/i386/pr58048.c: New.

From-SVN: r201454
2013-08-02 22:06:11 +00:00
Eric Botcazou
13ec0527ea sparc.c (sparc_emit_membar_for_model): Add the implied StoreLoad barrier for atomic operations if before.
* config/sparc/sparc.c (sparc_emit_membar_for_model) <SMM_TSO>: Add
	the implied StoreLoad barrier for atomic operations if before.

From-SVN: r201450
2013-08-02 21:41:58 +00:00
Ian Lance Taylor
a572c45497 go-gcc.cc (immutable_struct_set_init): Always call resolve_unique_section.
* go-gcc.cc (immutable_struct_set_init): Always call
	resolve_unique_section.

From-SVN: r201446
2013-08-02 18:24:19 +00:00
Ian Lance Taylor
aa7e089fdc compiler: Always put descriptor wrappers in their own section.
This lets the linker GC them.

From-SVN: r201442
2013-08-02 17:01:43 +00:00
Andreas Krebbel
d62d515246 configure.tgt: Add -msoft-float to XCFLAGS.
2013-08-02  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* configure.tgt: Add -msoft-float to XCFLAGS.

From-SVN: r201441
2013-08-02 16:00:36 +00:00
Jan Hubicka
af15184ab6 cgraph.c (cgraph_function_body_availability): Do not check cgrpah flags.
* cgraph.c (cgraph_function_body_availability): Do not check cgrpah flags.
	* cgraph.h (symtab_for_node_and_aliases, symtab_nonoverwritable_alias,
	symtab_node_availability): Declare.
	* ipa.c (can_replace_by_local_alias): New.
	(function_and_variable_visibility): Use it.
	* symtab.c (symtab_for_node_and_aliases, symtab_nonoverwritable_alias_1,
	symtab_nonoverwritable_alias): New.

Co-Authored-By: Martin Liska <marxin.liska@gmail.com>

From-SVN: r201439
2013-08-02 14:38:15 +00:00
Vladimir Makarov
01e54ef86f re PR rtl-optimization/57963 (LRA S/390: esa mode failure memcpy-chk)
2013-08-02  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/57963
	* lra-constraints.c (reverse_equiv_p, contains_reloaded_insn_p):
	New.
	(lra_constraints): Use them.

From-SVN: r201438
2013-08-02 14:23:38 +00:00
Sofiane Naci
e2fd7ca748 types.md (define_attr "type"): Add "load_acq" and "store_rel".
* config/arm/types.md (define_attr "type"): Add "load_acq" and "store_rel".
	* config/arm/cortex-a53.md (cortex_a53_load1): Update for attribute
	changes.
	(cortex_a53_store1): Likewise.

From-SVN: r201436
2013-08-02 13:15:05 +00:00
Kyrylo Tkachov
f43b3c4b22 neon-for-64bits-2.c: Delete.
2013-08-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* gcc.target/arm/neon-for-64bits-2.c: Delete.

From-SVN: r201435
2013-08-02 12:53:58 +00:00
Jan Hubicka
0dcc26c311 ipa.c (symtab_remove_unreachable_nodes): Nodes in other partitions are not needed.
* ipa.c (symtab_remove_unreachable_nodes): Nodes in other partitions are
	not needed.

From-SVN: r201431
2013-08-02 09:44:18 +00:00
Paolo Carlini
257e6ab3df functions.h (__foreign_iterator_aux4): Initialize __l and __ge.
2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/functions.h (__foreign_iterator_aux4):
	Initialize __l and __ge.

From-SVN: r201428
2013-08-02 08:12:20 +00:00
Paolo Carlini
ab0bc60223 cp-tree.h (finish_stmt): Do not declare.
2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (finish_stmt): Do not declare.
	* decl.c (finish_stmt): Do not define.
	* parser.c (cp_parser_expression_statement,
	cp_parser_declaration_statement,
	cp_parser_transaction_cancel): Don't call finish_stmt.
	* semantics.c (finish_expr_stmt, finish_if_stmt,
	finish_while_stmt, finish_do_stmt, finish_return_stmt,
	finish_for_stmt, finish_switch_stmt, finish_compound_stmt,
	finish_transaction_stmt): Likewise.

From-SVN: r201427
2013-08-02 07:59:14 +00:00
Paolo Carlini
7dec245a8c functions.h (__foreign_iterator_aux4): Initialize __l and __ge.
2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/functions.h (__foreign_iterator_aux4):
	Initialize __l and __ge.

From-SVN: r201426
2013-08-02 07:53:01 +00:00
Paolo Carlini
a1a0abac54 re PR libstdc++/58049 (libstdc++ bootstrap failure for fix to PR libstdc++/57779)
2013-08-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/58049
	* include/debug/functions.h: Include <bits/move.h>; minor formatting
	changes.
	(__foreign_iterator_aux4): Declare __l and __ge constexpr.
	* include/debug/safe_iterator.h (_Safe_iterator<>::operator->):
	Use __addressof.
	* include/debug/safe_local_iterator.h (_Safe_local_iterator<>::
	operator->): Likewise.

From-SVN: r201424
2013-08-02 07:34:55 +00:00
GCC Administrator
fcf58e3d2f Daily bump.
From-SVN: r201423
2013-08-02 00:16:44 +00:00
Maxim Kuvyrkov
46549c206e Fix licenses on several libgcc files.
* config/aarch64/sfp-machine.h, config/aarch64/sync-cache.c,
	* config/i386/cpuinfo.c, config/ia64/unwind-ia64.h,
	* config/mips/vr4120-div.S: Fix license from GPL-3.0+ to
	GPL-3.0-with-GCC-exception.

From-SVN: r201417
2013-08-01 21:09:10 +00:00
François Dumont
5720787ada re PR libstdc++/57779 (vector insert fails to diagnose iterators pointing into *this in debug mode)
2013-08-01  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/57779
	* include/debug/formatter.h (_Debug_msg_id): Add
	__msg_insert_itself_range entry.
	* include/debug/functions.h (_Insert_range_from_self_is_safe<>):
	New, indicate container types supporting self range insertion in
	GNU implementation.
	(__foreign_iterator): New, check if an iterator points to a given
	sequence.
	* include/debug/macros.h (__glibcxx_check_insert_range): Add check
	using __foreign_iterator.
	(__gibcxx_check_insert_range_after): Likewise.
	* include/debug/string (_Insert_range_from_self_is_safe<>):
	Partially specialized to mark __gnu_debug::basic_string<> as
	supporting self range insert.
	* include/debug/list (_Insert_range_from_self_is_safe<>):
	Partially specialized to mark std::list as supporting self range
	insert if _GLIBCXX_DEBUG_PEDANTIC is not defined.
	* include/debug/forward_list (_Insert_range_from_self_is_safe<>):
	Likewise.
	* src/c++11/debug.cc (_S_debug_messages): Add
	__msg_insert_itself_range_entry message.
	(_Error_formatter::_Parameter::_M_print_description): Display
	iterator sequence address rather than sequence address when the
	parameter type is an iterator.
	(_Error_formatter::_M_print_word): Enhance behavior when
	displaying a word with an appended '\n'.
	* testsuite/util/debug/checks.h (check_insert4<>): New.
	* testsuite/23_containers/deque/debug/insert5_neg.cc: New.
	* testsuite/23_containers/vector/debug/insert5_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/insert6_neg.cc: Likewise.
	* testsuite/23_containers/vector/debug/57779_neg.cc: Likewise.
	* testsuite/23_containers/list/debug/insert5_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/debug/insert_after4_neg.cc:
	Likewise.

From-SVN: r201416
2013-08-01 19:54:46 +00:00
Uros Bizjak
0bd729015c i386.h (MAYBE_NON_Q_CLASS_P): New.
* config/i386/i386.h (MAYBE_NON_Q_CLASS_P): New.
	* config/i386/i386.c (ix86_secondary_reload): Use INTEGER_CLASS_P and
	MAYBE_NON_Q_CLASS_P where appropriate.

From-SVN: r201415
2013-08-01 21:48:46 +02:00
Fabien Chêne
fb23b69e14 re PR c++/54537 (undiagnosed using-declaration conflicting with used function)
gcc/cp/
        PR c++/54537
        * cp-tree.h: Check OVL_USED with OVERLOAD_CHECK.
        * name-lookup.c (do_nonmember_using_decl): Make sure we have an
	OVERLOAD before calling OVL_USED. Call diagnose_name_conflict
	instead of issuing an error without mentioning the conflicting
	declaration.

libstdc++-v3/
        PR c++/54537
	* include/tr1/cmath: Remove pow(double,double) overload, remove a
	duplicated comment about DR 550. Add a comment to explain the
	issue.
	* testsuite/tr1/8_c_compatibility/cmath/pow_cmath.cc: New.

gcc/testsuite/
        PR c++/54537
        * g++.dg/overload/using3.C: New.
	* g++.dg/overload/using2.C: Adjust.
	* g++.dg/lookup/using9.C: Likewise.

Co-Authored-By: Peter Bergner <bergner@vnet.ibm.com>

From-SVN: r201414
2013-08-01 14:24:37 -05:00
Jan Hubicka
12123452e4 cgraph.h (release_function_body): Declare.
* cgraph.h (release_function_body): Declare.
	* tree.c (free_lang_data_in_decl): Free, parameters and return values
	of unused delcarations.

From-SVN: r201413
2013-08-01 15:41:10 +00:00
Kyrylo Tkachov
ce852f9c3a arm.md (minmax_arithsi_non_canon): Emit canonical RTL form when subtracting a constant.
2013-08-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (minmax_arithsi_non_canon): Emit canonical RTL form
	when subtracting a constant.

From-SVN: r201412
2013-08-01 15:02:19 +00:00
Kyrylo Tkachov
c743b24643 arm.md (peepholes for eq (reg1) (reg2/imm)): Generate canonical plus rtx with negated immediate instead of minus where...
[gcc]
2013-08-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.md (peepholes for eq (reg1) (reg2/imm)):
	Generate canonical plus rtx with negated immediate instead of minus
	where appropriate.
	* config/arm/arm.c (thumb2_reorg): Handle ADCS <Rd>, <Rn> case.

[gcc/testsuite]

	* gcc.target/arm/pr46972-2.c: New test.

From-SVN: r201411
2013-08-01 15:00:41 +00:00
Jan Hubicka
c0c123ef52 cgraph.c (cgraph_release_function_body): Use used_as_abstract_origin.
* cgraph.c (cgraph_release_function_body): Use used_as_abstract_origin.
	(cgraph_release_function_body): Likewise.
	(cgraph_can_remove_if_no_direct_calls_p): Likewise.
	* cgraph.h (cgrpah_node): Rename abstract_and_needed
	to used_as_abstract_origin.
	* tree-inline-transfrom.c (can_remove_node_now_p_1): Do not remove
	symbols used as abstract origins.
	* cgraphunit.c (analyze_functions): Update.
	* ipa.c (symtab_remove_unreachable_nodes): Recompute used_as_abstract_origin.
	* tree-inline.c (tree_function_versioning): Update
	used_as_abstract_origin; be ready for DECL_RESULT and DECL_ARGUMENTS to be
	NULL.

	* lto-symtab.c (lto_symtab_merge_symbols): Merge duplicated nodes for abstract functions.
	* cgraph.h (symtab_real_symbol_p): Abstract declarations are not real symbols.

From-SVN: r201408
2013-08-01 13:24:49 +00:00
Vidya Praveen
0cd1dd571b vect-iv-5.c: Make xfail conditional with !arm_neon_ok.
* gcc.dg/vect/vect-iv-5.c: Make xfail conditional with !arm_neon_ok.

From-SVN: r201406
2013-08-01 13:58:13 +01:00
Jan Hubicka
1f02943335 * profile.c (compute_value_histograms): Fix thinko.
From-SVN: r201401
2013-08-01 10:03:55 +00:00
Sofiane Naci
c451f4d6c1 config.gcc (aarch64*-*-*): Add aarch-common.o to extra_objs.
* config.gcc (aarch64*-*-*): Add aarch-common.o to extra_objs.  Add
	aarch-common-protos.h to extra_headers.
	(aarch64*-*-*): Add arm/aarch-common-protos.h to tm_p_file.
	* config/aarch64/aarch64.md: Include "../arm/cortex-a53.md"
	* config/aarch64/t-aarch64 (aarch-common.o): Define.

From-SVN: r201400
2013-08-01 09:50:52 +00:00
Sofiane Naci
34b512f5aa aarch64.md (define_attr "type"): Delete.
* config/aarch64/aarch64.md (define_attr "type"): Delete.
	Include "../arm/types.md".  Define "type" attribute for all patterns.
	* config/aarch64/aarch64-simd.md (move_lo_quad_<mode>): Update for
	attribute changes.

From-SVN: r201399
2013-08-01 09:48:48 +00:00
GCC Administrator
04828fb6a6 Daily bump.
From-SVN: r201397
2013-08-01 00:16:34 +00:00
Tim Shen
95c7d82816 Thompson matcher refactored.
2013-07-31  Tim Shen  <timshen91@gmail.com>

	Thompson matcher refactored. Fix grouping problem.
	* include/bits/regex.h: Use a dispatcher _M_get_matcher().
	* include/bits/regex_compiler.h: Tweak for auto switching.
	* include/bits/regex_grep_matcher.h: Class structure.
	* include/bits/regex_grep_matcher.tcc: _BFSMatcher(Thompson
	matcher) refactoring.
	* include/bits/regex_nfa.h: Change _Results's interfaces.
	* include/std/regex: Includes <map> and <queue>.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/57173.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc: New.

From-SVN: r201391
2013-07-31 22:36:11 +00:00
Michael Meissner
d86e633abc predicates.md (fusion_gpr_addis): New predicates to support power8 load fusion.
[gcc]
2013-07-31  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/predicates.md (fusion_gpr_addis): New predicates
	to support power8 load fusion.
	(fusion_gpr_mem_load): Likewise.

	* config/rs6000/rs6000-modes.def (PTImode): Update a comment.

	* config/rs6000/rs6000-protos.h (fusion_gpr_load_p): New
	declarations for power8 load fusion.
	(emit_fusion_gpr_load): Likewise.

	* config/rs6000/rs6000.c (rs6000_option_override_internal): If
	tuning for power8, turn on fusion mode by default.  Turn on sign
	extending fusion mode if normal fusion mode is on, and we are at
	-O2 or -O3.
	(fusion_gpr_load_p): New function, return true if we can fuse an
	addis instruction with a dependent load to a GPR.
	(emit_fusion_gpr_load): Emit the instructions for power8 load
	fusion to GPRs.

	* config/rs6000/vsx.md (VSX_M2): New iterator for fusion
	peepholes.
	(VSX load fusion peepholes): New peepholes to fuse together an
	addi instruction with a VSX load instruction.

	* config/rs6000/rs6000.md (GPR load fusion peepholes): New
	peepholes to fuse an addis instruction with a load to a GPR base
	register.  If we are supporting sign extending fusions, convert
	sign extending loads to zero extending loads and add an explicit
	sign extension.

[gcc/testsuite]
2013-07-31  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/fusion.c: New file, test power8 fusion
	support.

From-SVN: r201385
2013-07-31 20:04:07 +00:00
Richard Sandiford
b26e3fc277 mips.exp (mips-dg-options): Test for mabicalls rather than addressing!=absolute when...
gcc/testsuite/
	* gcc.target/mips/mips.exp (mips-dg-options): Test for mabicalls
	rather than addressing!=absolute when deciding how to handle MIPS16
	when the test forces an ABI.

From-SVN: r201380
2013-07-31 18:33:50 +00:00
Paolo Carlini
0b57d5fa43 parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier return value for error_mark_node.
2013-07-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* parser.c (cp_parser_sizeof_pack): Check cp_parser_identifier
	return value for error_mark_node.

From-SVN: r201379
2013-07-31 18:28:16 +00:00