gcc.git
11 years agofunction.c (push_cfun): Check old current_function_decl matches old cfun...
Martin Jambor [Thu, 20 Sep 2012 16:35:40 +0000 (18:35 +0200)]
function.c (push_cfun): Check old current_function_decl matches old cfun...

2012-09-20  Martin Jambor  <mjambor@suse.cz>

* function.c (push_cfun): Check old current_function_decl matches
old cfun, set new current_function_decl to the decl of the new
cfun.
(push_struct_function): Likewise.
(pop_cfun): Likewise.
(allocate_struct_function): Move call to
invoke_set_current_function_hook to the end of the function.
* cfgexpand.c (estimated_stack_frame_size): Do not set and restore
current_function_decl.
* cgraph.c (cgraph_release_function_body): Likewise.
* cgraphunit.c (cgraph_process_new_functions): Likewise.
(cgraph_add_new_function): Likewise.
(cgraph_analyze_function): Likewise.
(assemble_thunk): Set cfun to NULL at the end.
(expand_function): Move call to set_cfun downwards.
* gimple-low.c (record_vars_into): Only check current_function_decl
before possibly doing push_cfun.
* gimplify.c (gimplify_function_tree): Do not set and restore
current_function_decl.
* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
(inline_analyze_function): Likewise.
* ipa-prop.c (ipa_analyze_node): Likewise.
* ipa-pure-const.c (analyze_function): Likewise.
* lto-streamer-in.c (lto_input_function_body): Do not set
current_function_decl.
* lto-streamer-out.c (output_function): Do not set and restore
current_function_decl.
* omp-low.c (finalize_task_copyfn): Likewise.
(expand_omp_taskreg): Likewise.
(create_task_copyfn): Likewise, move push_cfun up quite a bit.
* passes.c (dump_passes): Do not set and restore current_function_decl.
(do_per_function): Likewise.
(do_per_function_toporder): Likewise.
* trans-mem.c (ipa_tm_scan_irr_function): Likewise.
(ipa_tm_transform_transaction): Likewise.
(ipa_tm_transform_clone): Likewise.
(ipa_tm_execute): Likewise.
* tree-emutls.c (lower_emutls_function_body): Likewise.
* tree-inline.c (initialize_cfun): Do not call pop_cfun.
(tree_function_versioning): Do not call push_cfun, do not set and
restore current_function_decl.  Remove assert checking consistency of
cfun and current_function_decl.
* tree-profile.c (tree_profiling): Do not set and restore
current_function_decl.
* tree-sra.c (convert_callers_for_node): Do not set
current_function_decl.
(convert_callers): Do not restore current_function_decl.
(modify_function): Do not set current_function_decl.
* tree-ssa-structalias.c (ipa_pta_execute): Do not set and restore
current_function_decl.

fortran/
* trans-decl.c (gfc_get_extern_function_decl): Push NULL cfun.  Do not
set and restore current_function_decl.
(gfc_init_coarray_decl): Do not set and restore current_function_decl.

lto/
* lto.c (lto_materialize_function): Call push_struct_function and
pop_cfun.

From-SVN: r191577

11 years agolibgo: Add no-dist and -Wno-portability to AM_INIT_AUTOMAKE.
Ian Lance Taylor [Thu, 20 Sep 2012 16:32:27 +0000 (16:32 +0000)]
libgo: Add no-dist and -Wno-portability to AM_INIT_AUTOMAKE.

From-SVN: r191575

11 years agore PR target/54631 (vxworks.c fails to compile)
Diego Novillo [Thu, 20 Sep 2012 16:31:05 +0000 (12:31 -0400)]
re PR target/54631 (vxworks.c fails to compile)

PR target/54631
* config/vxworks.c (vxworks_emutls_var_init): Update for new
VEC_quick_push interface.

From-SVN: r191574

11 years agore PR tree-optimization/54634 (miscompilation with -O3 -ftree-loop-distribution)
Richard Guenther [Thu, 20 Sep 2012 14:46:32 +0000 (14:46 +0000)]
re PR tree-optimization/54634 (miscompilation with -O3  -ftree-loop-distribution)

2012-09-20  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54634
* tree-data-ref.c (get_references_in_stmt): For now give
up for pure functions.

From-SVN: r191567

11 years agore PR other/43620 ([4.3 Release Blocker] Uploading to gnu.org will fail due to automa...
Jakub Jelinek [Thu, 20 Sep 2012 14:41:17 +0000 (16:41 +0200)]
re PR other/43620 ([4.3 Release Blocker] Uploading to gnu.org will fail due to automake security issue)

PR other/43620
libatomic/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
* configure: Regenerate.
* Makefile.in: Regenerate.
libitm/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist.
* configure: Regenerate.
* Makefile.in: Regenerate.

From-SVN: r191565

11 years agore PR c++/52432 ([C++11] -fdump-tree-gimple causes ICE: Error reporting routines...
Paolo Carlini [Thu, 20 Sep 2012 14:05:19 +0000 (14:05 +0000)]
re PR c++/52432 ([C++11] -fdump-tree-gimple causes ICE: Error reporting routines re-entered.)

/cp
2012-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/52432
* pt.c (tsubst_copy_and_build): If tf_error is not set in the complain
argument don't call unqualified_name_lookup_error.

/testsuite
2012-09-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/52432
* g++.dg/cpp0x/decltype32.C: Tweak.

From-SVN: r191564

11 years agoforwprop-19.c: Check in forwprop1.
Marc Glisse [Thu, 20 Sep 2012 09:37:05 +0000 (11:37 +0200)]
forwprop-19.c: Check in forwprop1.

2012-09-20  Marc Glisse  <marc.glisse@inria.fr>

* gcc.dg/tree-ssa/forwprop-19.c: Check in forwprop1.
* gcc.dg/tree-ssa/forwprop-20.c: Check in forwprop1.
* gcc.dg/tree-ssa/forwprop-21.c: Check in copyprop1.
* gcc.dg/tree-ssa/forwprop-22.c: Check in copyprop1.

From-SVN: r191560

11 years ago2012-09-20 Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Chen Wei-Ren [Thu, 20 Sep 2012 09:26:07 +0000 (17:26 +0800)]
2012-09-20  Chen Wei-Ren  <chenwj@iis.sinica.edu.tw>

doc/lto.texi: Correct typo.

From-SVN: r191559

11 years agocompiler: Fix struct hash and equality with _ fields.
Ian Lance Taylor [Thu, 20 Sep 2012 04:35:13 +0000 (04:35 +0000)]
compiler: Fix struct hash and equality with _ fields.

From-SVN: r191511

11 years agos390.c (s390_chunkify_start): Replacing INSN_LOCATOR.
Dehao Chen [Thu, 20 Sep 2012 03:17:26 +0000 (03:17 +0000)]
s390.c (s390_chunkify_start): Replacing INSN_LOCATOR.

2012-09-19  Dehao Chen  <dehao@google.com>

* config/s390/s390.c (s390_chunkify_start): Replacing INSN_LOCATOR.
* config/spu/spu.c (emit_nop_for_insn): Likewise.
(pad_bb): Likewise.
(spu_emit_branch_hint): Likewise.
(insert_hbrp_for_ilb_runout): Likewise.
* config/mep/mep.c (mep_make_bundle): Likewise.
(mep_bundle_insns): Likewise.
* config/sh/sh.c (gen_block_redirect): Likewise.
* config/c6x/c6x.c (gen_one_bundle): Likewise.
* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Likewise.
* config/picochip/picochip.c (picochip_reorg): Likewise.
* config/arm/arm.c (require_pic_register): Likewise.
* config/mips/mips.c (mips16_gp_pseudo_reg): Likewise.
* config/bfin/bfin.c (gen_one_bundle): Likewise.

From-SVN: r191510

11 years agore PR libstdc++/28811 (--with-pic vs static libraries and libstdc++)
Benjamin Kosnik [Thu, 20 Sep 2012 02:10:22 +0000 (02:10 +0000)]
re PR libstdc++/28811 (--with-pic vs static libraries and libstdc++)

2012-09-18  Benjamin Kosnik  <bkoz@redhat.com>

        PR libstdc++/28811
        PR libstdc++/54482
        * configure.ac (glibcxx_lt_pic_flag,
          glibcxx_compiler_pic_flag,
          glibcxx_compiler_shared_flag): New. Use them.
        (lt_prog_compiler_pic_CXX): Set via glibcxx_*_flag(s) above.
        (pic_mode): Set to default.
        (PIC_CXXFLAGS): Remove.
        * Makefile.am (PICFLAG, PICFLAG_FOR_TARGET): Remove. Comment.
        * libsupc++/Makefile.am: Use glibcxx_ld_pic_flag and
          glibcxx_compiler_shared_flag. Comment.
        * src/c++11/Makefile.am: Same.
        * src/c++98/Makefile.am: Same.
        * src/Makefile.am: Use glibcxx_compiler_pic_flag.

        * Makefile.in: Regenerated.
        * aclocal.m4: Same.
        * configure: Same.
        * doc/Makefile.in: Same.
        * include/Makefile.in: Same.
        * libsupc++/Makefile.in: Same.
        * po/Makefile.in: Same.
        * python/Makefile.in: Same.
        * src/Makefile.in: Same.
        * src/c++11/Makefile.in: Same.
        * src/c++98/Makefile.in: Same.
        * testsuite/Makefile.in: Same.

        * src/c++11/compatibility-atomic-c++0x.cc: Use
          _GLIBCXX_SHARED instead of PIC to designate shared-only
          code blocks.
        * src/c++11/compatibility-c++0x.cc: Same.
        * src/c++11/compatibility-thread-c++0x.cc: Same.
        * src/c++98/compatibility-list-2.cc: Same.
        * src/c++98/compatibility.cc: : Same.

        * testsuite/17_intro/shared_with_static_deps.cc: New.

        * doc/xml/manual/build_hacking.xml: Separate configure from
        make/build issues, add build details.

From-SVN: r191509

11 years agoconfig.host (hppa-*-openbsd*): New target.
Mark Kettenis [Thu, 20 Sep 2012 01:20:34 +0000 (01:20 +0000)]
config.host (hppa-*-openbsd*): New target.

libgcc/:

        * config.host (hppa-*-openbsd*): New target.
        * config/pa/t-openbsd: New file.

gcc:/

        * config.gcc (hppa*-*-openbsd*): New target.
        * config/pa/pa-openbsd.h: New file.
        * config/pa/pa32-openbsd.h: New file.
        * config/host-openbsd.c: Update copyright year.
        (TRY_EXCEPT_VM_SPACE): Define for OpenBSD/hppa.

From-SVN: r191508

11 years agocompiler: Give error for byte-order-mark in middle of file.
Ian Lance Taylor [Thu, 20 Sep 2012 00:54:30 +0000 (00:54 +0000)]
compiler: Give error for byte-order-mark in middle of file.

From-SVN: r191507

11 years agoDaily bump.
GCC Administrator [Thu, 20 Sep 2012 00:18:01 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r191506

11 years agoconfigure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.
Ian Lance Taylor [Wed, 19 Sep 2012 22:57:53 +0000 (22:57 +0000)]
configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.

* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
as a target library.
* configure: Rebuild.

From-SVN: r191503

11 years agoipa-prop.c (prune_expression_for_jf): New function.
Martin Jambor [Wed, 19 Sep 2012 21:46:47 +0000 (23:46 +0200)]
ipa-prop.c (prune_expression_for_jf): New function.

2012-09-19  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.c (prune_expression_for_jf): New function.
(ipa_set_jf_constant): Use it.
(ipa_set_jf_arith_pass_through): Likewise.
(determine_known_aggregate_parts): Likewise.

From-SVN: r191502

11 years agoconfigure.ac: Add mips*-mti-elf* target.
Steve Ellcey [Wed, 19 Sep 2012 20:46:44 +0000 (20:46 +0000)]
configure.ac: Add mips*-mti-elf* target.

2012-09-19  Steve Ellcey  <sellcey@mips.com>

* configure.ac: Add mips*-mti-elf* target.
* configure: Regenerate.

From-SVN: r191501

11 years agore PR c++/54581 (decltype and opaque vector types)
Marc Glisse [Wed, 19 Sep 2012 20:45:03 +0000 (22:45 +0200)]
re PR c++/54581 (decltype and opaque vector types)

2012-09-19  Marc Glisse  <marc.glisse@inria.fr>

PR c++/54581

gcc/cp/
* semantics.c (finish_decltype_type): Make vectors not opaque.

gcc/testsuite/
* g++.dg/cpp0x/decltype-54581.C: New testcase.

From-SVN: r191500

11 years agomt-sde: Change -mcode-xonly to -mcode-readable=pcrel.
Steve Ellcey [Wed, 19 Sep 2012 20:42:01 +0000 (20:42 +0000)]
mt-sde: Change -mcode-xonly to -mcode-readable=pcrel.

2012-09-19  Steve Ellcey  <sellcey@mips.com>

* mt-sde: Change -mcode-xonly to -mcode-readable=pcrel.

From-SVN: r191499

11 years agopr37362.c: Add mips*-mti-elf exception.
Steve Ellcey [Wed, 19 Sep 2012 20:29:53 +0000 (20:29 +0000)]
pr37362.c: Add mips*-mti-elf exception.

2012-09-19  Steve Ellcey  <sellcey@mips.com>

* gcc.target/mips/pr37362.c: Add mips*-mti-elf exception.

From-SVN: r191497

11 years agoconfig.gcc (mips*-mti-elf*): New target.
Steve Ellcey [Wed, 19 Sep 2012 20:23:34 +0000 (20:23 +0000)]
config.gcc (mips*-mti-elf*): New target.

2012-09-19  Steve Ellcey  <sellcey@mips.com>

* config.gcc (mips*-mti-elf*): New target.
* config/mips/mti-elf.h: New file.
* config/mips/t-mti-elf: New file.

From-SVN: r191496

11 years agoIntegrate lexical block into source_location.
Dehao Chen [Wed, 19 Sep 2012 19:56:42 +0000 (19:56 +0000)]
Integrate lexical block into source_location.

gcc:
2012-09-19  Dehao Chen  <dehao@google.com>

* toplev.c (general_init): Init block_locations.
* tree.c (tree_set_block): New.
(tree_block): Change to use LOCATION_BLOCK.
* tree.h (TREE_SET_BLOCK): New.
* final.c (reemit_insn_block_notes): Change to use LOCATION_BLOCK.
(final_start_function): Likewise.
* input.c (expand_location_1): Likewise.
* input.h (LOCATION_LOCUS): New.
(LOCATION_BLOCK): New.
(IS_UNKNOWN_LOCATION): New.
* fold-const.c (expr_location_or): Change to use new location.
* reorg.c (emit_delay_sequence): Likewise.
(try_merge_delay_insns): Likewise.
* modulo-sched.c (dump_insn_location): Likewise.
* lto-streamer-out.c (lto_output_location_bitpack): Likewise.
* lto-cgraph.c (output_node_opt_summary): Likewise.
* jump.c (rtx_renumbered_equal_p): Likewise.
* ifcvt.c (noce_try_move): Likewise.
(noce_try_store_flag): Likewise.
(noce_try_store_flag_constants): Likewise.
(noce_try_addcc): Likewise.
(noce_try_store_flag_mask): Likewise.
(noce_try_cmove): Likewise.
(noce_try_cmove_arith): Likewise.
(noce_try_minmax): Likewise.
(noce_try_abs): Likewise.
(noce_try_sign_mask): Likewise.
(noce_try_bitop): Likewise.
(noce_process_if_block): Likewise.
(cond_move_process_if_block): Likewise.
(find_cond_trap): Likewise.
* ipa-prop.c (ipa_set_jf_constant): Likewise.
(ipa_write_jump_function): Likewise.
* dwarf2out.c (add_src_coords_attributes): Likewise.
* expr.c (expand_expr_real): Likewise.
* tree-parloops.c (create_loop_fn): Likewise.
* recog.c (peep2_attempt): Likewise.
* function.c (free_after_compilation): Likewise.
(expand_function_end): Likewise.
(set_insn_locations): Likewise.
(thread_prologue_and_epilogue_insns): Likewise.
* print-rtl.c (print_rtx): Likewise.
* profile.c (branch_prob): Likewise.
* trans-mem.c (ipa_tm_scan_irr_block): Likewise.
* gimplify.c (gimplify_call_expr): Likewise.
* except.c (duplicate_eh_regions_1): Likewise.
* emit-rtl.c (try_split): Likewise.
(make_insn_raw): Likewise.
(make_debug_insn_raw): Likewise.
(make_jump_insn_raw): Likewise.
(make_call_insn_raw): Likewise.
(emit_pattern_after_setloc): Likewise.
(emit_pattern_after): Likewise.
(emit_debug_insn_after): Likewise.
(emit_pattern_before): Likewise.
(emit_insn_before_setloc): Likewise.
(emit_jump_insn_before): Likewise.
(emit_call_insn_before_setloc): Likewise.
(emit_call_insn_before): Likeise.
(emit_debug_insn_before_setloc): Likewise.
(emit_copy_of_insn_after): Likewise.
(insn_locators_alloc): Remove.
(insn_locators_finalize): Remove.
(insn_locators_free): Remove.
(set_curr_insn_source_location): Remove.
(get_curr_insn_source_location): Remove.
(set_curr_insn_block): Remove.
(get_curr_insn_block): Remove.
(locator_scope): Remove.
(insn_scope): Change to use new location.
(locator_location): Remove.
(insn_line): Change to use new location.
(locator_file): Remove.
(insn_file): Change to use new location.
(locator_eq): Remove.
(insn_locations_init): New.
(insn_locations_finalize): New.
(set_curr_insn_location): New.
(curr_insn_location): New.
* cfgexpand.c (gimple_assign_rhs_to_tree): Change to use new location.
(expand_gimple_cond): Likewise.
(expand_call_stmt): Likewise.
(expand_gimple_stmt_1): Likewise.
(expand_gimple_basic_block): Likewise.
(construct_exit_block): Likewise.
(gimple_expand_cfg): Likewise.
* cfgcleanup.c (try_forward_edges): Likewise.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
(dump_scope_block): Likewise.
(remove_unused_locals): Likewise.
* rtl.c (rtx_equal_p_cb): Likewise.
(rtx_equal_p): Likewise.
* rtl.h (XUINT): New.
(INSN_LOCATOR): Remove.
(CURR_INSN_LOCATION): Remove.
(INSN_LOCATION): New.
(INSN_HAS_LOCATION): New.
* tree-inline.c (remap_gimple_op_r): Change to use new location.
(copy_tree_body_r): Likewise.
(copy_phis_for_bb): Likewise.
(expand_call_inline): Likewise.
* tree-streamer-in.c (lto_input_ts_exp_tree_pointers): Likewise.
* tree-streamer-out.c (write_ts_decl_minimal_tree_pointers): Likewise.
* gimple-streamer-out.c (output_gimple_stmt): Likewise.
* combine.c (try_combine): Likewise.
* tree-outof-ssa.c (set_location_for_edge): Likewise.
(insert_partition_copy_on_edge): Likewise.
(insert_value_copy_on_edge): Likewise.
(insert_rtx_to_part_on_edge): Likewise.
(insert_part_to_rtx_on_edge): Likewise.
* basic-block.h (edge_def): Remove field.
* gimple.h (gimple_statement_base): Remove field.
(gimple_bb): Change to use new location.
(gimple_set_block): Likewise.
(gimple_has_location): Likewise.
* tree-cfg.c (make_cond_expr_edges): Likewise.
(make_goto_expr_edges): Likewise.
(gimple_can_merge_blocks_p): Likewise.
(move_stmt_op): Likewise.
(move_block_to_fn): Likewise.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
* config/i386/i386.c (x86_output_mi_thunk): Likewise.
* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
* config/sh/sh.c (sh_output_mi_thunk): Likewise.
* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/score/score.c (score_output_mi_thunk): Likewise.
* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
* config/mips/mips.c (mips_output_mi_thunk): Likewise.
* cfgrtl.c (unique_locus_on_edge_between_p): Likewise.
(unique_locus_on_edge_between_p): Likewise.
(emit_nop_for_unique_locus_between): Likewise.
(force_nonfallthru_and_redirect): Likewise.
(fixup_reorder_chain): Likewise.
(cfg_layout_merge_blocks): Likewise.
* stmt.c (emit_case_nodes): Likewise.

gcc/lto:
2012-09-19  Dehao Chen  <dehao@google.com>

* lto/lto.c (lto_fixup_prevailing_decls): Remove tree.exp.block field.

libcpp:
2012-09-19  Dehao Chen  <dehao@google.com>

* include/line-map.h (MAX_SOURCE_LOCATION): New value.
(location_adhoc_data_fini): New.
(get_combined_adhoc_loc): New.
(get_data_from_adhoc_loc): New.
(get_location_from_adhoc_loc): New.
(location_adhoc_data_map): New.
(COMBINE_LOCATION_DATA): New.
(IS_ADHOC_LOC): New.
(expanded_location): New field.
(line_maps): New field.
* line-map.c (location_adhoc_data): New.
(location_adhoc_data_hash): New.
(location_adhoc_data_eq): New.
(location_adhoc_data_update): New.
(get_combined_adhoc_loc): New.
(get_data_from_adhoc_loc): New.
(get_location_from_adhoc_loc): New.
(location_adhoc_data_init): New.
(location_adhoc_data_fini): New.
(linemap_init): Initialize location_adhoc_data.
(linemap_lookup): Change to use new location.
(linemap_ordinary_map_lookup): Likewise.
(linemap_macro_map_lookup): Likewise.
(linemap_macro_map_loc_to_def_point): Likewise.
(linemap_macro_map_loc_unwind_toward_spel): Likewise.
(linemap_get_expansion_line): Likewise.
(linemap_get_expansion_filename): Likewise.
(linemap_location_in_system_header_p): Likewise.
(linemap_location_from_macro_expansion_p): Likewise.
(linemap_macro_loc_to_spelling_point): Likewise.
(linemap_macro_loc_to_def_point): Likewise.
(linemap_macro_loc_to_exp_point): Likewise.
(linemap_resolve_location): Likewise.
(linemap_unwind_toward_expansion): Likewise.
(linemap_unwind_to_first_non_reserved_loc): Likewise.
(linemap_expand_location): Likewise.
(linemap_dump_location): Likewise.
(linemap_line_start): Likewise.

From-SVN: r191494

11 years agodbgcnt.def (sched_breakdep): New counter.
Bernd Schmidt [Wed, 19 Sep 2012 19:37:31 +0000 (19:37 +0000)]
dbgcnt.def (sched_breakdep): New counter.

* dbgcnt.def (sched_breakdep): New counter.
* haifa-sched.c (update_insn_after_change): New static function,
broken out of haifa_change_pattern.
(haifa_change_pattern): Call it.
(dep_t heap vecs): Declare.
(INSN_COST): Define earlier.
(next_cycle_replace_deps, next_cycle_apply): New static
variables.
(apply_replacement): New static function.
(recompute_todo_spec): New argument FOR_BACKTRACK.  All callers
changed.  Handle DEP_REPLACE deps.
(contributes_to_priority_p): False for replaceable deps.
(must_restore_pattern_p, restore_pattern): New static functions.
(schedule_insn): Use them.  Apply replacements for broken deps.
(struct haifa_saved_data): Add new fields to keep track of
replacements.
(save_backtrack_point): Initialize them.
(undo_replacements_for_backtrack): New static function.
(restore_last_backtrack_point, free_topmost_backtrack_point):
Use it and keep track of replacements.
(perform_replacements_new_cycle, undo_all_replacements): New static
functions.
(schedule_block): Call these two as necessary.  Call
find_modifiable_mems.
(try_ready): Tweak the assert.  Check for DEP_POSTPONED.
* sched-deps.c: Include "emit-rtl.h".
(init_dep_1): Initialize DEP_NONREG, DEP_MULTIPLE and DEP_REPLACE.
(dep_spec_p): True for DEP_REPLACE deps.
(mark_as_hard): New static variable.
(update_dep): Update DEP_NONREG and DEP_MULTIPLE.
(add_dependence_list): New argument hard.  All callers changed.  Set
and clear mark_as_hard around function body.
(add_dependence_list_and_free): Likewise.
(haifa_note_mem_dep): Set DEP_NONREG.
(haifa_note_dep): Likewise if mark_as_hard is true.
(sched_analyze_insn): Switch loop with if statement testing for
sel_sched_p.
(struct mem_inc_info): New.
(attempt_change, parse_add_or_inc, find_inc, find_mem): New static
functions.
(find_modifiable_mems): New function.
* sched-int.h (struct dep_replacement): New.
(struct _dep): Add replace, nonreg and multiple fields.  Make type and
cost bitfields.
(UNKNOWN_DEP_COST): Change to match the bitfield.
(DEP_NONREG, DEP_MULTIPLE, DEP_REPLACE): New macros.
(DEP_POSTPONED): New macro.
(DEP_CANCELLED): Renumber.
(find_modifiable_mems): Declare.
(enum SCHED_FLAGS): Add DONT_BREAK_DEPENDENCIES.
* sched-rgn.c (init_ready_list): Set TODO_SPEC here.
(new_ready): Don't set HARD_DEP, use DEP_POSTPONED.
(debug_dependencies): Dump DEP_NONREG and DEP_MULTIPLE.
* Makefile.in (sched-deps.o): Update dependencies.
* config/c6x/c6x.c (in_hwloop): New static variable.
(c6x_set_sched_flags): If it is true, add DONT_BREAK_DEPENDENCIES.
(hwloop_optimize): Set and clear it around preliminary scheduling
pass.

From-SVN: r191493

11 years agoppc-get-timebase.c: New file.
Tulio Magno Quites Machado Filho [Wed, 19 Sep 2012 19:08:00 +0000 (19:08 +0000)]
ppc-get-timebase.c: New file.

2012-09-19  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>

        * gcc.target/powerpc/ppc-get-timebase.c: New file.
        * gcc.target/powerpc/ppc-mftb.c: New file.

From-SVN: r191492

11 years ago[multiple changes]
David Edelsohn [Wed, 19 Sep 2012 19:05:34 +0000 (15:05 -0400)]
[multiple changes]

2012-09-19  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>

        * config/rs6000/rs6000-builtin.def: Add __builtin_ppc_get_timebase
        and __builtin_ppc_mftb.
        * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): New
        function to expand an expression that calls a built-in without
        arguments.
        (rs6000_expand_builtin): Add __builtin_ppc_get_timebase and
        __builtin_ppc_mftb.
        (rs6000_init_builtins): Likewise.
        * config/rs6000/rs6000.md (rs6000_get_timebase): New pattern.
        (rs6000_get_timebase_ppc32): New pattern.
        (rs6000_mftb_<mode>): New pattern.

        * doc/extend.texi (PowerPC Built-in Functions): New section.
        (PowerPC AltiVec/VSX Built-in Functions):
        Move some built-ins unrelated to Altivec/VSX to the new section.

2012-09-19  David Edelsohn  <dje.gcc@gmail.com>

        * rs6000.md (mac*): Remove extra spaces.
        (mulhw*): Same.

From-SVN: r191491

11 years agore PR target/54089 ([SH] Refactor shift patterns)
Oleg Endo [Wed, 19 Sep 2012 17:48:25 +0000 (17:48 +0000)]
re PR target/54089 ([SH] Refactor shift patterns)

PR target/54089
* config/sh/predicates.md (arith_reg_or_t_reg_operand): New predicate.
* config/sh/sh.md (*rotcr): Use arith_reg_or_t_reg_operand predicate.
Handle the case where one of the operands is T_REG.
Add new pattern to handle MSB extraction.

PR target/54089
* gcc.target/sh/pr54089-1.c (test_11, test_12, test_13, test_14): New
functions.

From-SVN: r191490

11 years agore PR target/54236 ([SH] Improve addc and subc insn utilization)
Oleg Endo [Wed, 19 Sep 2012 17:45:37 +0000 (17:45 +0000)]
re PR target/54236 ([SH] Improve addc and subc insn utilization)

PR target/54236
* config/sh/sh.md (*addc): Add pattern to handle one bit left shifts.

PR target/54236
* gcc.target/sh/pr54236-1.c (test_08): Add one bit left shift case.

From-SVN: r191489

11 years agosh.md (prologue, epilogue): Use braced strings.
Oleg Endo [Wed, 19 Sep 2012 17:42:28 +0000 (17:42 +0000)]
sh.md (prologue, epilogue): Use braced strings.

* config/sh/sh.md (prologue, epilogue): Use braced strings.

From-SVN: r191488

11 years agocompiler: Ignore byte-order-mark at start of file.
Ian Lance Taylor [Wed, 19 Sep 2012 15:51:16 +0000 (15:51 +0000)]
compiler: Ignore byte-order-mark at start of file.

From-SVN: r191485

11 years agore PR rtl-optimization/54290 (wrong code at -O2 with large offset)
Eric Botcazou [Wed, 19 Sep 2012 15:38:16 +0000 (15:38 +0000)]
re PR rtl-optimization/54290 (wrong code at -O2 with large offset)

PR rtl-optimization/54290
* reload1.c (choose_reload_regs): Also take into account secondary MEMs
to remove address replacements for inherited reloads.
(replaced_subreg): Move around.

From-SVN: r191484

11 years ago* cpplib.pot: Regenerate.
Joseph Myers [Wed, 19 Sep 2012 14:58:40 +0000 (15:58 +0100)]
* cpplib.pot: Regenerate.

From-SVN: r191483

11 years ago* gcc.pot: Regenerate.
Joseph Myers [Wed, 19 Sep 2012 14:58:08 +0000 (15:58 +0100)]
* gcc.pot: Regenerate.

From-SVN: r191482

11 years agoaix61.h (TARGET_DEFAULT): Add MASK_PPC_GPOPT, MASK_PPC_GFXOPT, and MASK_MFCRF.
David Edelsohn [Wed, 19 Sep 2012 14:21:52 +0000 (14:21 +0000)]
aix61.h (TARGET_DEFAULT): Add MASK_PPC_GPOPT, MASK_PPC_GFXOPT, and MASK_MFCRF.

        * config/rs6000/aix61.h (TARGET_DEFAULT): Add MASK_PPC_GPOPT,
        MASK_PPC_GFXOPT, and MASK_MFCRF.

From-SVN: r191480

11 years agoc-torture.exp (TORTURE_OPTIONS): Add -Og -g.
Richard Guenther [Wed, 19 Sep 2012 14:05:26 +0000 (14:05 +0000)]
c-torture.exp (TORTURE_OPTIONS): Add -Og -g.

2012-09-19  Richard Guenther  <rguenther@suse.de>

* lib/c-torture.exp (TORTURE_OPTIONS): Add -Og -g.

From-SVN: r191478

11 years agopasses.c (init_optimization_passes): For -Og move pass_object_sizes inbetween CCP...
Richard Guenther [Wed, 19 Sep 2012 13:46:34 +0000 (13:46 +0000)]
passes.c (init_optimization_passes): For -Og move pass_object_sizes inbetween CCP and copyprop.

2012-09-19  Richard Guenther  <rguenther@suse.de>

* passes.c (init_optimization_passes): For -Og move
pass_object_sizes inbetween CCP and copyprop.

From-SVN: r191476

11 years agoconfigure.ac (GCC_HEADER_STDINT): Invoke.
Rainer Orth [Wed, 19 Sep 2012 13:41:33 +0000 (13:41 +0000)]
configure.ac (GCC_HEADER_STDINT): Invoke.

        * configure.ac (GCC_HEADER_STDINT): Invoke.
        * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
        * btest.c: Don't include <stdint.h>.
        * dwarf.c: Likewise.
        * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.

Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r191474

11 years agobuiltin-unreachable-6.c: Adjust.
Richard Guenther [Wed, 19 Sep 2012 13:29:08 +0000 (13:29 +0000)]
builtin-unreachable-6.c: Adjust.

2012-09-19  Richard Guenther  <rguenther@suse.de>

* gcc.dg/builtin-unreachable-6.c: Adjust.

From-SVN: r191472

11 years agobuiltin-object-size-10.c: Adjust.
Richard Guenther [Wed, 19 Sep 2012 11:13:09 +0000 (11:13 +0000)]
builtin-object-size-10.c: Adjust.

2012-09-19  Richard Guenther  <rguenther@suse.de>

* gcc.dg/builtin-object-size-10.c: Adjust.
* gcc.dg/builtin-unreachable-5.c: Adjust.
* gcc.dg/tree-ssa/builtin-fprintf-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-fprintf-chk-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-printf-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-printf-chk-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-vfprintf-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-vprintf-1.c: Adjust.
* gcc.dg/tree-ssa/builtin-vprintf-chk-1.c: Adjust.
* gcc.dg/tree-ssa/ssa-ccp-10.c: Adjust.
* gcc.dg/vect/vec-scal-opt.c: Adjust.
* gcc.dg/vect/vec-scal-opt1.c: Adjust.
* gcc.dg/vect/vec-scal-opt2.c: Adjust.

From-SVN: r191468

11 years agotree-ssa-forwprop.c (get_prop_source_stmt): Simplify.
Richard Guenther [Wed, 19 Sep 2012 11:03:51 +0000 (11:03 +0000)]
tree-ssa-forwprop.c (get_prop_source_stmt): Simplify.

2012-09-19  Richard Guenther  <rguenther@suse.de>

* tree-ssa-forwprop.c (get_prop_source_stmt): Simplify.

From-SVN: r191467

11 years agosymtab.c (insert_to_assembler_name_hash): Do not insert register vars.
Jan Hubicka [Wed, 19 Sep 2012 10:01:56 +0000 (12:01 +0200)]
symtab.c (insert_to_assembler_name_hash): Do not insert register vars.

* symtab.c (insert_to_assembler_name_hash): Do not insert
register vars.
(unlink_from_assembler_name_hash): NULL out pointers of unlinked
var.
(symtab_prevail_in_asm_name_hash): New.
(symtab_initialize_asm_name_hash): Break out from ...
(symtab_node_for_asm): ... here.
(dump_symtab_base): Dump LTO file data.
(verify_symtab_base): Register vars are not in symtab.
* cgraph.h (symtab_initialize_asm_name_hash,
symtab_prevail_in_asm_name_hash): New functions.
(symtab_real_symbol_p): New inline.
* lto-symtab.c: Do not include gt-lto-symtab.h.
(lto_symtab_entry_def): Remove.
(lto_symtab_entry_t): Remove.
(lto_symtab_identifiers): Remove.
(lto_symtab_free): Remove.
(lto_symtab_entry_hash): Remove.
(lto_symtab_entry_eq): Remove.
(lto_symtab_entry_marked_p): Remove.
(lto_symtab_maybe_init_hash_table): Remove.
(resolution_guessed_p, set_resolution_guessed): New functions.
(lto_symtab_register_decl): Only set resolution info.
(lto_symtab_get, lto_symtab_get_resolution): Remove.
(lto_symtab_merge): Reorg to work across symtab; do nothing if decls
are same.
(lto_symtab_resolve_replaceable_p): Reorg to work on symtab.
(lto_symtab_resolve_can_prevail_p): Likewise; only real symbols can
prevail.
(lto_symtab_resolve_symbols): Reorg to work on symtab.
(lto_symtab_merge_decls_2): Likewise.
(lto_symtab_merge_decls_1): Likewise; add debug dumps.
(lto_symtab_merge_decls): Likewise; do not merge at ltrans stage.
(lto_symtab_merge_cgraph_nodes_1): Reorg to work on symtab.
(lto_symtab_merge_cgraph_nodes): Likewise; do not merge at ltrans stage.
(lto_symtab_prevailing_decl): Rewrite to lookup into symtab.
* lto-streaer.h (lto_symtab_free): Remove.
* lto-cgraph.c (add_references): Cleanup.
* varpool.c (varpool_assemble_decl): Skip hard regs.

* lto.c (lto_materialize_function): Update confused comment.
(read_cgraph_and_symbols): Do not free symtab.

From-SVN: r191466

11 years agore PR other/53316 (Introduce -Og)
Richard Guenther [Wed, 19 Sep 2012 09:31:49 +0000 (09:31 +0000)]
re PR other/53316 (Introduce -Og)

2012-09-19  Richard Guenther  <rguenther@suse.de>

PR other/53316
* common/common-target.h (OPT_LEVELS_1_PLUS_NOT_DEBUG): Add.

From-SVN: r191465

11 years agore PR other/53316 (Introduce -Og)
Richard Guenther [Wed, 19 Sep 2012 09:29:57 +0000 (09:29 +0000)]
re PR other/53316 (Introduce -Og)

2012-09-19  Richard Guenther  <rguenther@suse.de>

PR other/53316
* common.opt (optimize_debug): New variable.
(Og): New optimization level.
* doc/invoke.texi (Og): Document.
* opts.c (maybe_default_option): Add debug parameter.
(maybe_default_options): Likewise.
(default_options_optimization): Handle -Og.
(common_handle_option): Likewise.
* passes.c (gate_all_optimizations): Do not run with -Og.
(gate_all_optimizations_g): New gate, run with -Og.
(pass_all_optimizations_g): New container pass, run with -Og.
(init_optimization_passes): Schedule pass_all_optimizations_g
alongside pass_all_optimizations.

From-SVN: r191464

11 years agore PR tree-optimization/54132 (Incorrect loop transformation with -ftree-loop-distrib...
Richard Guenther [Wed, 19 Sep 2012 08:59:06 +0000 (08:59 +0000)]
re PR tree-optimization/54132 (Incorrect loop transformation with -ftree-loop-distribute-patterns)

2012-09-19  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54132
* tree-loop-distribution.c (classify_partition): Properly
check dependences for memmove.
* tree-data-ref.h (compute_affine_dependence): Declare.
* tree-data-ref.c (compute_affine_dependence): Export.

* gcc.dg/tree-ssa/ldist-21.c: New testcase.
* gcc.dg/torture/pr54132.c: Likewise.

From-SVN: r191463

11 years agore PR middle-end/54364 (Tail call jumps not threaded)
Zhenqiang Chen [Wed, 19 Sep 2012 07:40:15 +0000 (07:40 +0000)]
re PR middle-end/54364 (Tail call jumps not threaded)

PR middle-end/54364
* bb-reorder.c (connect_better_edge_p): New added.
(find_traces_1_round): When optimizing for size, ignore edge frequency
and probability, and handle all in one round.
(bb_to_key): Use bb->index as key when optimizing for size.
(better_edge_p): The bb with smaller index is better when optimizing
for size.
(connect_traces): When optimizing for size, connect block n with
block n + 1; connect trace m with trace m + 1 if falling through.
(gate_handle_reorder_blocks): Enable bbro when optimizing for -Os.

From-SVN: r191462

11 years agocompiler: Fix multiple types with same name in function.
Ian Lance Taylor [Wed, 19 Sep 2012 05:27:19 +0000 (05:27 +0000)]
compiler: Fix multiple types with same name in function.

From-SVN: r191461

11 years agogcc-dg.exp (dg_runtest_extra_prunes): New variable to define extra prune rules that...
Terry Guo [Wed, 19 Sep 2012 05:17:22 +0000 (05:17 +0000)]
gcc-dg.exp (dg_runtest_extra_prunes): New variable to define extra prune rules that will be applied to all tests in a...

2012-09-19  Terry Guo  <terry.guo@arm.com>

        * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
        extra prune rules that will be applied to all tests in a .exp file.
        (gcc-dg-prune): Use rules defined by the above variable.
        * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
        harmless warnings on architecture switch conflict.

From-SVN: r191460

11 years agore PR bootstrap/54623 (install fails with libbacktrace/backtrace.c:35:20: error:...
Ian Lance Taylor [Wed, 19 Sep 2012 04:37:40 +0000 (04:37 +0000)]
re PR bootstrap/54623 (install fails with libbacktrace/backtrace.c:35:20: error: unwind.h: No such file or directory)

PR bootstrap/54623
* Makefile.am (AM_CPPFLAGS): Define.
(AM_CFLAGS): Remove -I options.
* Makefile.in: Rebuild.

From-SVN: r191459

11 years agoFix ChangeLog entry for r191457.
Bin Cheng [Wed, 19 Sep 2012 01:53:23 +0000 (01:53 +0000)]
Fix ChangeLog entry for r191457.

From-SVN: r191458

11 years ago* fold-const.c (fold_truth_andor) Remove duplicated check on
Bin Cheng [Wed, 19 Sep 2012 01:49:09 +0000 (01:49 +0000)]
* fold-const.c (fold_truth_andor) Remove duplicated check on
BRANCH_COST.

From-SVN: r191457

11 years agonested-3.C: Match a sequence of asm-comment characters instead of a single one.
Hans-Peter Nilsson [Wed, 19 Sep 2012 01:36:31 +0000 (01:36 +0000)]
nested-3.C: Match a sequence of asm-comment characters instead of a single one.

* g++.dg/debug/dwarf2/nested-3.C: Match a sequence
of asm-comment characters instead of a single one.
* g++.dg/debug/dwarf2/nested-2.C: Similar.

From-SVN: r191456

11 years agoDaily bump.
GCC Administrator [Wed, 19 Sep 2012 00:17:30 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r191455

11 years agore PR middle-end/54617 (ICE on gcc.c-torture/compile/pr42025-2.c with -m64 and -O1)
Eric Botcazou [Tue, 18 Sep 2012 22:42:18 +0000 (22:42 +0000)]
re PR middle-end/54617 (ICE on gcc.c-torture/compile/pr42025-2.c  with -m64 and -O1)

PR middle-end/54617
* expr.c (store_field): Handle a PARALLEL in more cases.

From-SVN: r191451

11 years agors6000.md (sminsi3, [...]): Delete.
Segher Boessenkool [Tue, 18 Sep 2012 21:13:45 +0000 (23:13 +0200)]
rs6000.md (sminsi3, [...]): Delete.

2012-09-18  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/
* config/rs6000/rs6000.md (sminsi3, smaxsi3, uminsi3, umaxsi3):
Delete.
(abssi2, abs<mode>2_isel, nabs<mode>2_isel, abssi2_nopower,
nabs_nopower): Delete.
(absdi2, absdi2_internal, nabsdi2): Delete.
(smindi3, smaxdi3, umindi3, umaxdi3): Delete.

From-SVN: r191450

11 years ago* gcc.dg/vect/fast-math-pr35982.c: Skip check instead of xfail.
Janis Johnson [Tue, 18 Sep 2012 19:47:39 +0000 (19:47 +0000)]
* gcc.dg/vect/fast-math-pr35982.c: Skip check instead of xfail.

From-SVN: r191448

11 years agono-vfa-vect-101.c: Skip a check for an irrelevant target instead of xfailing it.
Janis Johnson [Tue, 18 Sep 2012 19:46:52 +0000 (19:46 +0000)]
no-vfa-vect-101.c: Skip a check for an irrelevant target instead of xfailing it.

* gcc.dg/vect/no-vfa-vect-101.c: Skip a check for an irrelevant
target instead of xfailing it.
* gcc.dg/vect/no-vfa-vect-102.c: Likewise.
* gcc.dg/vect/no-vfa-vect-102a.c: Likewise.
* gcc.dg/vect/no-vfa-vect-37.c: Likewise.
* gcc.dg/vect/no-vfa-vect-79.c: Likewise.
* gcc.dg/vect/vect-104.c: Likewise.
* gcc.dg/vect/vect-outer-1-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-1.c: Likewise.
* gcc.dg/vect/vect-outer-1a-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-1a.c: Likewise.
* gcc.dg/vect/vect-outer-1b-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-1b.c: Likewise.
* gcc.dg/vect/vect-outer-2b.c: Likewise.
* gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-3a.c: Likewise.
* gcc.dg/vect/vect-outer-3b.c: Likewise.
* gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.

From-SVN: r191447

11 years agotarget-supports.exp (check_effective_target_vect_widen_mult_qi_to_hi, [...]): Check...
Janis Johnson [Tue, 18 Sep 2012 19:46:01 +0000 (19:46 +0000)]
target-supports.exp (check_effective_target_vect_widen_mult_qi_to_hi, [...]): Check arm_neon_ok instead of arm_none.

* lib/target-supports.exp
(check_effective_target_vect_widen_mult_qi_to_hi,
check_effective_target_vect_widen_mult_hi_to_si,
check_effective_target_vect_widen_mult_qi_to_hi_pattern,
check_effective_target_vect_widen_mult_hi_to_si_pattern,
check_effective_target_vect_pack_trunc,
check_effective_target_vect_unpack,
check_effective_target_vect_multiple_sizes): Check arm_neon_ok
instead of arm_none.

From-SVN: r191446

11 years ago* gcc.dg/vect/pr52298.c: Remove "dg-do run".
Janis Johnson [Tue, 18 Sep 2012 19:45:11 +0000 (19:45 +0000)]
* gcc.dg/vect/pr52298.c: Remove "dg-do run".

From-SVN: r191445

11 years agotarget-supports-dg.exp (check-flags): Add cflags from board config to compiler_flags.
Senthil Kumar Selvaraj [Tue, 18 Sep 2012 19:42:13 +0000 (19:42 +0000)]
target-supports-dg.exp (check-flags): Add cflags from board config to compiler_flags.

2012-09-18  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* lib/target-supports-dg.exp (check-flags): Add cflags from board
config to compiler_flags.

From-SVN: r191444

11 years agoposix.c (O_BINARY): Define if not defined.
Ian Lance Taylor [Tue, 18 Sep 2012 18:06:28 +0000 (18:06 +0000)]
posix.c (O_BINARY): Define if not defined.

* posix.c (O_BINARY): Define if not defined.
(backtrace_open): Pass O_BINARY to open.  Only call fcntl if
HAVE_FCNTL is defined.
* configure.ac: Test for the fcntl function.
* configure, config.h.in: Rebuild.

From-SVN: r191443

11 years ago* btest.c (test1, test2, test3, test4): Add the unused attribute.
Ian Lance Taylor [Tue, 18 Sep 2012 17:10:01 +0000 (17:10 +0000)]
* btest.c (test1, test2, test3, test4): Add the unused attribute.

From-SVN: r191440

11 years ago* dwarf.c: Correct test of HAVE_DECL_STRNLEN.
Ian Lance Taylor [Tue, 18 Sep 2012 16:50:29 +0000 (16:50 +0000)]
* dwarf.c: Correct test of HAVE_DECL_STRNLEN.

From-SVN: r191437

11 years agoavr.md: Tidy up empty "".
Georg-Johann Lay [Tue, 18 Sep 2012 16:43:27 +0000 (16:43 +0000)]
avr.md: Tidy up empty "".

* config/avr/avr.md: Tidy up empty "".  Fix C code indentation.
* config/avr/avr-fixed.md: Ditto.

From-SVN: r191436

11 years agoconfigure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
Ian Lance Taylor [Tue, 18 Sep 2012 16:36:48 +0000 (16:36 +0000)]
configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.

* configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
* mmapio.c: Don't define _GNU_SOURCE.
* configure, config.h.in: Rebuild.

From-SVN: r191435

11 years agoImplement the Nakagami statistical distribution as an extension.
Edward Smith-Rowland [Tue, 18 Sep 2012 16:14:09 +0000 (16:14 +0000)]
Implement the Nakagami statistical distribution as an extension.

From-SVN: r191434

11 years agoconfigure.ac: Check whether strnlen is declared.
Ian Lance Taylor [Tue, 18 Sep 2012 16:06:53 +0000 (16:06 +0000)]
configure.ac: Check whether strnlen is declared.

* configure.ac: Check whether strnlen is declared.
* dwarf.c: Declare strnlen if not declared.
* configure, config.h.in: Rebuild.

From-SVN: r191433

11 years agostrnlen.c: New file.
Ian Lance Taylor [Tue, 18 Sep 2012 16:03:01 +0000 (16:03 +0000)]
strnlen.c: New file.

* strnlen.c: New file.
* configure.ac: Check for strnlen, add it to AC_LIBOBJ if it's not
present.
* Makefile.in: Rebuild dependencies.
(CFILES): Add strnlen.c.
(CONFIGURED_OFILES): Add ./strnlen.$(objext).
* configure, config.in, functions.texi: Rebuild.

* maint-tool: Accept .def files in the include directory.

From-SVN: r191432

11 years agors6000.c (print_operand): Remove.
Maciej W. Rozycki [Tue, 18 Sep 2012 15:57:53 +0000 (15:57 +0000)]
rs6000.c (print_operand): Remove.

* config/rs6000/rs6000.c (print_operand) <'c'>: Remove.
* config/rs6000/spe.md: Remove a leftover comment.

From-SVN: r191431

11 years agore PR rtl-optimization/54592 (Cannot fuse SSE move and add together)
Jakub Jelinek [Tue, 18 Sep 2012 15:14:15 +0000 (17:14 +0200)]
re PR rtl-optimization/54592 (Cannot fuse SSE move and add together)

PR target/54592
* config/i386/i386.c (ix86_rtx_costs): Limit > UNITS_PER_WORD
AND/IOR/XOR cost calculation to MODE_INT class modes.

* gcc.target/i386/pr54592.c: New test.

From-SVN: r191430

11 years ago* c-ada-spec.c: Style fixes.
Arnaud Charlet [Tue, 18 Sep 2012 14:31:38 +0000 (14:31 +0000)]
* c-ada-spec.c: Style fixes.

From-SVN: r191428

11 years agoinvoke.texi: Document -fada-spec-parent.
Thomas Quinot [Tue, 18 Sep 2012 14:26:06 +0000 (14:26 +0000)]
invoke.texi: Document -fada-spec-parent.

* doc/invoke.texi: Document -fada-spec-parent.
c-family/
* c.opt (-fada-spec-parent): Define new command line switch.
* c-ada-spec.c (get_ada_package): When -fada-spec-parent
is specified, generate binding spec as a child of the specified unit.

From-SVN: r191427

11 years agore PR libstdc++/54612 (Many failures in ext/random testsuite)
Paolo Carlini [Tue, 18 Sep 2012 14:02:20 +0000 (14:02 +0000)]
re PR libstdc++/54612 (Many failures in ext/random testsuite)

2012-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

PR libstdc++/54612
* include/ext/random.tcc (operator==
(const __gnu_cxx::simd_fast_mersenne_twister_engine<>&,
const __gnu_cxx::simd_fast_mersenne_twister_engine<>&)): Fix
state_size use.
* config/cpu/i486/opt/ext/opt_random.h: Guard with __SSE2__.

From-SVN: r191424

11 years agore PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler...
Jakub Jelinek [Tue, 18 Sep 2012 13:03:09 +0000 (15:03 +0200)]
re PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler error) on x86 AVX targets)

PR tree-optimization/54610
* tree-ssa-forwprop.c: Include optabs.h.  Don't include
tree-vectorizer.h.
(simplify_vector_constructor): Don't use vect_gen_perm_mask,
instead create the mask constant here.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(OPTABS_H).
Don't depend on $(TREE_VECTORIZER_H).

* gcc.target/i386/pr54610.c: New test.

From-SVN: r191421

11 years agoMakefile.in (BASIC_BLOCK_H): Add cfg-flags.def.
Florian Weimer [Tue, 18 Sep 2012 12:55:06 +0000 (14:55 +0200)]
Makefile.in (BASIC_BLOCK_H): Add cfg-flags.def.

2012-09-18  Florian Weimer  <fweimer@redhat.com>

* Makefile.in (BASIC_BLOCK_H): Add cfg-flags.def.

From-SVN: r191420

11 years agostatistics.h (CXX_MEM_STAT_INFO): New define.
Richard Guenther [Tue, 18 Sep 2012 09:17:27 +0000 (09:17 +0000)]
statistics.h (CXX_MEM_STAT_INFO): New define.

2012-09-18  Richard Guenther  <rguenther@suse.de>

* statistics.h (CXX_MEM_STAT_INFO): New define.
* gimple.h (gimple_build_assign_with_ops_stat,
gimple_build_assign_with_ops, gimple_build_assign_with_ops3):
Turn into an overload of the function gimple_build_assign_with_ops.
* gimple.c (gimple_build_assign_with_ops_stat): Rename to ...
(gimple_build_assign_with_ops): ... this.
* tree-ssa-loop-im.c (move_computations_stmt): Adjust.
* tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
* tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
(vect_permute_load_chain): Likewise.
* tree-vect-generic.c (expand_vector_divmod): Likewise.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
(vect_recog_divmod_pattern): Likewise.
(vect_recog_mixed_size_cond_pattern): Likewise.
(adjust_bool_pattern): Likewise.
* tree-vect-slp.c (vect_create_mask_and_perm): Likewise.
* tree-vect-stmts.c (vectorizable_operation): Likewise.
(permute_vec_elements): Likewise.
(vectorizable_load): Likewise.

From-SVN: r191415

11 years agoFix libbacktrace bootstrap with gcc 4.4
Rainer Orth [Tue, 18 Sep 2012 09:02:50 +0000 (09:02 +0000)]
Fix libbacktrace bootstrap with gcc 4.4

* fileline.c: Include <stdlib.h>.
* mmap.c: Likewise.

From-SVN: r191414

11 years agoPR other/54411: integer overflow in objalloc_alloc
Florian Weimer [Tue, 18 Sep 2012 08:34:05 +0000 (10:34 +0200)]
PR other/54411: integer overflow in objalloc_alloc

2012-09-18  Florian Weimer  <fweimer@redhat.com>

PR other/54411
* objalloc.h (objalloc_alloc): Do not use fast path on wraparound.

2012-09-18  Florian Weimer  <fweimer@redhat.com>

PR other/54411
* objalloc.c (_objalloc_alloc): Add overflow check covering
alignment and CHUNK_HEADER_SIZE addition.

From-SVN: r191413

11 years agore PR c++/54575 (ICE with std::vector::insert and -std=c++11)
Jason Merrill [Tue, 18 Sep 2012 03:47:35 +0000 (23:47 -0400)]
re PR c++/54575 (ICE with std::vector::insert and -std=c++11)

PR c++/54575
* pt.c (instantiate_alias_template): New.
(tsubst): Use it.
(push_access_scope): Allow TYPE_DECL.

From-SVN: r191412

11 years agoDaily bump.
GCC Administrator [Tue, 18 Sep 2012 00:19:38 +0000 (00:19 +0000)]
Daily bump.

From-SVN: r191411

11 years agore PR bootstrap/54611 (Bootstrap failure: conflicting types for 'backtrace_simple')
Ian Lance Taylor [Mon, 17 Sep 2012 21:14:51 +0000 (21:14 +0000)]
re PR bootstrap/54611 (Bootstrap failure:  conflicting types for 'backtrace_simple')

PR bootstrap/54611
* nounwind.c (backtrace_full): Rename from backtrace.  Add state
parameter.

From-SVN: r191408

11 years agore PR bootstrap/54611 (Bootstrap failure: conflicting types for 'backtrace_simple')
Gerald Pfeifer [Mon, 17 Sep 2012 20:57:16 +0000 (20:57 +0000)]
re PR bootstrap/54611 (Bootstrap failure:  conflicting types for 'backtrace_simple')

PR bootstrap/54611
* nounwind.c (backtrace_simple): Add state parameter.

From-SVN: r191405

11 years agoinvoke.text (-feliminate-unused-debug-types): Update to reflect that this is enabled...
Paul Koning [Mon, 17 Sep 2012 19:12:32 +0000 (15:12 -0400)]
invoke.text (-feliminate-unused-debug-types): Update to reflect that this is enabled by default.

2012-09-17  Paul Koning  <ni1d@arrl.net>

    * doc/invoke.text (-feliminate-unused-debug-types): Update to
    reflect that this is enabled by default.

From-SVN: r191404

11 years agore PR fortran/54608 (Wrong-code with SCAN and VERIFY)
Tobias Burnus [Mon, 17 Sep 2012 17:53:37 +0000 (19:53 +0200)]
re PR fortran/54608 (Wrong-code with SCAN and VERIFY)

2012-09-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54608
        * simplify.c (gfc_simplify_scan, gfc_simplify_verify):
        Fix handling of BACK=variable.

2012-09-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54608
        * gfortran.dg/scan_2.f90: New.

From-SVN: r191403

11 years agore PR bootstrap/54609 (libbacktrace breaks bootstrap on darwin)
Ian Lance Taylor [Mon, 17 Sep 2012 17:43:26 +0000 (17:43 +0000)]
re PR bootstrap/54609 (libbacktrace breaks bootstrap on darwin)

PR bootstrap/54609
* unknown.c (unknown_fileline): Add state parameter, remove
fileline_data parameter, name error_callback parameter.
(backtrace_initialize): Add state parameter.

From-SVN: r191402

11 years agolinux-elf.h (LINUX_TARGET_LINK_SPEC): Suppress the dynamic linker commands for...
Ben Cheng [Mon, 17 Sep 2012 17:33:05 +0000 (17:33 +0000)]
linux-elf.h (LINUX_TARGET_LINK_SPEC): Suppress the dynamic linker commands for...

2012-09-17  Ben Cheng  <bccheng@google.com

* config/arm/linux-elf.h (LINUX_TARGET_LINK_SPEC): Suppress the
dynamic linker commands for statically linked programs.

From-SVN: r191401

11 years agoarm.c (arm_rtx_costs_1): Handle vec_extract and vec_set patterns.
Ulrich Weigand [Mon, 17 Sep 2012 17:08:14 +0000 (17:08 +0000)]
arm.c (arm_rtx_costs_1): Handle vec_extract and vec_set patterns.

2012-09-17  Ulrich Weigand  <ulrich.weigand@linaro.org>

* config/arm/arm.c (arm_rtx_costs_1): Handle vec_extract and vec_set
patterns.
* config/arm/arm.md ("vec_set<mode>_internal"): Support memory source
operands, implemented via vld1 instruction.
("vec_extract<mode>"): Support memory destination operands, implemented
via vst1 instruction.
("neon_vst1_lane<mode>"): Use UNSPEC_VST1_LANE instead of vec_select.
* config/arm/predicates.md ("neon_lane_number"): Remove.

From-SVN: r191400

11 years agoarm.c (output_move_neon): Update comment.
Ramana Radhakrishnan [Mon, 17 Sep 2012 17:07:29 +0000 (17:07 +0000)]
arm.c (output_move_neon): Update comment.

2012-09-17  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
    Ulrich Weigand  <ulrich.weigand@linaro.org>

* config/arm/arm.c (output_move_neon): Update comment.
Use vld1.64/vst1.64 instead of vldm/vstm where possible.
(neon_vector_mem_operand): Support double-word modes.
* config/arm/neon.md (*neon_mov VD): Call output_move_neon
instead of output_move_vfp.  Change constraint from Uv to Un.

Co-Authored-By: Ulrich Weigand <ulrich.weigand@linaro.org>
From-SVN: r191399

11 years agolibbacktrace/:
Ian Lance Taylor [Mon, 17 Sep 2012 16:38:38 +0000 (16:38 +0000)]
libbacktrace/:

* Initial implementation.

./:
* MAINTAINERS (Various Maintainers): Add libbacktrace.
* configure.ac (host_libs): Add libbacktrace.
(target_libraries): Add libbacktrace.
* Makefile.def (host_modules): Add libbacktrace.
(target_modules): Likewise.
* configure, Makefile.in: Rebuild.

gcc/go:
* config-lang.in (target_libs): Add target-libbacktrace.

From-SVN: r191397

11 years ago* ChangeLog: Fix author of r191394.
Richard Guenther [Mon, 17 Sep 2012 16:11:52 +0000 (16:11 +0000)]
* ChangeLog: Fix author of r191394.

From-SVN: r191396

11 years agore PR c++/53661 (Wrong narrowing conversion warning with -std=c++11)
Jason Merrill [Mon, 17 Sep 2012 16:06:03 +0000 (12:06 -0400)]
re PR c++/53661 (Wrong narrowing conversion warning with -std=c++11)

PR c++/53661
* typeck2.c (check_narrowing): Avoid false positives on conversion
from enumeral type.

From-SVN: r191395

11 years agore PR lto/54598 (ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixe...
Richard Guenther [Mon, 17 Sep 2012 16:03:44 +0000 (16:03 +0000)]
re PR lto/54598 (ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixed_cst_value_fields())

PR lto/54598
* tree-streamer-in.c (unpack_ts_real_cst_value_fields): Use ggc'ed
FIXED_VALUE_TYPE instead of struct fixed_value.

From-SVN: r191394

11 years agoavr.c (CONST_FIXED_P): Remove define.
Georg-Johann Lay [Mon, 17 Sep 2012 15:34:47 +0000 (15:34 +0000)]
avr.c (CONST_FIXED_P): Remove define.

* config/avr/avr.c (CONST_FIXED_P): Remove define.
* config/avr/avr.md (add<mode>3): Use CONST_FIXED_P.

From-SVN: r191393

11 years agore PR target/54607 ([avr]: Canadian cross build fails because gen-avr-mmcu-texi.c...
Georg-Johann Lay [Mon, 17 Sep 2012 15:22:37 +0000 (15:22 +0000)]
re PR target/54607 ([avr]: Canadian cross build fails because gen-avr-mmcu-texi.c is compiled with the wrong compiler)

PR target/54607
* config.gcc (tm_file,avr): Add avr/avr-arch.h.
* config/avr/t-avr (gen-avr-mmcu-texi): Use CC_FOR_BUILD to
compile.  Don't depend on TM_H.  Use CFLAGS_FOR_BUILD.
* config/avr/avr.h (avr_arch, base_arch_s, mcu_type_s): Source out
to...
* config/avr/avr-arch.h: ...this new file.
* config/avr/gen-avr-mmcu-texi.c: Include avr-arch.h, stdio.h,
stdlib.h.
* comparator: Make letters smaller than digits.
* config/avr/avr-devices.c: Don't include headers if used in
gen-avr-mmcu-texi.c.
* doc/avr-mmcu.texi: Regenerate.

From-SVN: r191390

11 years agortl.h (CONST_FIXED_P): New predicate macro.
Georg-Johann Lay [Mon, 17 Sep 2012 15:08:13 +0000 (15:08 +0000)]
rtl.h (CONST_FIXED_P): New predicate macro.

* rtl.h (CONST_FIXED_P): New predicate macro.

From-SVN: r191388

11 years ago* tree-cfgcleanup. (cleanup_control_expr_graph) <GIMPLE_COND>: Remove
Eric Botcazou [Mon, 17 Sep 2012 14:50:13 +0000 (14:50 +0000)]
* tree-cfgcleanup. (cleanup_control_expr_graph) <GIMPLE_COND>: Remove
code doing propagation from degenerate PHI nodes.
* tree-ssa-loop-ivcanon.c (propagate_into_all_uses): New function.
(propagate_constants_for_unrolling): Likewise.
(tree_unroll_loops_completely): If the current loop has been unrolled
and its father isn't the entire function, propagate constants within
the new basic blocks by means of propagate_constants_for_unrolling.

From-SVN: r191387

11 years agoconfigure.ac: Substitute CPU_OPT_EXT_RANDOM.
Ulrich Drepper [Mon, 17 Sep 2012 13:02:39 +0000 (13:02 +0000)]
configure.ac: Substitute CPU_OPT_EXT_RANDOM.

* configure.ac: Substitute CPU_OPT_EXT_RANDOM.
* configure.host: Define cpu_opt_ext_random to location of the
optimized version of <ext/random>.
* include/Makefile.am (ext_headers): Add ${ext_host_headers}.
(ext_host_headers): Define.
* include/ext/random (simd_fast_mersenne_twister_engine<>
::operator==): Don't define function here.
* include/ext/random.tcc (simd_fast_mersenne_twister_engine): Don't
define code using SSE2 here.  Define generic code only if
_GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ is not defined.
(simd_fast_mersenne_twister_engine<>
::operator==): Define here if
_GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL is not defined.
* config/cpu/generic/opt/ext/opt_random.h: New file.
* config/cpu/i486/opt/ext/opt_random.h: New file.
* libsupc++/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* po/Makefile.in: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.
* doc/Makefile.in: Regenerated.
* aclocal.m4: Regenerated.
* python/Makefile.in: Regenerated.
* include/Makefile.in: Regenerated.
* src/c++98/Makefile.in: Regenerated.
* src/c++11/Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.

From-SVN: r191384

11 years agore PR fortran/54285 ([F03] Calling a PPC with proc-ptr result)
Janus Weil [Mon, 17 Sep 2012 12:50:34 +0000 (14:50 +0200)]
re PR fortran/54285 ([F03] Calling a PPC with proc-ptr result)

2012-09-17  Janus Weil  <janus@gcc.gnu.org>

PR fortran/54285
* expr.c (gfc_check_pointer_assign): Correctly handle procedure pointers
as function results.
* primary.c (gfc_match_varspec): Allow to call a PPC with proc-ptr
result.

2012-09-17  Janus Weil  <janus@gcc.gnu.org>

PR fortran/54285
* gfortran.dg/proc_ptr_result_7.f90: New.

From-SVN: r191383

11 years agore PR fortran/54603 ([F03] Wrong code with structure constructor for proc-pointer...
Tobias Burnus [Mon, 17 Sep 2012 12:30:16 +0000 (14:30 +0200)]
re PR fortran/54603 ([F03] Wrong code with structure constructor for proc-pointer components)

2012-09-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54603
        * trans-expr.c (gfc_trans_subcomponent_assign): Handle
        proc-pointer components.

2012-09-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54603
        * gfortran.dg/structure_constructor_11.f90: New.

From-SVN: r191382

11 years agoerror.c (error_print): Move increment out of the assert.
Tobias Burnus [Mon, 17 Sep 2012 10:13:12 +0000 (12:13 +0200)]
error.c (error_print): Move increment out of the assert.

2012-09-17  Tobias Burnus  <burnus@net-b.de>

        * error.c (error_print): Move increment out of the assert.
        * interface.c (gfc_compare_derived_types): Add assert.
        (get_expr_storage_size): Remove always-true logical condition.
        * resolve.c (resolve_allocate_expr): Fix looping logic.
        * target-memory.c (gfc_target_expr_size): Add assert.

From-SVN: r191381

11 years agore PR middle-end/54563 (ICE in redirect_eh_edge_1, at tree-eh.c:2215)
Jakub Jelinek [Mon, 17 Sep 2012 09:18:35 +0000 (11:18 +0200)]
re PR middle-end/54563 (ICE in redirect_eh_edge_1, at tree-eh.c:2215)

PR tree-optimization/54563
* tree-ssa-math-opts.c (execute_cse_sincos): Call
gimple_purge_dead_eh_edges if last call has been changed.

* g++.dg/torture/pr54563.C: New test.

From-SVN: r191378

11 years agore PR target/54564 (Broken __builtin_ia32_vfmadds[sd]3)
Jakub Jelinek [Mon, 17 Sep 2012 09:16:39 +0000 (11:16 +0200)]
re PR target/54564 (Broken __builtin_ia32_vfmadds[sd]3)

PR target/54564
ChangeLog entry fixup

From-SVN: r191377