1. 09 Jul, 2011 4 commits
    • re PR libstdc++/49668 ([C++0x] std::thread does not forward its args as rvalues) · 4880236e
      2011-07-09  Jonathan Wakely  <jwakely.gcc@gmail.com>
      
      	PR libstdc++/49668
      	* include/std/functional (__bind_simple): Define.
      	* include/std/future (_Task_setter): Parameterize by type of result
      	pointer instead of state object.
      	(_S_task_setter): Type deduction helper.
      	(_Task_state): Use _S_task_setter and __bind_simple.
      	(_Deferred_state, _Async_state): Store call wrapper directly not as
      	std::function. Use _S_task_setter and __bind_simple.
      	(_S_make_deferred_state, _S_make_async_state): Type deduction helpers.
      	(async): Use new functions and __bind_simple.
      	* include/std/mutex (call_once): Use __bind_simple.
      	* include/std/thread (thread): Likewise. Remove unused headers.
      	* src/thread.cc: Add header.
      	* testsuite/30_threads/async/49668.cc: New.
      	* testsuite/30_threads/call_once/49668.cc: New.
      	* testsuite/30_threads/thread/cons/49668.cc: New.
      	* testsuite/30_threads/thread/cons/moveable.cc: Remove unused bool.
      
      From-SVN: r176073
      Jonathan Wakely committed
    • re PR c++/45437 (Loses reference during update) · 4063e61b
      	PR c++/45437
      gcc/
      	* gimplify.c (goa_stabilize_expr): Handle RHS preevaluation in
      	compound assignment.
      gcc/c-family/
      	* c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
      gcc/cp/
      	* typeck.c (cp_build_modify_expr): Preevaluate RHS.
      
      From-SVN: r176072
      Jason Merrill committed
    • cgraph.c (cgraph_add_to_same_comdat_group): New. · 2fda8e14
      gcc/
      	* cgraph.c (cgraph_add_to_same_comdat_group): New.
      	* cgraph.h: Declare it.
      	* ipa.c (function_and_variable_visibility): Make sure thunks
      	have the right visibility.
      gcc/cp/
      	* method.c (use_thunk): Use cgraph_add_to_same_comdat_group.
      	* optimize.c (maybe_clone_body): Likewise.
      	* semantics.c (maybe_add_lambda_conv_op): Likewise.
      
      From-SVN: r176071
      Jason Merrill committed
    • Daily bump. · e8f8774a
      From-SVN: r176070
      GCC Administrator committed
  2. 08 Jul, 2011 34 commits
  3. 07 Jul, 2011 2 commits
    • dwarf2out: Convert fde_table to a VEC. · a518b996
      Prepare for allocating the FDE for the current function earlier
      than dwarf2out_begin_prologue.
      
              * dwarf2out.c (fde_table, fde_table_allocated, fde_table_in_use,
              FDE_TABLE_INCREMENT): Replace with...
              (fde_vec): ... this, a new vector.
              (current_fde): Remove.  Replace all users with cfun->fde.
              (output_call_frame_info): Use FOR_EACH_VEC_ELT over fde_vec.
              (size_of_aranges, dwarf2out_finish): Likewise.
              (dwarf2out_alloc_current_fde): Break out from ...
              (dwarf2out_begin_prologue): ... here.
              (dwarf2out_frame_init): Remove.
              * dwarf2cfi.c: Update all users of current_fde.
              (dwarf2out_frame_init): Rename from dwarf2cfi_frame_init.
              * dwarf2out.h: Update decls.
              (dw_fde_node): Add fde_index member.
              * function.h (struct function): Add fde member.
      
      From-SVN: r176018
      Richard Henderson committed
    • dwarf2out: Emit NOTE_INSN_CFI_* both with and without cfi-asm. · 89e25f95
      This patch is essentially Bernd's 006-cfilabel patch, updated
      for all the other changes to dwarf2out.
      
      The patch reduces the difference between the cfi-asm and non-cfi-asm
      code paths.  We now emit the CFI notes in all cases.  Later, after we're
      done producing the CFI insns we need, another pass over the rtl adds
      the necessary labels and set_loc/advance_loc CFIs.  One consequence of
      this is that def_cfa_1 can no longer use lookup_cfa, so it just compares
      to an old_cfa variable instead.
      
      The major change since Bernd's patch is that all the target-specific
      changes are no longer necessary.
      
              * dwarf2cfi.c (add_cfi): Remove.
              (dwarf2out_cfi_label): Remove force argument.  Only generate the
              label name.
              (add_fde_cfi): Simplify the different code paths.
              (add_cie_cfi): New.
              (old_cfa, old_cfa_remember): New.
              (def_cfa_1, reg_save): Remove label, add for_cie parameter.
              (last_reg_save_label): Remove.
              (dwarf2out_args_size, dwarf2out_stack_adjust, queue_reg_save,
              dwarf2out_frame_debug_def_cfa, dwarf2out_frame_debug_adjust_cfa,
              dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_cfa_register,
              dwarf2out_frame_debug_cfa_expression,
              dwarf2out_frame_debug_cfa_restore,
              dwarf2out_frame_debug_cfa_window_save,
              dwarf2out_frame_debug_expr): Remove label parameter.
              (cfi_label_required_p, add_cfis_to_fde): New.
              (dwarf2out_frame_debug_after_prologue): New.
              (dwarf2cfi_frame_init): Initialize old_cfa.
              (dwarf2out_frame_debug_restore_state): Likewise.
              * dwarf2out.c (dwarf2out_emit_cfi): Only do output for cfi_asm.
              (dwarf2out_switch_text_section): Don't clear dw_fde_current_label here.
              * final.c (final_start_function): Call
              dwarf2out_frame_debug_after_prologue.
      
      Co-Authored-By: Richard Henderson <rth@redhat.com>
      
      From-SVN: r176017
      Bernd Schmidt committed