Commit Graph

118239 Commits

Author SHA1 Message Date
H.J. Lu ac295cf1ae Require non-ilp32 for gcc.dg/tree-ssa/slsr-30.c
* gcc.dg/tree-ssa/slsr-30.c: Require non-ilp32.  Remove
	dg-skip-if.

From-SVN: r190242
2012-08-08 15:47:07 -07:00
Joseph Myers e7160b278e simplify-rtx.c (simplify_binary_operation_1): Do not simplify IOR to a constant if one operand has side effects.
* simplify-rtx.c (simplify_binary_operation_1): Do not simplify
	IOR to a constant if one operand has side effects.

testsuite:
	* gcc.c-torture/execute/20120808-1.c: New test.

From-SVN: r190237
2012-08-08 20:42:58 +01:00
Ulrich Weigand 215770ada8 builtins.c (expand_builtin_atomic_compare_exchange): Pass old value operand as MEM to expand_atomic_compare_and_swap.
* builtins.c (expand_builtin_atomic_compare_exchange): Pass old
	value operand as MEM to expand_atomic_compare_and_swap.

	* config/s390/s390.md ("atomic_compare_and_swap<mode>"): Accept
	nonimmediate_operand for old value; generate load and store if
	needed.
	* config/s390/s390.c (s390_expand_cs_hqi): Accept any operand
	as vtarget.

From-SVN: r190236
2012-08-08 18:03:37 +00:00
Steven Bosscher 07c5a154bb re PR middle-end/54146 (Very slow compile with attribute((flatten)))
PR middle-end/54146
	* gimpify.c (gimplify_body): Only verify_gimple_in_seq with
	checking enabled.
	* tree-ssa-loop-manip.c (add_exit_phis_var): Assert that var is
	a gimple_reg if checking is enabled.
	(find_uses_to_rename_stmt): Only look at non-virtual USE operands.
	* tree-into-ssa (compute_global_livein): Change the worklist
	type from an array to a VEC.

From-SVN: r190235
2012-08-08 17:39:46 +00:00
Richard Guenther a471762f68 tree-ssa-operands.h (virtual_operand_p): Declare.
2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.h (virtual_operand_p): Declare.
	* tree-ssa-operands.c (virtual_operand_p): New predicate.
	* gimple.c (is_gimple_reg): Use virtual_operand_p.
	* tree-into-ssa.c (prepare_block_for_update): Likewise.
	* tree-vect-loop-manip.c (adjust_debug_stmts): Likewise.

From-SVN: r190231
2012-08-08 14:51:26 +00:00
Uros Bizjak aa5d8db019 ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test, just return FFI_BAD_ABI when things are wrong.
* src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
	just return FFI_BAD_ABI when things are wrong.

From-SVN: r190230
2012-08-08 16:48:43 +02:00
Richard Guenther 6b4a85ad6f tree-call-cdce.c (check_pow): Simplify.
2012-08-08  Richard Guenther  <rguenther@suse.de>

	* tree-call-cdce.c (check_pow): Simplify.
	(gen_conditions_for_pow_int_base): Likewise.
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Do not handle
	virtual operands here.
	* tree-ssa-operands.c (get_name_decl): Remove unused function.
	* gimplify.c (gimple_regimplify_operands): Remove dead code.
	* tree-vrp.c (get_value_range): Move SSA_NAME_VAR access.
	* tree-parloops.c (create_phi_for_local_result): Use copy_ssa_name.
	* value-prof.c (gimple_ic): Use duplicate_ssa_name.
	(gimple_stringop_fixed_value): Likewise.
	* tree.c (needs_to_live_in_memory): Remove SSA name handling.
	* tree-stdarg.c (find_va_list_reference): Store SSA_NAME_VERSIONs
	in the bitmap alongside shifted DECL_UIDs.
	(va_list_counter_struct_op): Likewise.
	(va_list_ptr_read): Likewise.
	(va_list_ptr_write): Likewise.
	(check_va_list_escapes): Likewise.
	(check_all_va_list_escapes): Likewise.
	(execute_optimize_stdarg): Likewise.
	* tree-outof-ssa.c (insert_backedge_copies): Use copy_ssa_name.

From-SVN: r190229
2012-08-08 14:40:30 +00:00
H.J. Lu 3b1e1a029a Don't return identity for CONST or symbolic reference
gcc/

	PR rtl-optimization/54157
	* combine.c (gen_lowpart_for_combine): Don't return identity
	for CONST or symbolic reference.

gcc/testsuite/

	PR rtl-optimization/54157
	* gcc.target/i386/pr54157.c: New file.

From-SVN: r190228
2012-08-08 06:39:33 -07:00
Michael Zolotukhin d05e383bc7 i386-common.c (OPTION_MASK_ISA_ADX_SET): New.
ChangeLog:
2012-08-08 Michael Zolotukhin <michael.v.zolotukhin@intel.com>

        * common/config/i386/i386-common.c (OPTION_MASK_ISA_ADX_SET): New.
        (OPTION_MASK_ISA_ADX_UNSET): Likewise.
        (ix86_handle_option): Handle madx option.
        * config.gcc (i[34567]86-*-*): Add adxintrin.h.
        (x86_64-*-*): Likewise.
        * config/i386/adxintrin.h: New header.
        * config/i386/driver-i386.c (host_detect_local_cpu): Detect ADCX/ADOX
        support.
        * config/i386/i386-builtin-types.def
        (UCHAR_FTYPE_UCHAR_UINT_UINT_PUNSIGNED): New function type.
        (UCHAR_FTYPE_UCHAR_ULONGLONG_ULONGLONG_PULONGLONG): Likewise.
        * config/i386/i386-c.c: Define __ADX__ if needed.
        * config/i386/i386.c (ix86_target_string): Define -madx option.
        (PTA_ADX): New.
        (ix86_option_override_internal): Handle new option.
        (ix86_valid_target_attribute_inner_p): Add OPT_madx.
        (ix86_builtins): Add IX86_BUILTIN_ADDCARRYX32,
        IX86_BUILTIN_ADDCARRYX64.
        (ix86_init_mmx_sse_builtins): Define corresponding built-ins.
        (ix86_expand_builtin): Handle these built-ins.
        (ix86_expand_args_builtin): Handle new function types.
        * config/i386/i386.h (TARGET_ADX): New.
        * config/i386/i386.md (adcx<mode>3): New define_insn.
        * config/i386/i386.opt (madx): New.
        * config/i386/x86intrin.h: Include adxintrin.h.

testsuite/ChangeLog:
        * gcc.target/i386/adx-addcarryx32-1.c: New.
        * gcc.target/i386/adx-addcarryx32-2.c: New.
        * gcc.target/i386/adx-addcarryx64-1.c: New.
        * gcc.target/i386/adx-addcarryx64-2.c: New.
        * gcc.target/i386/adx-check.h: New.
        * gcc.target/i386/i386.exp (check_effective_target_adx): New.
        * gcc.target/i386/sse-12.c: Add -madx.
        * gcc.target/i386/sse-13.c: Ditto.
        * gcc.target/i386/sse-14.c: Ditto.
        * gcc.target/i386/sse-22.c: Ditto.
        * gcc.target/i386/sse-23.c: Ditto.
        * g++.dg/other/i386-2.C: Ditto.
        * g++.dg/other/i386-3.C: Ditto.

From-SVN: r190227
2012-08-08 13:25:58 +00:00
Nick Clifton 916f8bbf52 oops - accidentally omitted from previous delta.
From-SVN: r190225
2012-08-08 09:03:05 +00:00
Nick Clifton c72d36f2aa * config/rl78/rl78.c: Include tree-pass.h.
From-SVN: r190224
2012-08-08 08:34:25 +00:00
Steven Bosscher cee784f5fb re PR middle-end/54146 (Very slow compile with attribute((flatten)))
PR middle-end/54146
	* ira.c (init_live_subregs): Take live_subregs_used as a bitmap.
	(build_insn_chain): Make live_subregs_used a bitmap.
	Use SBITMAP_SIZE to ignore the paradoxical bytes of subregs.
	Use sbitmap_free to free the live_subreg sbitmaps.

From-SVN: r190223
2012-08-08 06:29:12 +00:00
Steven Bosscher 985e963f0c re PR middle-end/54146 (Very slow compile with attribute((flatten)))
PR middle-end/54146
	* ifcvt.c: Include pointer-set.h.
	(cond_move_process_if_block): Change type of then_regs and
	else_regs from alloca'd array to pointer_sets.
	(check_cond_move_block): Update for this change.
	(cond_move_convert_if_block): Likewise.
	* Makefile.in: Fix dependencies for ifcvt.o.

From-SVN: r190222
2012-08-08 06:28:10 +00:00
Bill Schmidt 88ca9ea18f gimple-ssa-strength-reduction.c (struct incr_info_d): New struct.
gcc:

2012-08-07  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gimple-ssa-strength-reduction.c (struct incr_info_d): New struct.
	(incr_vec): New static var.
	(incr_vec_len): Likewise.
	(address_arithmetic_p): Likewise.
	(stmt_cost): Remove dead assignment.
	(dump_incr_vec): New function.
	(cand_abs_increment): Likewise.
	(lazy_create_slsr_reg): Likewise.
	(incr_vec_index): Likewise.
	(count_candidates): Likewise.
	(record_increment): Likewise.
	(record_increments): Likewise.
	(unreplaced_cand_in_tree): Likewise.
	(optimize_cands_for_speed_p): Likewise.
	(lowest_cost_path): Likewise.
	(total_savings): Likewise.
	(analyze_increments): Likewise.
	(ncd_for_two_cands): Likewise.
	(nearest_common_dominator_for_cands): Likewise.
	(profitable_increment_p): Likewise.
	(insert_initializers): Likewise.
	(introduce_cast_before_cand): Likewise.
	(replace_rhs_if_not_dup): Likewise.
	(replace_one_candidate): Likewise.
	(replace_profitable_candidates): Likewise.
	(analyze_candidates_and_replace): Handle candidates with SSA-name
	strides.

gcc/testsuite:

2012-08-07  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.dg/tree-ssa/slsr-5.c: New.
	* gcc.dg/tree-ssa/slsr-6.c: New.
	* gcc.dg/tree-ssa/slsr-7.c: New.
	* gcc.dg/tree-ssa/slsr-8.c: New.
	* gcc.dg/tree-ssa/slsr-9.c: New.
	* gcc.dg/tree-ssa/slsr-10.c: New.
	* gcc.dg/tree-ssa/slsr-11.c: New.
	* gcc.dg/tree-ssa/slsr-12.c: New.
	* gcc.dg/tree-ssa/slsr-13.c: New.
	* gcc.dg/tree-ssa/slsr-14.c: New.
	* gcc.dg/tree-ssa/slsr-15.c: New.
	* gcc.dg/tree-ssa/slsr-16.c: New.
	* gcc.dg/tree-ssa/slsr-17.c: New.
	* gcc.dg/tree-ssa/slsr-18.c: New.
	* gcc.dg/tree-ssa/slsr-19.c: New.
	* gcc.dg/tree-ssa/slsr-20.c: New.
	* gcc.dg/tree-ssa/slsr-21.c: New.
	* gcc.dg/tree-ssa/slsr-22.c: New.
	* gcc.dg/tree-ssa/slsr-23.c: New.
	* gcc.dg/tree-ssa/slsr-24.c: New.
	* gcc.dg/tree-ssa/slsr-25.c: New.
	* gcc.dg/tree-ssa/slsr-26.c: New.
	* gcc.dg/tree-ssa/slsr-30.c: New.
	* gcc.dg/tree-ssa/slsr-31.c: New.

From-SVN: r190220
2012-08-08 01:35:22 +00:00
GCC Administrator 02044923b7 Daily bump.
From-SVN: r190219
2012-08-08 00:17:43 +00:00
Benjamin Kosnik 743ca87fe8 re PR libstdc++/54005 (Use __atomic_always_lock_free in libstdc++ is_lock_free instead of __atomic_is_lock_free)
2012-08-07  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/54005
	* include/std/atomic: Use __atomic_always_lock_free.
	* include/bits/atomic_base.h: Same.

From-SVN: r190216
2012-08-07 23:03:55 +00:00
Steven Bosscher f8923f7ead cfg.c (debug_bb): Do not set TDF_BLOCKS.
gcc/
	* cfg.c (debug_bb): Do not set TDF_BLOCKS.
	* cfghooks.c (dump_bb): Honor ~TDF_BLOCKS.
	* pretty-print.c (pp_base_flush): Do not add a newline, and do not
	clear pp_needs_newline.
	* pretty-print.h (pp_newline_and_flush): New macro with the behavior
	of pp_base_flush before the above change.
	* langhooks.c (lhd_print_error_function): Use pp_newline_and_flush
	instead of pp_flush.
	* diagnostic.c (diagnostic_finish): Likewise.
	(diagnostic_report_diagnostic): Likewise.
	(verbatim): Likewise.
	(error_recursion): Likewise.
	* tree-pretty-print.c (print_generic_stmt): Likewise.
	(print_generic_stmt_indented): LIkewise.
	* gimple-pretty-print.c (print_gimple_stmt): Likewise.
	(print_gimple_seq): Likewise.
	(gimple_dump_bb_buff): Likewise.

c-family/
	* c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
	instead of separate pp_newline and pp_flush.
	(print_c_tree): Likewise.

cp/
	* error.c (print_instantiation_context): Pretty-print a newline before
	diagnostic_flush_buffer.
	* cxx-pretty-print.c (pp_cxx_function_definition): Use
	pp_newline_and_flush instead of separate pp_newline and pp_flush.

testsuite/
	* gcc.dg/tree-prof/update-loopch.c: Ask for dump with blocks info.
	* gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
	* gcc.dg/tree-ssa/pr18133-1.c: Likewise.

From-SVN: r190215
2012-08-07 22:14:29 +00:00
Uros Bizjak 4ccaeceec0 * ChangeLog: Add PR number.
From-SVN: r190213
2012-08-07 23:01:52 +02:00
Uros Bizjak 1791f36f52 var-tracking.c (var_lowpart): Exit early for matched modes.
* var-tracking.c (var_lowpart): Exit early for matched modes.

From-SVN: r190212
2012-08-07 22:57:56 +02:00
Richard Henderson 78ce265b71 s390: Convert from sync to atomic optabs
* config/s390/s390.c (s390_emit_compare_and_swap): Update for
        atomic_compare_and_swapsi_internal name change.
        (s390_expand_insv): Try RISBG last, not requiring operands in
        registers but forcing them there.  Try a limited form of ICM.
        (s390_two_part_insv): New.
        (s390_expand_cs_hqi): Use it.  Update for atomic optabs.
        * config/s390/s390.md (UNSPEC_MOVA): New.
        (TDSI): Remove mode iterator.
        (DGPR, DINT, TDI): New mode iterators.
        (td): New mode attribute.
        (mem_signal_fence): New.
        (mem_thread_fence): Rename from memory_barrier; update for model arg.
        (mem_thread_fence_1): Rename from *memory_barrier.
        (atomic_load<DINT>, atomic_store<DINT>): New expanders.
        (atomic_loaddi_1, atomic_loadti_1): New.
        (atomic_storedi_1, atomic_storeti_1): New.
        (sync_compare_and_swap<TDSI>, sync_compare_and_swap<HQI>): Remove.
        (atomic_compare_and_swap<DGPR>, atomic_compare_and_swap<HQI>): New.
        (atomic_compare_and_swap<DGPR>_internal): New.
        (*sync_compare_and_swap<DW>, *sync_compare_and_swap<GPR>): Remove.
        (*atomic_compare_and_swap<TDI>_1): New.
        (*atomic_compare_and_swapdi_2, *atomic_compare_and_swapsi_3): New.
        (sync_<ATOMIC_Z196><GPR>, sync_old_<ATOMIC_Z196><GPR>): Remove.
        (atomic_fetch_<ATOMIC_Z196><GPR>): New.
        (atomic_fetch_<ATOMC_Z196><GPR>_iaf): New.
        (sync_<ATOMIC><HQI>, sync_old_<ATOMIC><HQI>): Remove.
        (sync_new_<ATOMIC><HQI>): Remove.
        (atomic_<ATOMIC><HQI>, atomic_fetch_<ATOMIC><HQI>): New.
        (atomic_<ATOMIC>_fetch<HQI>): New.
        (sync_lock_test_and_set<HQI>): Remove.
        (atomic_exchange<HQI>): New.

From-SVN: r190209
2012-08-07 10:32:19 -07:00
Paul Brook 3e6011cfeb except.c (switch_to_exception_section): Place tables for DECL_ONE_ONLY functions in comdat groups.
2012-08-07  Paul Brook  <paul@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* except.c (switch_to_exception_section): Place tables for
	DECL_ONE_ONLY functions in comdat groups.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r190206
2012-08-07 12:08:49 -04:00
Richard Guenther 070ecdfd03 tree-flow.h (copy_ssa_name_fn): New function.
2012-08-07  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (copy_ssa_name_fn): New function.
	(duplicate_ssa_name_fn): Likewise.
	* tree-flow-inline.h (copy_ssa_name): New function.
	(duplicate_ssa_name): Likewise.
	* tree-ssanames.c (copy_ssa_name_fn): New function.
	(duplicate_ssa_name): Rename to ...
	(duplicate_ssa_name_fn): ... this and adjust.
	* tree-tailcall.c (update_accumulator_with_ops): Use copy_ssa_name.
	* tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Likewise.
	(slpeel_update_phi_nodes_for_guard2): Likewise.
	(slpeel_tree_peel_loop_to_edge): Likewise.
	(vect_loop_versioning): Likewise.
	* tree-parloops.c (transform_to_exit_first_loop): Likewise.
	(create_parallel_loop): Likewise.
	* ipa-split.c (split_function): Likewise.
	* tree-vect-loop.c (vect_is_simple_reduction_1): Likewise.
	(vect_create_epilog_for_reduction): Likewise.
	* tree-vect-data-refs.c (bump_vector_ptr): Likewise.
	(vect_setup_realignment): Likewise.
	* tree-vect-stmts.c (vectorizable_load): Likewise.
	* tree-switch-conversion.c (build_one_array): Likewise.
	(gen_def_assigns): Likewise.
	* tree-cfg.c (gimple_make_forwarder_block): Likewise.
	* graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
	create_zero_dim_array with the SSA name.
	(rewrite_phi_out_of_ssa): Likewise.
	(rewrite_cross_bb_scalar_dependence): Likewise.  Use copy_ssa_name.

From-SVN: r190202
2012-08-07 14:17:44 +00:00
Richard Guenther 01c59d23df tree-dfa.c (set_ssa_default_def): Clear the SSA_NAME_DEFAULT_DEF bit of the old name when we clear the slot.
2012-08-07  Richard Guenther  <rguenther@suse.de>

	* tree-dfa.c (set_ssa_default_def): Clear the SSA_NAME_DEFAULT_DEF
	bit of the old name when we clear the slot.
	* tree-ssa-live.c (remove_unused_locals): Release any default
	def associated with an unused var.
	* tree-ssa-copy.c (may_propagate_copy_into_asm): Always return true.

From-SVN: r190201
2012-08-07 14:16:11 +00:00
Richard Guenther 5f33a4fc3e tree-into-ssa.c (rewrite_stmt): Remove clobbers for variables we rewrite into SSA form.
2012-08-07  Richard Guenther  <rguenther@suse.de>

	* tree-into-ssa.c (rewrite_stmt): Remove clobbers for variables
	we rewrite into SSA form.
	(rewrite_enter_block): Adjust.
	* gimple-iterator.c (gsi_replace): Also allow replacement with
	a stmt without a lhs.
	* tree-ssa-live.c (remove_unused_locals): Remove code handling
	clobbers of SSA names.
	* tree-nested.c (convert_local_reference_stmt): Remove clobbers
	for variables we access through the local chain.
	* tree-cfg.c (verify_gimple_assign_single): Verify clobbers
	clobber full decls only.

From-SVN: r190200
2012-08-07 12:11:43 +00:00
Richard Guenther dcc748dd77 gimple.h (gimple_phi_set_result): Adjust SSA_NAME_DEF_STMT.
2012-08-07  Richard Guenther  <rguenther@suse.de>

	* gimple.h (gimple_phi_set_result): Adjust SSA_NAME_DEF_STMT.
	* tree-phinodes.c (make_phi_node): Allow a NULL var.
	* tree-into-ssa.c (insert_phi_nodes_for): Simplify.
	* tree-complex.c (update_phi_components): Likewise.
	* tree-ssa-loop-manip.c (create_iv): Likewise.
	(add_exit_phis_edge): Likewise.
	(split_loop_exit_edge): Likewise.
	(tree_transform_and_unroll_loop): Likewise.
	* value-prof.c (gimple_ic): Likewise.
	(gimple_stringop_fixed_value): Likewise.
	* tree-tailcall.c (tree_optimize_tail_calls_1): Likewise.
	* omp-low.c (expand_parallel_call): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	(expand_omp_atomic_pipeline): Likewise.
	* tree-parloops.c (create_phi_for_local_result): Likewise.
	(transform_to_exit_first_loop): Likewise.
	* tree-vect-data-refs.c (vect_setup_realignment): Likewise.
	* graphite-scop-detection.c (canonicalize_loop_closed_ssa): Likewise.
	* tree-predcom.c (initialize_root_vars): Likewise.
	(initialize_root_vars_lm): Likewise.
	* sese.c (sese_add_exit_phis_edge): Likewise.
	* gimple-streamer-in.c (input_phi): Likewise.
	* tree-inline.c (copy_phis_for_bb): Likewise.
	* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
	* tree-cfg.c (gimple_make_forwarder_block): Likewise.
	(gimple_duplicate_bb): Likewise.

From-SVN: r190199
2012-08-07 10:36:01 +00:00
Nick Clifton d13abe1e88 mn10300.c (mn10300_expand_prologue): Report stack usage if requested.
* config/mn10300/mn10300.c (mn10300_expand_prologue): Report
	stack usage if requested.

From-SVN: r190198
2012-08-07 10:27:37 +00:00
Ian Lance Taylor 233115eaf5 runtime: support NumCPU() on more platforms Added support for Solaris, Irix, *BSD (including Darwin).
runtime: support NumCPU() on more platforms
        Added support for Solaris, Irix, *BSD (including Darwin).
        Still missing support for RTEMS.
        Fixes issue 3698 in Go issue tracker.

From-SVN: r190197
2012-08-07 04:42:49 +00:00
GCC Administrator 2dbfe2c6d5 Daily bump.
From-SVN: r190194
2012-08-07 00:17:32 +00:00
Cary Coutant 292ffe8608 cgraphunit.c (assemble_thunk): Add source line info.
2012-08-06  Cary Coutant  <ccoutant@google.com>

gcc/
	* cgraphunit.c (assemble_thunk): Add source line info.
	* final.c (final): Check for non-null cfg pointer.

gcc/testsuite/
	* g++.dg/debug/dwarf2/non-virtual-thunk.C: New test case.

From-SVN: r190190
2012-08-06 15:49:05 -07:00
Sandra Loosemore d28cfc4ae6 24k.md (r24k_unknown_store): Delete special handling for cprestore.
2012-08-06  Sandra Loosemore  <sandra@codesourcery.com>
	    Maxim Kuvyrkov  <maxim@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	gcc/
	* config/mips/24k.md (r24k_unknown_store): Delete special handling
	for cprestore.
	(r24k_int_load, r24k_int_arith, r24k_int_mul3, r24k_int_mfhilo)
	(r24k_int_cop, r24k_int_multi)
	(r24kf2_1_fcvt_f2i, r24kf2_1_fxfer)
	(r24kf1_1_fcvt_f2i, r24kf1_1_fxfer): Use mips_store_data_bypass_p
	instead of store_data_bypass_p.
	* config/mips/74k.md (r74k_int_store): Delete special handling for
	cprestore.
	(r74k_int_load, r74k_int_logical, r74k_int_arith, r74k_int_cmove):
	Use mips_store_data_bypass_p instead of store_data_bypass_p.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Maxim Kuvyrkov <maxim@codesourcery.com>

From-SVN: r190189
2012-08-06 17:28:34 -04:00
Janus Weil edc802c796 re PR fortran/35831 ([F95] Shape mismatch check missing for dummy procedure argument)
2012-08-06  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* interface.c (check_result_characteristics): New function, which checks
	the characteristics of function results.
	(gfc_compare_interfaces,gfc_check_typebound_override): Call it.

2012-08-06  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/35831
	* gfortran.dg/dummy_procedure_5.f90: Modified.
	* gfortran.dg/dummy_procedure_8.f90: New.
	* gfortran.dg/interface_26.f90: Modified.
	* gfortran.dg/proc_ptr_11.f90: Modified.
	* gfortran.dg/proc_ptr_15.f90: Modified.
	* gfortran.dg/proc_ptr_result_5.f90: Modified.
	* gfortran.dg/typebound_override_1.f90: Modified.
	* gfortran.dg/typebound_proc_6.f03: Modified.

From-SVN: r190187
2012-08-06 22:36:16 +02:00
Paolo Carlini ef859c9d3c [multiple changes]
2012-08-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/decimal/mixed-mode-cmp_neg.cc: Add test variable; minor
	tweaks.
	* testsuite/decimal/unary-arith.cc: Likewise.
	* testsuite/decimal/ctor.cc: Likewise.
	* testsuite/decimal/conversion-to-integral.cc: Likewise.
	* testsuite/decimal/make-decimal.cc: Likewise.
	* testsuite/decimal/comparison.cc: Likewise.
	* testsuite/decimal/incdec-memfunc.cc: Likewise.
	* testsuite/decimal/conversion-to-generic-float.cc: Likewise.
	* testsuite/decimal/compound-assignment-memfunc.cc: Likewise.
	* testsuite/decimal/cast_neg.cc: Likewise.
	* testsuite/decimal/incdec.cc: Likewise.
	* testsuite/decimal/mixed-mode-arith_neg.cc: Likewise.
	* testsuite/decimal/binary-arith.cc: Likewise.
	* testsuite/decimal/conversion-from-float.cc: Likewise.
	* testsuite/decimal/conversion-from-integral.cc: Likewise.
	* testsuite/decimal/compound-assignment.cc: Likewise.

2012-08-06  Peter Bergner  <bergner@vnet.ibm.com>

	PR libstdc++/54036
	* include/decimal/decimal.h (_DEFINE_DECIMAL_UNARY_OP): Use _Op as
	a unary operator.
	* testsuite/decimal/pr54036-1.cc: New test.
	* testsuite/decimal/pr54036-2.cc: Likewise.
	* testsuite/decimal/pr54036-3.cc: Likewise.

From-SVN: r190186
2012-08-06 18:06:42 +00:00
Marc Glisse 777d77b37a re PR tree-optimization/51938 (missed optimization: 2 comparisons)
2012-08-06 Marc Glisse <marc.glisse@inria.fr>

gcc/
	PR tree-optimization/51938
	PR tree-optimization/52005
	* tree-ssa-ifcombine.c (ifcombine_ifandif): New parameters for
	inverted conditions.
	(ifcombine_iforif): Remove, merge code into ifcombine_ifandif.
	(tree_ssa_ifcombine_bb): Update calls to the above. Detect !a&&b
	and !a||b patterns.

gcc/testsuite/
	PR tree-optimization/51938
	PR tree-optimization/52005
	* gcc.dg/tree-ssa/ssa-ifcombine-8.c: New testcase.
	* gcc.dg/tree-ssa/ssa-ifcombine-9.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-10.c: Likewise.
	* gcc.dg/tree-ssa/ssa-ifcombine-11.c: Likewise.

From-SVN: r190184
2012-08-06 16:38:48 +00:00
Dodji Seketeli 61b6d4cdee Avoid crashing on erroneous static_assert usage
When working on something else, I noticed that failing to provide the
second argument to the static_assert operator would lead to an ICE.

Fixed thus, and tested against trunk on x86_64-unknown-linux-gnu.

gcc/cp/

	* semantics.c (finish_static_assert): Don't crash on erroneous
	message or condition.

gcc/testsuite/

	* g++.dg/cpp0x/static_assert8.C: New test.

From-SVN: r190182
2012-08-06 18:19:09 +02:00
Olivier Hainque a4a837968d tree-emutls.c (new_emutls_decl): When a var_section is requested by the target...
* tree-emutls.c (new_emutls_decl): When a var_section is requested by
        the target, attach the new decl to that, not to the template section.

From-SVN: r190179
2012-08-06 15:15:37 +00:00
Jason Merrill b9958d43c0 sfinae38.C: New.
2012-08-06  Jason Merrill  <jason@redhat.com>

	* g++.dg/cpp0x/sfinae38.C: New.

From-SVN: r190176
2012-08-06 10:25:22 +00:00
Marc Glisse ca73dc295e re PR c++/54165 (Cast to "void" should not implicitly call conversion functions)
/cp
2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54165
	* typeck.c (build_static_cast_1): Move the conversion to void case
	before the perform_direct_initialization_if_possible call.

/testsuite
2012-08-06  Marc Glisse  <marc.glisse@inria.fr>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54165
	* g++.dg/conversion/void2.C: New.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r190175
2012-08-06 09:49:39 +00:00
Jose Ruiz af42f4d20b Makefile.in: Add support for 32-bit VxWorks for SPARC in kernel mode.
2012-08-06  Jose Ruiz  <ruiz@adacore.com>                   
                                                            
	* gcc-interface/Makefile.in: Add support for 32-bit VxWorks for SPARC   
	in kernel mode.

From-SVN: r190173
2012-08-06 10:49:45 +02:00
Arnaud Charlet dc3af7e24f [multiple changes]
2012-08-06  Arnaud Charlet  <charlet@adacore.com>

	* prj-attr.adb (Register_New_Package): Add missing blank.

2012-08-06  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Is_Two_Dim_Packed_Array): New predicate,
	used when computing maximum size allowable to construct static
	aggregate.

2012-08-06  Vincent Pucci  <pucci@adacore.com>

	* freeze.adb (Freeze_Entity): Inherit_Aspects_At_Freeze_Point
	calls added for derived types and subtypes.
	* sem_aux.adb, sem_aux.ads (Get_Rep_Item, Get_Rep_Pragma,
	Has_Rep_Pragma): New routines.
	* sem_ch13.ads (Inherit_Aspects_At_Freeze_Point): New routine.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Error message
	for aspect Lock_Free fixed.
	(Inherits_Aspects_At_Freeze_Point): New routine.
	* sem_ch3.adb: Several flag settings removed since inheritance
	of aspects must be performed at freeze point.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* s-oscons-tmplt.c: Fix s-oscons.ads formatting on VxWorks.

2012-08-06  Vincent Pucci  <pucci@adacore.com>

	* sem_dim.adb (Analyze_Dimension_Binary_Op): Issue an error message
	for unknown exponent at compile-time.

2012-08-06  Gary Dismukes  <dismukes@adacore.com>

	* sem_eval.ads (Compile_Time_Known_Value_Or_Aggr): Enhance
	comment to make it clear that the aggregate's evaluation might
	still involve run-time checks even though the aggregate is
	considered known at compile time.
	* sinfo.ads (Compile_Time_Known_Aggregate): Correct comment to
	refer to Exp_Aggr instead of Sem_Aggr.

From-SVN: r190172
2012-08-06 10:48:19 +02:00
Arnaud Charlet 2eef7403a0 [multiple changes]
2012-08-06  Robert Dewar  <dewar@adacore.com>

	* xoscons.adb: Minor code reorganization (remove unused variable
	E at line 331).
	* g-sercom.ads, exp_attr.adb: Minor reformatting.
	* sinfo.adb, sinfo.ads: Minor cleanup, remove unused flag
	Static_Processing_OK.

2012-08-06  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Build_Derived_Concurrent_Type): Copy discriminant
	constraint when building a constrained subtype, to prevent
	undesirable tree sharing betweeb geberated subtype and derived
	type definition.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* g-sercom-mingw.adb, s-oscons-tmplt.c: Add missing constants
	on Windows.

2012-08-06  Sergey Rybin  <rybin@adacore.com frybin>

	* tree_io.ads: Update ASIS_Version_Number because of the tree fix
	for discriminant constraints for concurrent types.

From-SVN: r190171
2012-08-06 10:41:41 +02:00
Arnaud Charlet cc6c4d6288 [multiple changes]
2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* sem_ch4.adb: Minor reformatting.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* s-oscons-tmplt.c, xoscons.adb: Per the Single UNIX Specification,
	types cc_t, speed_t, and tcflag_t defined in <termios.h> all are
	unsigned types. Add required special handling to have their correct
	unsigned values in s-oscons.ads.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* par-ch13.adb: Minor reformatting.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* g-sercom.adb, g-sercom.ads, g-sercom-mingw.adb, g-sercom-linux.adb
	(Set): Add Local and Flow_Control settings.

2012-08-06  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb: Suppress saving of 'Old if assertions are not
	enabled.

From-SVN: r190170
2012-08-06 10:35:47 +02:00
Tom de Vries aa24a99bee vrp78.c: New test.
2012-08-06  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/tree-ssa/vrp78.c: New test.

From-SVN: r190169
2012-08-06 08:32:27 +00:00
Tom de Vries d9e408ded1 tree-switch-conversion.c (emit_case_bit_tests): Generate MINUS_EXPR in unsigned type.
2012-08-06  Tom de Vries  <tom@codesourcery.com>

	* tree-switch-conversion.c (emit_case_bit_tests): Generate MINUS_EXPR in
	unsigned type.

From-SVN: r190168
2012-08-06 08:32:20 +00:00
Arnaud Charlet d7f41b2d87 [multiple changes]
2012-08-06  Yannick Moy  <moy@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): Issue an error in
	Alfa mode for component not present.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.adb (Insert_Actions_In_Scope_Around): Do not
	use a renaming of Scope_Stack.Table (Scope_Stack.Last), as
	Process_Transient_Object may introduce new scopes and cause
	Scope_Stack.Table to be reallocated.

From-SVN: r190167
2012-08-06 10:32:05 +02:00
Arnaud Charlet 3217f71e44 [multiple changes]
2012-08-06  Robert Dewar  <dewar@adacore.com>

	* exp_util.adb, switch-c.adb, inline.ads, sem_ch10.adb, types.ads,
	checks.adb, sem_prag.adb, sem.adb, sem.ads, sem_res.adb, sem_attr.adb,
	gnat1drv.adb, exp_ch4.adb, exp_ch6.adb, opt.ads, osint.adb: Implement
	extended overflow checks (step 1).
	(Overflow_Check_Type, Suppress_Record, Suppress_All): New types.
	(Suppress_Array): Extended to include switches to control extended
	overflow checking (and renamed to Suppress_Record).
	Update all uses of Suppress_Array.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* makeutl.ads: Minor documentation fix.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.adb: Minor reformatting.

From-SVN: r190166
2012-08-06 10:26:27 +02:00
Arnaud Charlet e68077239d [multiple changes]
2012-08-06  Geert Bosch  <bosch@adacore.com>

	* a-ngelfu.adb: Change obsolete comment that this is a non-strict
	implementation.

2012-08-06  Steve Baird  <baird@adacore.com>

	* exp_ch7.adb (Build_Finalizer.Process_Object_Declaration): If
	CodePeer_Mode = True then omit exception handlers for finalization calls

2012-08-06  Robert Dewar  <dewar@adacore.com>

	* exp_aggr.adb: Minor reformatting.

From-SVN: r190165
2012-08-06 10:17:25 +02:00
Arnaud Charlet 2aca76d673 [multiple changes]
2012-08-06  Robert Dewar  <dewar@adacore.com>

	* sem_ch6.adb: Remove useless flag Body_Deleted.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
	as this is what all usage occurrences of this attribute are
	expecting.
	* uintp.adb (UI_To_Int): Add assertion to guard against calling
	with No_Uint.

From-SVN: r190164
2012-08-06 10:12:36 +02:00
Vincent Pucci 0ebc109a5e re PR ada/54125 (s-atopri.adb:40:10: "Support_Atomic_Primitives" is undefined broke Ada on multiple platforms)
2012-08-06  Vincent Pucci  <pucci@adacore.com>

PR ada/54125
	* exp_attr.adb (Expand_N_Attribute_Reference): Expand new
	Atomic_Always_Lock_Free attribute.
	* sem_attr.adb (Analyze_Attribute): Analyze new
	Atomic_Always_Lock_Free attribute.
	(Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
	attribute.
	* sem_ch9.adb (Allows_Lock_Free_Implementation):
	Support_Atomic_Primitives check replaces previous erroneous
	size check.
	* sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
	New routine.
	* snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
	new attribute Attribute_Atomic_Always_Lock_Free defined.
	* s-atopri.adb: Support_Atomic_Primitives checks replaced by
	Atomic_Always_Lock_Free queries.
	* system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
	system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
	system-linux-ppc.ads, system-linux-s390.ads,
	system-linux-s390x.ads, system-linux-sh4.ads,
	system-linux-sparc.ads, system-lynxos178-ppc.ads,
	system-lynxos-ppc.ads, system-mingw.ads,
	system-vxworks-arm.ads, system-solaris-sparc.ads,
	system-solaris-sparcv9.ads, system-vms_64.ads,
	system-vxworks-m68k.ads, system-vxworks-mips.ads,
	system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
	Support_Atomic_Primitives removed.

From-SVN: r190163
2012-08-06 10:12:10 +02:00
Arnaud Charlet a39a553eac [multiple changes]
2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
	now unconditionally passed by reference. IN parameters subject
	to convention C_Pass_By_Copy are passed by copy, otherwise they
	are passed by reference.

2012-08-06  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Object_Declaration): According to
	AI95-0303, protected objects with interrupt handlers can be
	declared in nested scopes. This is a binding interpretation,
	and thus applies to all versions of the compiler.

2012-08-06  Robert Dewar  <dewar@adacore.com>

	* frontend.adb, exp_aggr.adb: Minor reformatting.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* par-endh.adb: Minor reformatting.

From-SVN: r190162
2012-08-06 10:02:35 +02:00
Arnaud Charlet 5eeeed5e1a [multiple changes]
2012-08-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Process_Transient_Objects): Remove obsolete loop
	processing related to array initialization. The expansion of
	loops already contains a mechanism to detect controlled objects
	generated by expansion and introduce a block around the loop
	statements for finalization purposes.

2012-08-06  Vincent Pucci  <pucci@adacore.com>

	* sem_ch13.adb: Current scope must be within
	or same as the scope of the entity while analysing aspect
	specifications at freeze point.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* par_sco.adb: Add note about dubious SCO for TERMINATE
	alternative.
	* sem_ch8.adb, exp_ch11.adb: Minor reformatting.

2012-08-06  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Two_Dim_Packed_Array_Handled): New procedure to
	transform an aggregate for a packed two-dimensional array into
	a one-dimensional array of constant values, in order to avoid
	the generation of component-by-component assignments.

2012-08-06  Thomas Quinot  <quinot@adacore.com>

	* frontend.adb: Do not attempt to process deferred configuration
	pragmas if the main unit failed to load, to avoid cascaded
	inconsistencies that can lead to a compiler crash.

From-SVN: r190161
2012-08-06 09:58:49 +02:00