Commit Graph

32617 Commits

Author SHA1 Message Date
Kaveh R. Ghazi 550b318767 re PR middle-end/30251 (Evaluate bessel functions at compile-time)
PR middle-end/30251
	* builtins.c (do_mpfr_bessel_n): New.
	(fold_builtin_1): Handle BUILT_IN_J0 and BUILT_IN_J1.
	(fold_builtin_2): Handle BUILT_IN_JN.

testsuite:
	* gcc.dg/torture/builtin-math-4.c: New test.

From-SVN: r124818
2007-05-18 01:04:12 +00:00
Danny Smith a7d0b2d809 re PR target/31965 (_INTEGRAL_MAX_BITS defined incorrectly)
PR target/31965
	* config/i386/mingw32.h (_INTEGRAL_MAX_BITS): Define builtin as
	TYPE_PRECISION (intmax_type_node).

From-SVN: r124813
2007-05-17 22:51:05 +00:00
Steve Ellcey 0fa4cb7dd9 re PR target/31850 (gcc.c-torture/compile/limits-fnargs.c is slow at compiling for spu-elf)
PR target/31850
	* reload.c (subst_reloads): Remove checking.

From-SVN: r124810
2007-05-17 20:29:34 +00:00
Eric Botcazou 4eff80454b re PR rtl-optimization/31691 (optimized code taking the wrong branch)
PR rtl-optimization/31691
	* combine.c (simplify_set): Build a new src pattern instead of
	substituting its operands in the COMPARE case.

From-SVN: r124797
2007-05-17 13:29:10 +00:00
Zdenek Dvorak b02b9b53ec tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
* tree-vrp.c (finalize_jump_threads): Do not care about dominance info.
	(execute_vrp): Preserve loops through jump threading.
	* tree-ssa-threadupdate.c (thread_single_edge,
	dbds_continue_enumeration_p, determine_bb_domination_status,
	thread_through_loop_header): New functions.
	(create_edge_and_update_destination_phis,
	create_edge_and_update_destination_phis): Set loops for the new blocks.
	(prune_undesirable_thread_requests): Removed.
	(redirect_edges): Do not pretend that redirect_edge_and_branch can
	create new blocks.
	(thread_block): Do not call prune_undesirable_thread_requests.
	Update loops.
	(mark_threaded_blocks): Select edges to thread here.
	(thread_through_all_blocks): Take may_peel_loop_headers argument.
	Thread edges through loop headers independently.
	* cfgloopmanip.c (create_preheader, mfb_keep_just): Export.
	* tree-pass.h (TODO_mark_first_instance): New.
	(first_pass_instance): Declare.
	* cfghooks.c (duplicate_block): Put the block to the original loop
	if copy is not specified.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Preserve loops through
	jump threading.  Pass may_peel_loop_headers to
	thread_through_all_blocks according to first_pass_instance.
	* cfgloop.h (create_preheader): Declare.
	* tree-flow.h (thread_through_all_blocks): Declaration changed.
	* basic-block.h (mfb_keep_just, mfb_kj_edge): Declare.
	* passes.c (first_pass_instance): New variable.
	(next_pass_1): Set TODO_mark_first_instance.
	(execute_todo): Set first_pass_instance.

	* gcc.dg/tree-ssa/ssa-dom-thread-2.c: New test.
	* gcc.dg/vect/vect-102.c, gcc.dg/vect/vect-103.c,
	gcc.dg/vect/vect-104.c: Use more complex construction to prevent vectorizing.
	* gcc.dg/tree-ssa/pr21559.c: Update outcome.

From-SVN: r124786
2007-05-17 08:10:24 +00:00
Uros Bizjak d9987fb407 re PR tree-optimization/24659 (Conversions are not vectorized)
PR tree-optimization/24659
        * optabs.h (enum optab_index): Add OTI_vec_unpacks_float_hi,
	OTI_vec_unpacks_float_lo, OTI_vec_unpacku_float_hi,
	OTI_vec_unpacku_float_lo, OTI_vec_pack_sfix_trunc and
	OTI_vec_pack_ufix_trunc.
	(vec_unpacks_float_hi_optab): Define new macro.
	(vec_unpacks_float_lo_optab): Ditto.
	(vec_unpacku_float_hi_optab): Ditto.
	(vec_unpacku_float_lo_optab): Ditto.
	(vec_pack_sfix_trunc_optab): Ditto.
	(vec_pack_ufix_trunc_optab): Ditto.
	* genopinit.c (optabs): Implement vec_unpack[s|u]_[hi|lo]_optab
	and vec_pack_[s|u]fix_trunc_optab using
	vec_unpack[s|u]_[hi\lo]_* and vec_pack_[u|s]fix_trunc_* patterns
	* tree-vectorizer.c (supportable_widening_operation): Handle
	FLOAT_EXPR and CONVERT_EXPR.  Update comment.
	(supportable_narrowing_operation): New function.
	* tree-vectorizer.h (supportable_narrowing_operation): Prototype.
	* tree-vect-transform.c (vectorizable_conversion): Handle
	(nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.
	(vect_gen_widened_results_half): Move before vectorizable_conversion.
	(vectorizable_type_demotion): Call supportable_narrowing_operation()
	to check for target support.
	* optabs.c (optab_for_tree_code) Return vec_unpack[s|u]_float_hi_optab
	for VEC_UNPACK_FLOAT_HI_EXPR, vec_unpack[s|u]_float_lo_optab
	for VEC_UNPACK_FLOAT_LO_EXPR and vec_pack_[u|s]fix_trunc_optab
	for VEC_PACK_FIX_TRUNC_EXPR.
	(expand_binop): Special case mode of the result for
	vec_pack_[u|s]fix_trunc_optab.
	(init_optabs): Initialize vec_unpack[s|u]_[hi|lo]_optab and
	vec_pack_[u|s]fix_trunc_optab.

	* tree.def (VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR,
	VEC_PACK_FIX_TRUNC_EXPR): New tree codes.
	* tree-pretty-print.c (dump_generic_node): Handle
	VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
	VEC_PACK_FIX_TRUNC_EXPR.
	(op_prio): Ditto.
	* expr.c (expand_expr_real_1): Ditto.
	* tree-inline.c (estimate_num_insns_1): Ditto.
	* tree-vect-generic.c (expand_vector_operations_1): Ditto.

	* config/i386/sse.md (vec_unpacks_float_hi_v8hi): New expander.
	(vec_unpacks_float_lo_v8hi): Ditto.
	(vec_unpacku_float_hi_v8hi): Ditto.
	(vec_unpacku_float_lo_v8hi): Ditto.
	(vec_unpacks_float_hi_v4si): Ditto.
	(vec_unpacks_float_lo_v4si): Ditto.
	(vec_pack_sfix_trunc_v2df): Ditto.

	* doc/c-tree.texi (Expression trees) [VEC_UNPACK_FLOAT_HI_EXPR]:
	Document.
	[VEC_UNPACK_FLOAT_LO_EXPR]: Ditto.
	[VEC_PACK_FIX_TRUNC_EXPR]: Ditto.
	* doc/md.texi (Standard Names) [vec_pack_sfix_trunc]: Document.
	[vec_pack_ufix_trunc]: Ditto.
	[vec_unpacks_float_hi]: Ditto.
	[vec_unpacks_float_lo]: Ditto.
	[vec_unpacku_float_hi]: Ditto.
	[vec_unpacku_float_lo]: Ditto.

testsuite/ChangeLog:

	PR tree-optimization/24659
	* gcc.dg/vect/vect-floatint-conversion-2.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-1.c: Require vect_float,
	not vect_int target.
	* gcc.dg/vect/vect-intfloat-conversion-2.c: Require vect_float,
	not vect_int target.  Loop is vectorized for vect_intfloat_cvt
	targets.
	* gcc.dg/vect/vect-intfloat-conversion-3.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-4a.c: New test.
	* gcc.dg/vect/vect-intfloat-conversion-4b.c: New test.

From-SVN: r124784
2007-05-17 08:31:05 +02:00
Uros Bizjak 27735edb45 README: Update for new files.
* soft-fp/README: Update for new files.
        * soft-fp/floattisf.c: New file.
        * soft-fp/floattidf.c: New file.
        * soft-fp/floattitf.c: New file.
        * soft-fp/floatuntisf.c: New file.
        * soft-fp/floatuntidf.c: New file.
        * soft-fp/floatuntitf.c: New file.
        * soft-fp/fixsfti.c: New file.
        * soft-fp/fixdfti.c: New file.
        * soft-fp/fixtfti.c: New file.
        * soft-fp/fixunssfti.c: New file.
        * soft-fp/fixunsdfti.c: New file.
        * soft-fp/fixunstfti.c: New file.
        * soft-fp/extendxftf.c: New file.
        * soft-fp/trunctfxf.c: New file.

        * libgcc-std.ver (__extendxftf2): Added to GCC_4.3.0 section.
        (__trunctfxf2): Ditto.

        * config/i386/libgcc-x86_64-glibc.ver (__addtf3, __divtf3, __eqtf2,
        __extenddftf2, __extendsftf2, __fixtfdi, __fixtfsi, __fixtfti,
        __fixunstfdi, __fixunstfsi, __fixunstfti, __floatditf, __floatsitf,
        __floattitf, __floatunditf, __floatunsitf, __floatuntitf, __getf2,
        __letf2, __multf3, __negtf2, __subtf3, __trunctfdf2, __trunctfsf2,
        __unordtf2): Exclude and add to GCC_4.3.0 section for x86_64 targets.

        * config/i386/t-fprules-softfp64: New file.
        * config/i386/sfp-machine.h: New file.
        * config.gcc (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu,
        x86_64-*-knetbsd*-gnu): Add i386/t-fprules-softfp64
        and soft-fp/t-softfp to tmake_file.
        (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu,
        i[34567]86-*-knetbsd*-gnu): Ditto for --enable-targets=all.

        * config/i386/t-linux64 (softfp_wrap_start): New.
        (softfp_wrap_end): New.
        * config/i386/i386.c (ix86_scalar_mode_supported): TFmode is
        supported for TARGET_64BIT.

testsuite/ChangeLog:

        * gcc.dg/torture/fp-int-convert-float128.c: Do not xfail for i?86-*-*
        and x86_64-*-* targets.
        * gcc.dg/torture/fp-int-convert-float128-timode.c: Ditto.

From-SVN: r124775
2007-05-16 19:07:07 +02:00
Rafael Avila de Espindola c74a03d23e c-common.c (c_common_signed_or_unsigned_type): Emulate c_common_unsigned_type behavior.
2007-05-16  Rafael Avila de Espindola  <espindola@google.com>

       * c-common.c (c_common_signed_or_unsigned_type): Emulate
       c_common_unsigned_type behavior.

From-SVN: r124771
2007-05-16 16:26:21 +00:00
Paolo Bonzini 2d79fde8c2 i386.c (legitimize_tls_address): Mark __tls_get_addr calls as pure.
2007-05-16  Paolo Bonzini  <bonzini@gnu.org>

        * config/i386/i386.c (legitimize_tls_address): Mark __tls_get_addr
        calls as pure.

From-SVN: r124765
2007-05-16 09:23:21 +00:00
Eric Christopher 2b2c2fe51a rs6000.c (rs6000_emit_prologue): Move altivec register saving after stack push.
2007-05-16  Eric Christopher  <echristo@apple.com>

	* config/rs6000/rs6000.c (rs6000_emit_prologue): Move altivec register
        saving after stack push. Set sp_offset whenever we push.
        (rs6000_emit_epilogue): Move altivec register restore before stack push.

From-SVN: r124763
2007-05-16 08:30:10 +00:00
Richard Sandiford 748670c25b configure.ac: Allow sysroots to be relocated under $prefix as well as $exec_prefix.
gcc/
	* configure.ac: Allow sysroots to be relocated under $prefix as
	well as $exec_prefix.
	* configure: Regenerate.

From-SVN: r124762
2007-05-16 07:14:40 +00:00
Richard Sandiford 4ef2b6ed33 revert: configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
gcc/
	Revert:

	2007-05-12  Richard Sandiford  <richard@codesourcery.com>

	* configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
	(gcc_tooldir): Likewise.
	* configure: Regenerate.
	* Makefile.in (libsubdir_to_prefix): New variable, based on the
	old configure.ac gcc_tooldir setting.
	(prefix_to_exec_prefix): New variable.
	(DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
	rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.

From-SVN: r124760
2007-05-16 06:43:36 +00:00
Janis Johnson 3bf6bfcc7e c-typeck.c (build_binary_op): Return early for error.
gcc/
	* c-typeck.c (build_binary_op): Return early for error.
gcc/testsuite/
	* gcc.dg/dfp/usual-arith-conv-bad.c: New test.

From-SVN: r124732
2007-05-14 23:49:36 +00:00
Zdenek Dvorak 9e2f83a5e8 tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate struct nb_iter_bound.
* tree-ssa-loop-niter.c (record_estimate): Use GGC_NEW to allocate
	struct nb_iter_bound.
	(free_numbers_of_iterations_estimates_loop): Use ggc_free.
	* gengtype.c (open_base_files): Add cfhloop.h to the list of includes.
	* cfgloopmanip.c (place_new_loop): Vector larray is gc-allocated.
	* tree-scalar-evolution.c: Include gt-tree-scalar-evolution.h.
	(struct scev_info_str, scalar_evolution_info): Add GTY markers.
	(new_scev_info_str): Use GGC_NEW to allocate struct scev_info_str.
	(del_scev_info): Use ggc_free.
	(scev_initialize): Allocate scalar_evolution_info in gc memory.
	* loop-init.c: Include ggc.h.
	(loop_optimizer_init): Use GGC_CNEW to allocate struct loops.
	(loop_optimizer_finalize): Use ggc_free.
	* tree-ssa-loop.c (pass_tree_unswitch, pass_vectorize,
	pass_linear_transfom, pass_empty_loop, pass_complete_unroll,
	pass_iv_optimize): Add TODO_ggc_collect.
	* function.h (struct function): Remove skip marker from x_current_loops.
	* cfgloop.c: Include ggc.h.
	(flow_loops_free, flow_loop_free): Free the loop descriptions in gc
	memory.
	(establish_preds): Vector superloops is gc allocated.
	(alloc_loop): Allocate loop using GGC_CNEW.  Allocate head of
	loop->exits list.
	(flow_loops_find): Vector larray is gc allocated.
	(loop_exit_free): Use ggc_free.
	(rescan_loop_exit): Use GGC_NEW to allocate struct loop_exit.  Reflect
	that head of exits list is now not a part of struct loop.
	(record_loop_exits): Allocate exits table in gc memory.
	(get_loop_exit_edges, verify_loop_structure, single_exit): Reflect that
	head of exits list is now not a part of struct loop.
	* cfgloop.h (struct lpt_decision, struct nb_iter_bound,
	struct loop_exit): Add GTY marker.
	(struct loop): Add GTY marker.  Make superloops vector gc allocated.
	Add skip marker to aux field.  Make head of exits list a separate
	object.
	(struct loops): Add GTY marker.  Make larray vector gc allocated.
	Add param marker to exits table.
	(get_loops): Type changed.
	* Makefile.in (tree-scalar-evolution.o): Add gt-tree-scalar-evolution.h
	dependency.
	(cfgloop.o, loop-init.o): Add ggc.h dependency.
	(GTFILES): Add cfgloop.h and tree-scalar-evolution.c.
	* basic-block.h (struct basic_block_def): Remove skip marker from
	loop_father field.

From-SVN: r124727
2007-05-14 21:58:42 +00:00
Uros Bizjak 49452c070f builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead of 0 in the call to expand_expr().
* builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
        of 0 in the call to expand_expr().
        (expand_builtin_mathfn_3): Ditto.
        (expand_builtin_interclass_mathfn): Ditto.
        (expand_builtin_cexpi): Ditto.
        (expand_builtin_int_roundingfn): Ditto.
        (expand_builtin_int_roundingfn_2): Ditto.
        (expand_builtin_pow): Ditto.
        (expand_builtin_powi): Ditto.
        (expand_builtin_bswap): Ditto.
        (expand_builtin_unop): Ditto.
        (expand_builtin_fabs): Ditto.
        (get_builtin_sync_mem): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_builtin_sync_operation): Ditto.
        (expand_builtin_compare_and_swap): Ditto.
        (expand_builtin_lock_test_and_set): Ditto.
        * except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
        instead of 0 in the call to expand_expr().
        (expand_builtin_extract_return_addr): Ditto.
        (expand_builtin_eh_return): Ditto.
        (expand_eh_return): Ditto.
        * explow.c (expr_size): Ditto.
        * expr.c (optimize_bitfield_assignment_op): Ditto.
        (expand_assignement): Ditto.
        (store_expr): Ditto.
        (store_field): Ditto.
        (expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
        the call to expand_expr().
        (expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().
        [CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
        BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
        [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
        of expand_expr().
        * optabs.c (expand_vec_shift_expr): Ditto.
        (expand_vec_cond_expr): Ditto.
        (vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
        call to expand_expr().
        * stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
        in the call to expand_expr().

From-SVN: r124722
2007-05-14 21:42:47 +02:00
Dave Korn 9c40feebdb genautomata.c (gen_regexp_el): Allocate correct size for regexp.
2007-05-14  Dave Korn  <dave.korn@artimi.com>

	* genautomata.c (gen_regexp_el):  Allocate correct size for regexp.

From-SVN: r124718
2007-05-14 16:46:44 +00:00
Rafael Avila de Espindola ca5ba2a3ea c-common.c (warnings_for_convert_and_check): Use unsigned_type_for instead of c_common_unsigned_type.
gcc/
       * c-common.c (warnings_for_convert_and_check): Use unsigned_type_for
       instead of c_common_unsigned_type.
       (c_common_unsigned_type): Remove.
       (shorten_compare): Use c_common_signed_or_unsigned_type instead of
       c_common_unsigned_type.
       (c_common_nodes_and_builtins): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-common.h (c_common_unsigned_type): Remove.
       * c-decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-format.c (check_format_types): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * c-objc-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * c-typeck.c (convert_for_assignment): Use unsigned_type_for instead of
       c_common_unsigned_type.
       * convert.c (convert_to_integer): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * expmed.c (make_tree): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       * fold-const.c (fold_negate_expr): Use unsigned_type_for instead of
       lang_hooks.types.unsigned_type.
       (build_range_check): Likewise.
       (fold_unary): Likewise.
       (fold_binary): Likewise.
       (fold_ternary): Likewise.
       * langhooks-def.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * langhooks.h (lang_hooks_for_types): Remove unsigned_type.
       * tree.c (get_unsigned_type): New.
       (unsigned_type_for): Use get_unsigned_type instead of
       lang_hooks.types.unsigned_type

gcc/ada
       * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.

gcc/cp
       * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * decl.c (grokdeclarator): Use unsigned_type_for instead of
       c_common_unsigned_type.

gcc/fortran
       * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
       instead of gfc_unsigned_type.
       * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
       gfc_unsigned_type.
       * trans-types.c (gfc_unsigned_type): Remove.
       * trans-types.h (gfc_unsigned_type): Remove.

gcc/java
       * expr.c (build_java_binop): Use unsigned_type_for instead of
       java_unsigned_type.
       * java-tree.h (java_unsigned_type): Remove.
       * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
       * typeck.c (java_unsigned_type): Remove.

gcc/treelang
       * treetree.c (tree_lang_unsigned_type): Remove.
       (LANG_HOOKS_UNSIGNED_TYPE): Remove.

From-SVN: r124715
2007-05-14 14:37:17 +00:00
Kazu Hirata a424273720 m68k-protos.h: Rename m68k_interrupt_function_p to m68k_get_function_kind.
gcc/
	* config/m68k/m68k-protos.h: Rename m68k_interrupt_function_p
	to m68k_get_function_kind.  Update its prototype.
	* config/m68k/m68k.c (m68k_attribute_table): Add an entry for
	interrupt_thread.
	(m68k_interrupt_function_p): Return enum m68k_function_type
	instead of bool.  Rename to m68k_get_function_kind.
	(m68k_handle_fndecl_attribute): Reject interrupt_thread if the
	target is not fido.
	(m68k_compute_frame_layout): Don't mark any register for save
	if an interrupt_thread attribute is specified.
	(m68k_hard_regno_rename_ok): Update a use of
	m68k_interrupt_function_p.
	* config/m68k/m68k.h (EPILOGUE_USES): Update a use of
	m68k_interrupt_function_p.
	(m68k_function_type): New.
	* config/m68k/m68k.md (*return): Output a 'sleep' instruction
	for a function with an interrupt_thread attribute.
	* doc/extend.texi: Document the interrupt_thread attribute.

gcc/testsuite/
	* gcc.target/m68k/interrupt_thread-1.c,
	gcc.target/m68k/interrupt_thread-2.c,
	gcc.target/m68k/interrupt_thread-3.c: New.
	* gcc.target/m68k/m68k.exp: Accept fido.

From-SVN: r124713
2007-05-14 13:52:18 +00:00
Daniel Berlin 4076455d9b re PR tree-optimization/31911 (Short function (md4) takes very long to compile)
2007-05-13  Daniel Berlin  <dberlin@dberlin.org>

	Fix PR tree-optimization/31911
	* tree-ssa-pre.c (phi_translate): Make sure to cache results even
	if they didn't change the expression.

From-SVN: r124657
2007-05-13 21:52:10 +00:00
Zdenek Dvorak 3cb960c703 tree-scalar-evolution.c (resolve_mixers): Exported.
* tree-scalar-evolution.c (resolve_mixers): Exported.
	* tree-scalar-evolution.h (resolve_mixers): Declare.
	* tree-data-ref.c (object_analysis, ptr_decl_may_alias_p,
	ptr_ptr_may_alias_p, may_alias_p, record_ptr_differ_p,
	record_record_differ_p, record_array_differ_p, array_ptr_differ_p,
	base_object_differ_p, base_addr_differ_p, analyze_array_indexes,
	init_array_ref, init_pointer_ref, analyze_indirect_ref,
	strip_conversion, analyze_offset_expr, address_analysis,
	object_analysis, analyze_offset): Removed.
	(dr_analyze_innermost, dr_analyze_indices, dr_analyze_alias,
	split_constant_offset, canonicalize_base_object_address,
	object_address_invariant_in_loop_p, disjoint_objects_p,
	dr_may_alias_p, dr_address_invariant_p): New functions.
	(create_data_ref): Use dr_analyze_innermost, dr_analyze_indices
	and dr_analyze_alias.
	(initialize_data_dependence_relation): Use dr_may_alias_p
	and object_address_invariant_in_loop_p.
	(compute_self_dependence): Handle the case when DDR_ARE_DEPENDENT (ddr)
	is chrec_dont_know.
	(find_data_references_in_stmt): Restrict the analysis of data references
	to the given loop nest.
	(find_data_references_in_loop): Made static.  Pass loop nest to
	find_data_references_in_stmt.
	(compute_data_dependences_for_loop): Use DR_VOPS.
	(free_data_ref): Free DR_VOPS.
	* tree-data-ref.h (struct first_location_in_loop): Replaced by ...
	(struct innermost_loop_behavior): ... new.
	(struct base_object_info): Replaced by ...
	(struct indices): ... new.
	(struct dr_alias): New.
	(enum data_ref_type): Removed.
	(struct data_reference): Consist of struct innermost_loop_behavior,
	struct indices and struct dr_alias.
	(DR_SET_ACCESS_FNS, DR_FREE_ACCESS_FNS): Removed.
	(DR_MEMTAG): Renamed to ...
	(DR_SYMBOL_TAG): ... this.
	(find_data_references_in_loop): Declaration removed.
	* tree-vect-analyze.c (vect_compute_data_ref_alignment): Use DR_INIT
	instead of DR_OFFSET_MISALIGNMENT.  DR_ALIGNED_TO is never NULL.
	(vect_analyze_data_refs): Use DR_SYMBOL_TAG instead of DR_MEMTAG.
	* tree-vect-transform.c (vect_create_data_ref_ptr): Ditto.

	* gcc.dg/vect/no-section-anchors-vect-69.c: Fix outcome.
	* gcc.dg/tree-ssa/loop-30.c: New test.

From-SVN: r124655
2007-05-13 17:32:06 +00:00
Revital Eres 8a8b05f463 Extend dse
From-SVN: r124651
2007-05-13 07:49:47 +00:00
Steven Bosscher bae8b6b2c3 gcse.c (gcse_main): Do jump bypassing in CPROP2.
* gcse.c (gcse_main): Do jump bypassing in CPROP2.
	* passes.c (init_optimization_passes): Move pass_jump_bypass
	after loop2.

	* basic-block.h (bb_has_eh_pred): Fix style issue.

From-SVN: r124640
2007-05-12 18:15:38 +00:00
Steven Bosscher 7f6055d052 re PR rtl-optimization/31848 (Invalid loop optimization causes bootstrap failure in genautomata)
PR rtl-optimization/31848
	* loop-invariant.c (move_invariant_reg): If we move an insn
	with a REG_EQUAL note, and that insn is not always executed,
	remove the REG_EQUAL note.

From-SVN: r124639
2007-05-12 18:12:54 +00:00
Richard Guenther c4160806e1 re PR tree-optimization/31797 (infinite loop in tree-ssa-pre or ICE)
2007-05-12  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31797
	* tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not
	propagate into a stmt that has volatile ops.

	* gcc.c-torture/compile/pr31797.c: New testcase.

From-SVN: r124637
2007-05-12 17:21:43 +00:00
Richard Sandiford a747170836 configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
gcc/
	* configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
	(gcc_tooldir): Likewise.
	* configure: Regenerate.
	* Makefile.in (libsubdir_to_prefix): New variable, based on the
	old configure.ac gcc_tooldir setting.
	(prefix_to_exec_prefix): New variable.
	(DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
	rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.

From-SVN: r124634
2007-05-12 08:00:12 +00:00
Silvius Rus 79bedddc8f Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.
gcc/
        * Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o.
        * c-common.c (strict_aliasing_warning): Modify -Wstrict-aliasing logic.
        * c-common.h (strict_aliasing_warning): Change return type.
        * c-opts.c (c_common_handle_option): Add call to set_Wstrict_aliasing.
        * c-typeck.c (build_indirect_ref): Add call to strict_aliasing_warning.
        (build_c_cast): Condition call to strict_aliasing_warning.
        * doc/invoke.texi: Update description of -Wstrict-aliasing[=n].
        * flags.h (set_Wstrict_aliasing): Declare.
        * opts.c (set_Wstrict_alising): Define, add call to.
        * tree-flow.h (strict_aliasing_warning_backend): Declare.
        * tree-ssa-alias-warnings.c: New file.
        * tree-ssa-alias.c (compute_may_aliases): Add call to
        strict_aliasing_warning_backend.

gcc/cp
        * cp/typeck.c (build_indirect_ref): Add call to
        strict_aliasing_warning.
        (build_reinterpret_cast_1): Condition call to
        strict_aliasing_warning.

gcc/testsuite
        * gcc.dg/Wstrict-aliasing-bogus-const-ptr-nonconst-ptr.c: New test.
        * gcc.dg/Wstrict-aliasing-bogus-never-dereferenced.c: New test.
        * gcc.dg/Wstrict-aliasing-bogus-struct-included.c: New test.
        * gcc.dg/Wstrict-aliasing-converted-assigned.c: New test.
        * gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: New test.
        * gcc.dg/alias-1.c: Update option: -Wstrict-aliasing=2.
        * gcc.dg/alias-9.c: Update option: -Wstrict-aliasing=2.
        * g++.dg/warn/Wstrict-aliasing-7.C: Update option: -Wstrict-aliasing=2.
        * g++.dg/warn/Wstrict-aliasing-bogus-base-derived.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-char-1.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-const.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-nested-arrays.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-signed-unsigned.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-struct-included.C: New test.
        * g++.dg/warn/Wstrict-aliasing-bogus-union.C: New test.
        * g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: New test.

From-SVN: r124622
2007-05-11 16:20:08 +00:00
Zdenek Dvorak 9ba025a2c1 tree-loop-linear.c (gather_interchange_stats, [...]): Use loop_depth and loop_outer accessor functions.
* tree-loop-linear.c (gather_interchange_stats, try_interchange_loops):
	Use loop_depth and loop_outer accessor functions.
	* tree-ssa-loop-im.c (outermost_invariant_loop, set_level,
	determine_invariantness_stmt, move_computations_stmt): Ditto.
	* cfgloopmanip.c (fix_bb_placement, fix_loop_placement, remove_path,
	add_loop, loopify, unloop, fix_loop_structure): Ditto.
	* tree-ssa-loop-manip.c (find_uses_to_rename_use): Ditto.
	* tree-scalar-evolution.c (interpret_loop_phi,
	compute_scalar_evolution_in_loop, analyze_scalar_evolution_in_loop,
	instantiate_parameters_1, scev_const_prop): Ditto.
	* cfghooks.c (make_forwarder_block): Ditto.
	* cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto.
	* modulo-sched.c (loop_canon_p): Ditto.
	* tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg,
	slpeel_can_duplicate_loop_p): Ditto.
	* lambda-code.c (invariant_in_loop_and_outer_loops): Ditto.
	* tree-cfg.c (tree_duplicate_sese_region): Ditto.
	* cfgloop.c (flow_loop_dump, flow_loop_nodes_find, rescan_loop_exit,
	cancel_loop, verify_loop_structure): Ditto.
	(flow_loop_nested_p, superloop_at_depth, flow_loop_free,
	add_bb_to_loop, remove_bb_from_loops, find_common_loop): Use the
	superloops vector instead of "pred" array.
	(establish_preds): Take father loop as an argument.  Initialize the
	superloops vector.
	(flow_loop_tree_node_add): Pass father loop to establish_preds.  Do not
	initialize loop->outer.
	(flow_loop_tree_node_remove): Truncate the superloops vector.
	* cfgloop.h (struct loop): Removed field "outer", fields "depth" and
	"pred" merged to "superloops" vector.
	(loop_depth, loop_outer): New.
	(fel_init): Use loop_outer.

From-SVN: r124619
2007-05-11 15:52:01 +00:00
Jan Hubicka 7be8227904 semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
* semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
	* decl2.c (start_objects): ctors and dtors are no longer public.
	(cp_write_global_declarations): Do not call c_build_cdtor_fns.

	* cgraphunit.c: Include gt-cgraphunit.h
	(static_ctors, static_dtors): New static vars.
	(record_cdtor_fn, build_cdtor, cgraph_build_cdtor_fns): New functions,
	based on implementation in c-common.c
	(cgraph_finalize_function): Call record_cdtor_fn.
	(cgraph_optimize): Call cgraph_build_cdtor_fns.
	* decl.c (finish_function): Do not call c_record_cdtor_fn.
	(c_write_global_declarations): Do not call c_build_cdtor_fns.
	* c-common.c (static_ctors, static_dtors, c_record_cdtor_fn,
	build_cdtor, c_build_cdtor_fns): Remove.
	* c-common.h (static_ctors, static_dtors, c_record_cdtor_fn,
	c_build_cdtor_fns): Remove prototype.

From-SVN: r124618
2007-05-11 12:18:17 +00:00
Paolo Carlini 2a5fce6d48 re PR other/31852 (Missing __builtin_memchr)
2007-05-11  Paolo Carlini  <pcarlini@suse.de>

	PR other/31852
	* builtin-types.def: Add BT_FN_PTR_CONST_PTR_INT_SIZE.
	* builtins.def: Add BUILT_IN_MEMCHR, use the latter.
	* builtins.c (fold_builtin_memchr): New.
	(expand_builtin_memchr): Call the latter.
	(expand_builtin, fold_builtin_3): Deal with BUILT_IN_MEMCHR.
	* doc/extend.texi ([Other built-in functions provided by GCC]):
	Document memchr.

/testsuite
2007-05-11  Paolo Carlini  <pcarlini@suse.de>

	PR other/31852
	* gcc.c-torture/execute/builtins/memchr.c: New.
	* gcc.c-torture/execute/builtins/memchr-lib.c: New.
	* gcc.c-torture/execute/builtins/lib/memchr.c: New.

From-SVN: r124617
2007-05-11 11:49:29 +00:00
Andreas Krebbel 35dd9a0e6d s390.md (GPR0_REGNUM, [...]): Constants added.
2007-05-11  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md (GPR0_REGNUM, FPR0_REGNUM, FPR2_REGNUM,
	PFPO_CONVERT, PFPO_OP_TYPE_SF, PFPO_OP_TYPE_DF, PFPO_OP_TYPE_TF,
	PFPO_OP_TYPE_SD, PFPO_OP_TYPE_DD, PFPO_OP_TYPE_TD, PFPO_OP0_TYPE_SHIFT,
	PFPO_OP1_TYPE_SHIFT): Constants added.
	(DFP_ALL): Mode macro defined.
	("*trunc<BFP:mode><DFP_ALL:mode>2", "*trunc<DFP_ALL:mode><BFP:mode>2",
	"*extend<BFP:mode><DFP_ALL:mode>2", "*extend<DFP_ALL:mode><BFP:mode>2"):
	Insn definitions added.
	("trunc<BFP:mode><DFP_ALL:mode>2", "trunc<DFP_ALL:mode><BFP:mode>2",
	"extend<BFP:mode><DFP_ALL:mode>2", "extend<DFP_ALL:mode><BFP:mode>2"):
	Expanders added.

From-SVN: r124614
2007-05-11 08:40:52 +00:00
Zdenek Dvorak e71d7f88ba re PR tree-optimization/31885 (Not removing empty loop, scev not finding the correct result)
PR tree-optimization/31885
	* tree-chrec.c (chrec_contains_undetermined): Do not consider NULL_TREE
	to be undetermined.
	(automatically_generated_chrec_p): Return false for NULL.

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

From-SVN: r124602
2007-05-10 21:33:11 +00:00
Bernd Schmidt b548a9c2c2 bfin.h (MOVE_RATIO): Define.
* config/bfin/bfin.h (MOVE_RATIO): Define.

From-SVN: r124596
2007-05-10 13:07:24 +00:00
Richard Sandiford 1910440ea6 config.gcc (sparc-wrs-vxworks): New target.
gcc/
	* config.gcc (sparc-wrs-vxworks): New target.
	* config/sparc/vxworks.h, config/sparc/t-vxworks: New files.
	* config/sparc/sparc-protos.h (sparc_emit_call_insn): Declare.
	* config/sparc/sparc.h: Include vxworks-dummy.h.
	(PRINT_OPERAND_ADDRESS): Extend SYMBOL_REF handling to
	include LABEL_REFs too.
	* config/sparc/sparc.c (sparc_expand_move): Don't assume that
	_GLOBAL_OFFSET_TABLE_ - label_ref is a link-time constant on
	VxWorks.
	(legitimize_pic_address): Handle LABEL_REFs like SYMBOL_REFs
	on VxWorks.
	(load_pic_register): Use gen_vxworks_load_got for VxWorks.
	(sparc_emit_call_insn): New function.
	(sparc_function_ok_for_sibcall): Restrict sibcalls to locally-binding
	functions when generating VxWorks PIC.
	* config/sparc/sparc.md (vxworks_load_got): New pattern.
	(call, call_value): Use sparc_emit_call_insn instead of
	emit_call_insn.

libgcc/
	* config.host (sparc-wrs-vxworks): New target.

From-SVN: r124595
2007-05-10 11:15:07 +00:00
Bob Wilson 4575a800ef * config/xtensa/xtensa.c (xtensa_output_literal): Don't use #if.
From-SVN: r124579
2007-05-09 19:13:59 +00:00
Bob Wilson 74ed13f5c6 xtensa.c (xtensa_output_literal): Mask out high bits for floating-point values if HOST_BITS_PER_LONG > 32.
* config/xtensa/xtensa.c (xtensa_output_literal): Mask out high bits
	for floating-point values if HOST_BITS_PER_LONG > 32.  Use split_double
	instead of operand_subword.

From-SVN: r124578
2007-05-09 17:05:14 +00:00
Bernd Schmidt 520c62adcd bfin.h (LOCAL_ALIGNMENT): Define.
* config/bfin/bfin.h (LOCAL_ALIGNMENT): Define.
	* config/bfin/bfin.c (bfin_local_alignment): New function.
	* config/bfin/bfin-protos.h (bfin_local_alignment): Declare it.

From-SVN: r124570
2007-05-09 11:57:49 +00:00
Chao-ying Fu 14661f36f8 md.texi (msub@var{m}@var{n}4, [...]): Document.
* doc/md.texi (msub@var{m}@var{n}4, usub@var{m}@var{n}4): Document.
* optabs.h (OTI_smsub_widen, OTI_umsub_widen): New optab_indexes.
(smsub_widen_optab, umsub_widen_optab): Define.
* optabs.c (init_optabs): Initialize smsub_widen_optab and
umsub_widen_optab.
* genopinit.c (optabs): Fill in smsub_widen_optab and
umsub_widen_optab.
* expr.c (expand_expr_real_1): Try to use smsub_widen_optab
and umsub_widen_optab to implement multiply-subtract sequences.
* config/mips/mips.md (*msac<u>_di): Rename to...
(<u>msubsidi4): ...this.  Extend condition to include
GENERATE_MADD_MSUB and TARGET_DSPR2.  Change the constraint
of operand 0 to "ka" and use the three-operand form of msub<u>
for TARGET_DSPR2.
* config/mips/mips-dspr2.md (mips_msub, mips_msubu): Convert
to define_expands.

From-SVN: r124558
2007-05-08 22:51:14 +00:00
Kaz Kojima 10050f74a3 re PR rtl-optimization/28011 ([SH] g++ generates wrong code, if '-fno-exceptions' and '-O' options are specified)
PR rtl-optimization/28011
	* reload.c (push_reload): Set dont_share if IN appears in OUT
	also when IN is a PLUS rtx.
	(reg_overlap_mentioned_for_reload_p): Return true if X and IN
	are same PLUS rtx.

From-SVN: r124557
2007-05-08 22:22:49 +00:00
Kazu Hirata b4aaa77b1f emit-rtl.c (unshare_all_rtl_1): Don't copy DECL_RTL.
* emit-rtl.c (unshare_all_rtl_1): Don't copy DECL_RTL.  Don't
	call unshare_all_decls.
	(unshare_all_rtl): Adjust the call to unshare_all_rtl_1.
	(unshare_all_decls): Remove.

From-SVN: r124556
2007-05-08 21:26:29 +00:00
Simon Martin bfa64d0e60 re PR tree-optimization/31847 (Printing to dump file broken)
2007-05-08  Simon Martin  <simartin@users.sourceforge.net>

	PR 31847
	* tree-dump.c (dump_options): Don't use TDF_DIAGNOSTIC in "*-all" tree
	dumps.

From-SVN: r124551
2007-05-08 15:33:56 +00:00
Sandra Loosemore e8ab09c1bd mips.h (MAX_FPRS_PER_FMT): Renamed from FP_INC.
2007-05-08  Sandra Loosemore  <sandra@codesourcery.com>
            Nigel Stephens  <nigel@mips.com>

	gcc/
	* config/mips/mips.h (MAX_FPRS_PER_FMT): Renamed from FP_INC.
	Update comments and all uses.
	(MIN_FPRS_PER_FMT): Define.
	* config/mips/mips.c (function_arg): Fix to correctly handle
	the -mips32r2 -mfp64 -mabi=32 case.
	(override_options): Enable use of odd-numbered registers for
	SFmode values on MIPS32.
	(mips_save_reg_p): Save whole floating-point register pair if
	either half is used.
	(compute_frame_size): Fix comment.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r124545
2007-05-08 08:44:21 -04:00
Jie Zhang 28f601ff8a bfin-protos.h (enum bfin_cpu): Add BFIN_CPU_BF534, BFIN_CPU_BF536 and BFIN_CPU_BF561.
* config/bfin/bfin-protos.h (enum bfin_cpu): Add
	BFIN_CPU_BF534, BFIN_CPU_BF536 and BFIN_CPU_BF561.
	* config/bfin/bfin.c (bfin_handle_option): Handle
	-mcpu=bf534, -mcpu=bf536 and -mcpu=bf561.
	* config/bfin/bfin.h (TARGET_CPU_CPP_BUILTINS):
	Support bf534, bf536 and bf561.
	* doc/invoke.texi (Blackfin Options): Document -mcpu and -msim.

From-SVN: r124544
2007-05-08 12:33:23 +00:00
Jie Zhang 1f9e4ca180 bfin-protos.h (bfin_expand_epilogue): Add a third argument of type bool.
* config/bfin/bfin-protos.h (bfin_expand_epilogue): Add a third
	argument of type bool.
	* config/bfin/bfin.c (add_to_reg): Add epilogue_p as a fourth
	argument. Safely select temporary P register according to it.
	(do_link): Change call site of add_to_reg accordingly.
	(do_unlink): Add epilogue_p as a fourth argument and pass it
	to add_to_reg.
	(expand_interrupt_handler_epilogue): Change call of do_unlink
	accordingly.
	(bfin_expand_prologue): Add a third argument sibcall_p.
	* config/bfin/bfin.md (epilogue): Change call of
	bfin_expand_epilogue accordingly.
	(sibcall_epilogue): Likewise.
	(eh_return_internal): Likewise.

From-SVN: r124542
2007-05-08 11:59:08 +00:00
Uros Bizjak ac97d816a6 re PR target/31854 (internal compiler error: in cgraph_local_info, at cgraph.c:618)
PR target/31854
	* config/i386/i386.c (ix86_function_regparm): Process local
	functions only when TREE_CODE (decl) equals FUNCTION_DECL.

From-SVN: r124538
2007-05-08 08:48:15 +02:00
Mike Stump 841cc7daf3 invoke.texi (Warning Options): Document that -Wempty-body also checks for and while statements in C++.
* doc/invoke.texi (Warning Options): Document that -Wempty-body
	also checks for and while statements in C++.

cp:
	* parser.c (check_empty_body): Add.
	(cp_parser_iteration_statement): Add call to check_empty_body.

testsuite:
	* g++.old-deja/g++.mike/empty.C: Add.

From-SVN: r124534
2007-05-08 01:31:24 +00:00
Nathan Froyd 2091ff6689 libiberty.h (writeargv): Declare.
include/
2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>

	* libiberty.h (writeargv): Declare.

libiberty/
2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>

	* argv.c (writeargv): New function.

gcc/
2007-05-07  Nathan Froyd  <froydnj@codesourcery.com>

	* gcc.c (at_file_supplied): New variable.
	(main): Set it if we expanded argv.
	(do_spec_1): Pass an @-file to the linker if we were called with
	an @-file argument and HAVE_GNU_LD.
	* collect2.c (at_file_supplied): New variable.
	(response_file): New variable.
	(collect_exit): Unlink response_file if necessary.
	(handler): Likewise.
	(do_wait): Likewise.
	(main): Set at_file_supplied if we expanded argv.
	(collect_execute): Pass an @-file to subprocesses if we were called
	with an @-file argument.
	* configure.ac: Add define for HAVE_GNU_LD.
	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r124532
2007-05-08 00:37:39 +00:00
Naveen.H.S 44cfab357d muldiv.md (mulhisi3_c): Limit the mode of the 2nd operand to HI mode.
* config/m32c/muldiv.md (mulhisi3_c): Limit the mode of the 2nd
operand to HI mode.
(mulsi3): New.
(divsi3): New.
(udivsi3): New.

From-SVN: r124524
2007-05-07 19:46:02 -04:00
Jayant Sonar 5abd2125f0 m32c.c (SYMBOL_FLAG_FUNCVEC_FUNCTION): Define.
* config/m32c/m32c.c (SYMBOL_FLAG_FUNCVEC_FUNCTION): Define.
(TARGET_ENCODE_SECTION_INFO): Re-define.
(m32c_encode_section_info): New
(function_vector_handler): New
(current_function_special_page_vector): New
(m32c_special_page_vector_p): New.
* config/m32c/m32c-protos.h (m32c_special_page_vector_p): 
Prototype.
* config/m32c/jump.md: Added instruction JSRS for functions 
with attribute "function_vector".
* doc/extend.texi (function_vector): Added description 
for M16C, M32C targets.

From-SVN: r124523
2007-05-07 19:13:15 -04:00
DJ Delorie 3eb5f26faa re PR target/31794 (Problem while compiling gcc for m32c-elf)
PR 31794
* config/m32c/shift.md (ashlpsi3_i, ashrpsi3_i, ashlpsi3,
ashrpsi3, lshrpsi3): Update shift count constraint.

From-SVN: r124521
2007-05-07 18:14:05 -04:00
Danny Smith b187f5cd2f re PR c/22133 (In MinGW trailing slash forward not allowed in include path)
PR 22133
	* c-incpath.c (add_path): Strip trailing path separators.

From-SVN: r124504
2007-05-07 17:41:35 +00:00
Eric Botcazou 4be1caf900 tree-ssa-dom.c (tree_ssa_dominator_optimize): Do not free dominance info after purging EH edges.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Do not free dominance
	info after purging EH edges.
	(eliminate_degenerate_phis): Likewise.

From-SVN: r124499
2007-05-07 12:48:46 +00:00
Eric Botcazou 8d9d65619c tree-ssa-dom.c (tree_ssa_dominator_optimize): Reset cfg_altered.
* tree-ssa-dom.c (tree_ssa_dominator_optimize): Reset cfg_altered.
	Free dominance info before purging EH edges as well as after.
	(eliminate_degenerate_phis): Likewise.
	(propagate_rhs_into_lhs): Set cfg_altered to true instead of 1.

From-SVN: r124498
2007-05-07 11:42:21 +00:00
Jan Hubicka 2cb7995f07 gimplify.c (gimplify_expr): Do not crash when folding (void *)(int)&a + 4.
* gimplify.c (gimplify_expr): Do not crash when folding
	(void *)(int)&a + 4.

From-SVN: r124497
2007-05-07 10:36:09 +00:00
Francois-Xavier Coudert 2f8e3bd7bd re PR driver/31694 (__GFORTRAN__ preprocessor macro)
PR driver/31694
	* c-opts.c (lang_fortran): Make it non static.
	* c-common.h (lang_fortran): New prototype.
	* c-cppbuiltin.c (c_cpp_builtins): Create a __GFORTRAN__ if the
	-lang-fortran option was passed by the driver.

From-SVN: r124495
2007-05-07 05:48:24 +00:00
Ben Elliston 8fa013c3e0 Fix a typo in 2007-05-03 entry from Ian Lance Taylor.
From-SVN: r124489
2007-05-07 11:14:15 +10:00
Eric Botcazou 982533a5b2 timevar.c (timevar_print): Test ENABLE_ASSERT_CHECKING instead of ASSERT_CHECKING.
* timevar.c (timevar_print): Test ENABLE_ASSERT_CHECKING instead
	of ASSERT_CHECKING.  Tweak message.

From-SVN: r124478
2007-05-06 21:21:17 +00:00
Revital Eres 290358f770 Fix PR30957
From-SVN: r124471
2007-05-06 10:35:42 +00:00
Aurelien Jarno a758fa89b5 pa.md: Split tgd_load, tld_load and tie_load into pic and non-pic versions.
* config/pa/pa.md: Split tgd_load, tld_load and tie_load
	into pic and non-pic versions. Mark r19 as used for 
	tgd_load_pic, tld_load_pic and tie_load_pic. Mark r27 as used 
	for tgd_load, tld_load and tie_load .
	* config/pa/pa.c (legitimize_tls_address): Emit pic or non-pic
	version of tgd_load, tld_load and tie_load depending on the 
	value of flag_pic.

From-SVN: r124468
2007-05-06 02:42:36 +00:00
Ulrich Drepper 3fc95619f6 crtstuff.c (HIDDEN_DTOR_LIST_END): New macro.
* crtstuff.c (HIDDEN_DTOR_LIST_END): New macro.
	(__do_global_dtors_aux): Use more paranoid loop to run
	destructors if HIDDEN_DTOR_LIST_END.
	(__DTOR_END__): Export as a hidden symbol when HIDDEN_DTOR_LIST_END.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r124444
2007-05-04 21:20:28 +02:00
Jakub Jelinek 52d53754d1 varasm.c (align_variable): Don't increase alignment for DECL_THREAD_LOCAL_P variables above BITS_PER_WORD...
* varasm.c (align_variable): Don't increase alignment for
	DECL_THREAD_LOCAL_P variables above BITS_PER_WORD through
	DATA_ALIGNMENT or CONSTANT_ALIGNMENT.

From-SVN: r124442
2007-05-04 21:17:57 +02:00
Josh Conner 2b28c07aa7 basic-block.h (cdi_direction): Assign values to all enumeration constants.
2007-05-04  Josh Conner  <jconner@apple.com>

	* basic-block.h (cdi_direction): Assign values to all enumeration
	constants.
	(dom_computed): Remove.
	(dom_info_state): New.
	(set_dom_info_availability): New.
	* tree-ssa-loop-im.c (determine_invariantness): Initialize
	walk_data.dom_direction.
	* cfghooks.c (delete_basic_block): Use dom_info_available_p()
	instead of dom_computed[].
	(split_edge): Likewise.
	(create_basic_block): Likewise.
	(merge_blocks): Likewise.
	* ifcvt.c (find_if_header): Likewise.
	* tree-cfgcleanup.c (cleanup_tree_cfg): Likewise.
	* tree-ssa-dce.c (remove_dead_stmt): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.
	* tree-cfg.c (tree_verify_flow_info): Likewise.
	(remove_edge_and_dominated_blocks): Likewise.
	* dominance.c (dom_computed): Make static.
	(calc_dfs_tree_nonrec): Change third param to a bool.
	(calc_dfs_tree): Change second param to a bool.
	(calc_idioms): Change second param to a bool.  Use
	dom_convert_dir_to_idx.
	(init_dom_info): Validate dir before using.
	(dom_convert_dir_to_idx): New.
	(calculate_dominance_info): Use dom_convert_dir_to_idx.  New
	variable 'reverse' used for calling calc_dfs_tree and calc_idoms.
	(free_dominance_info): Use dom_convert_dir_to_idx.
	(get_immediate_dominator): Likewise.
	(set_immediate_dominator): Likewise.
	(get_dominated_by): Likewise.
	(redirect_immediate_dominators): Likewise.
	(nearest_common_denominator): Likewise.
	(dominated_by_p): Likewise.
	(bb_dom_dfs_in): Likewise.
	(bb_dom_dfs_out): Likewise.
	(recount_dominator): Likewise.
	(iterate_fix_dominators): Likewise.
	(add_to_dominance_info): Likewise.
	(delete_from_dominance_info): Likewise.
	(first_dom_son): Likewise.
	(next_dom_son): Likewise.
	(dom_info_available_p): Likewise.
	(dom_info_state): New.
	(set_dom_info_availability): New.

From-SVN: r124439
2007-05-04 18:08:06 +00:00
Andreas Krebbel b60cb710ba s390.md ("fix_trunc<mode>di2", [...]): Expander removed.
2007-05-04  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("fix_trunc<mode>di2", "fix_trunc<mode>si2"):
	Expander removed.
	("fix_trunc<DSF:mode><GPR:mode>2"): Expander added.

From-SVN: r124433
2007-05-04 16:23:08 +00:00
Bob Wilson b86dee194c xtensa.md (adddi3, [...]): Delete.
* config/xtensa/xtensa.md (adddi3, adddi_carry): Delete.
	(subdi3, subdi_carry): Delete.

From-SVN: r124432
2007-05-04 16:18:19 +00:00
Jan Hubicka 06ea1b8486 opts.c (decode_options): Do not fiddle with inlining parameters in case of optimizing for size.
* opts.c (decode_options): Do not fiddle with inlining
	parameters in case of optimizing for size.
	* ipa-inline.c (cgraph_decide_recursive_inlining): When optimizing
	for size do nothing.
	(cgraph_decide_inlining_of_small_function): When optimizing for
	size never inline functions increasing caller size.
	(cgraph_early_inlining): Inline for size when optimizing for size.

Co-Authored-By: Richard Guenther <rguenther@suse.de>

From-SVN: r124431
2007-05-04 15:32:42 +00:00
Bernd Schmidt e4fae5f757 bfin.md (<optab>di3): Now a define_expand which expands logical operations piecewise.
* config/bfin/bfin.md (<optab>di3): Now a define_expand which expands
	logical operations piecewise.
	(<optab>di_zesidi_di, <optab>di_sesidi_di, negdi2, one_cmpldi2,
	zero_extendsidi2, subdi_di_zesidi, subdi_zesidi_di, subdi_di_sesidi,
	subdi_sesidi_di): Delete.
	(add_with_carry): Produce carry in CC instead of a DREG to shorten
	the generated sequence.  Allow three-reg add in constraints.  Rewrite
	the rtl expression for carry to avoid zero_extend of a constant.
	(sub_with_carry): New pattern.
	(adddi3, subdi3): Change into define_expand.  For subtract, generate a
	different sequence not involving jumps.
	(notbi): Now a named pattern.

From-SVN: r124414
2007-05-04 11:00:00 +00:00
Brad Lucier 80b9cbc955 invoke.texi (i386 and x86-64 Options): Add the note about a significant loss of accuracy of some mathematical routines...
* doc/invoke.texi (i386 and x86-64 Options) [-mpc32, -mpc64, -mpc80]:
        Add the note about a significant loss of accuracy of some
        mathematical routines when these options are used.

From-SVN: r124413
2007-05-04 12:19:31 +02:00
Maxim Kuvyrkov 916fa4f033 haifa-sched.c (rtx_vec_t): New typedef.
* haifa-sched.c (rtx_vec_t): New typedef.
(contributes_to_priority_p): Extract piece of priority () into new
static function.
(priority): Use the function.  Add assertion.
(rank_for_schedule, set_priorities): Add assertion to check that
insn's priority is initialized.
(clear_priorities, calc_priorities): Change signature.  Make it update
all relevant insns.  Update all callers ('add_to_speculative_block ()'
and 'create_block_check_twin ()').
* sched-int.h (struct haifa_insn_data): Remove field 'priority_known'.
Add new field 'priority_status'.
(INSN_PRIORITY_STATUS): New macro.
(INSN_PRIORITY_KNOWN): Change to use INSN_PRIORITY_STATUS.

From-SVN: r124410
2007-05-04 07:21:20 +00:00
Maxim Kuvyrkov b640bd8f20 sched-ebb.c (debug_ebb_dependencies): New static function.
* sched-ebb.c (debug_ebb_dependencies): New static function.
(init_ready_list): Use it.

* sched-rgn.c (debug_dependencies): Split into 'debug_dependencies ()'
with changed signature and 'debug_rgn_dependencies ()'.
(debug_rgn_dependencies): New static function.
(init_ready_list): Use it.
	
* sched-int.h (debug_dependencies): Declare.

From-SVN: r124409
2007-05-04 07:13:28 +00:00
Andreas Krebbel 04749f41af libgcc-std.ver (__ffssi2): Added to GCC_4.3.0 section.
2007-05-04  Andreas Krebbel  <krebbel1@de.ibm.com>

	* libgcc-std.ver (__ffssi2): Added to GCC_4.3.0 section.

From-SVN: r124408
2007-05-04 07:07:47 +00:00
Dirk Mueller 820b51ae16 c.opt (Wmain,ffreestanding): Enable for C++,ObjC++.
2007-05-04  Dirk Mueller  <dmueller@suse.de>

        * c.opt(Wmain,ffreestanding): Enable for C++,ObjC++.

        * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
        not in effect.

From-SVN: r124404
2007-05-04 00:46:02 +00:00
Jan Hubicka ac5a28a64e fold-const.c (fold_unary): Convert (T1)(X op Y) into ((T1)X op (T1)Y)...
* fold-const.c (fold_unary): Convert (T1)(X op Y) into ((T1)X op (T1)Y),
	for pointer type in more cases than before.

	* gimplify.c (gimplify_expr): Fold (void *)&a + 4.

	* tree-object-size.c (plus_expr_object_size): When operand size is
	unknown, return unknown.

From-SVN: r124403
2007-05-04 00:40:20 +00:00
Dirk Mueller d347d4c745 invoke.texi (-m386,-m486,-mpentium,-mpentiumpro): Remove.
2007-05-03  Dirk Mueller  <dmueller@suse.de>

        * doc/invoke.texi (-m386,-m486,-mpentium,-mpentiumpro): Remove.

        * config/i386/i386.h (CC1_CPU_SPEC): Remove handling for deprecated
        options.

        * config/i386/i386.opt (m386,m486,mpentium,mpentiumpro): Remove.

From-SVN: r124400
2007-05-04 00:08:53 +00:00
Janis Johnson ce396345ac * doc/sourcebuild.texi (Test Directives) Clarify dg-excess-errors.
From-SVN: r124392
2007-05-03 21:32:52 +00:00
Joseph Myers 13cc6d1bd3 double.h, [...]: Update from glibc CVS.
* config/soft-fp/double.h, config/soft-fp/extended.h,
	config/soft-fp/floatundidf.c, config/soft-fp/floatundisf.c,
	config/soft-fp/floatunsidf.c, config/soft-fp/floatunsisf.c,
	config/soft-fp/op-2.h, config/soft-fp/op-4.h,
	config/soft-fp/op-common.h, config/soft-fp/quad.h: Update from
	glibc CVS.

From-SVN: r124388
2007-05-03 20:05:39 +01:00
Ian Lance Taylor a45bce6e9f rs6000.c (rs6000_override_options): Don't se MASK_PPC_GFXOPT for 8540 or 8548.
* config/rs6000/rs6000.c (rs6000_override_options): Don't se
	MASK_PPC_GFXOPT for 8540 or 8548.

From-SVN: r124381
2007-05-03 17:37:19 +00:00
Uros Bizjak 98120f628b tree-vect-transform.c (vect_update_inits_of_drs): Use vect_print_dump_info() to output debug information.
* tree-vect-transform.c (vect_update_inits_of_drs): Use
        vect_print_dump_info() to output debug information.

From-SVN: r124380
2007-05-03 16:50:34 +02:00
Uros Bizjak f3ba423529 re PR target/31768 (Invalid code or ICE for %z constraint)
PR target/31768
        * config/i386/i386.c (print_operand) ['z']: Output 'w' for
        operands of size 2 when operand is not MEM_P.

From-SVN: r124379
2007-05-03 16:32:25 +02:00
Zdenek Dvorak e604f56c8f re PR tree-optimization/30565 (ICE with -O1 -ftree-pre -ftree-loop-linear)
PR tree-optimization/30565
	* lambda-code.c (perfect_nestify): Fix updating of dominators.

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

From-SVN: r124378
2007-05-03 13:27:26 +00:00
Bernd Schmidt 314f99131f bfin.md (addpdi3, [...]): New patterns.
* config/bfin/bfin.md (addpdi3, us_truncpdisi2): New patterns.
	(umulsi3_highpart): Use them.
	* config/bfin/lib1funcs.asm (__umulsi3_highpart): Use unsigned move
	for final accumulator to D regisster tranfser.

From-SVN: r124376
2007-05-03 13:17:51 +00:00
Dorit Nuzman cb9ed5d79f re PR middle-end/31699 (-march=opteron -ftree-vectorize generates wrong code)
PR tree-optimization/31699
        * tree-vect-analyze.c (vect_update_misalignment_for_peel): Remove wrong
        code.
        (vect_enhance_data_refs_alignment): Compute peel amount using
        TYPE_VECTOR_SUBPARTS instead of vf.
        * tree-vect-transform.c (vect_gen_niters_for_prolog_loop): Likewise.

From-SVN: r124375
2007-05-03 12:54:45 +00:00
Brooks Moses df58283300 re PR bootstrap/31776 (Bootstrap fails with "error: conflicting types for strsignal")
PR bootstrap/31776
* system.h: Remove inclusion of double-int.h
* tree.h: Include double-int.h
* gengtype.c: Likewise
* cfgloop.h: Likewise
* Makefile.in: Adjust dependencies on double-int.h

From-SVN: r124373
2007-05-02 23:14:52 -07:00
Eric Christopher ae07728488 darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Translate -shared to -Zdynamiclib.
2007-05-02  Eric Christopher  <echristo@apple.com>

	    * config/darwin.h (TARGET_OPTION_TRANSLATE_TABLE): Translate
	    -shared to -Zdynamiclib.

From-SVN: r124372
2007-05-03 02:09:58 +00:00
Seongbae Park ba99296704 re PR c++/31663 (Segfault in constrain_class_visibility with anonymous namespace)
gcc/ChangeLog:
2007-05-02  Seongbae Park  <seongbae.park@gmail.com>

	PR c++/31663
	* c-common.c (strip_pointer_or_array_types): New function.
	* c-common.h (strip_pointer_or_array_types): New function declaration.

gcc/cp/ChangeLog:
2007-05-02  Seongbae Park  <seongbae.park@gmail.com>

	PR c++/31663
	* decl2.c (constrain_class_visibility): 
	Use strip_pointer_or_array_types instead of strip_array_types.

gcc/testsuite/ChangeLog:
2007-05-02  Seongbae Park  <seongbae.park@gmail.com>

	PR C++/31663
	* g++.dg/warn/anonymous-namespace-2.C: New. 
	* g++.dg/warn/anonymous-namespace-2.h: New.

From-SVN: r124363
2007-05-02 23:11:13 +00:00
Zdenek Dvorak e0310afb08 re PR rtl-optimization/31771 (g++.dg/gomp/pr26913.C ICEs)
PR tree-optimization/31771
	* tree-cfg.c (move_block_to_fn): Assign bb to the correct index.

From-SVN: r124362
2007-05-02 22:34:38 +00:00
Paul Brook ad1ec76fea bpabi.S (aeabi_lcmp): Fix result on overflow.
2007-05-02  Paul Brook  <paul@codesourcery.com>

	gcc/
	* config/arm/bpabi.S (aeabi_lcmp): Fix result on overflow.

	gcc/testsuite/
	* gcc.dg/arm-eabi1.c: Move debug output.  Augment lcmp/ulcmp tests.

From-SVN: r124361
2007-05-02 22:16:21 +00:00
Andrew Pinski c5b75e95c0 Forgot to add the PR number to the last changelog entry:
2007-05-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/29715
        * fold-const.c (fold_comparision): Remove the "foo++ == CONST"
        transformation.

From-SVN: r124354
2007-05-02 10:47:50 -07:00
Andrew Pinski 0e3aa12623 fold-const.c (fold_comparision): Remove the "foo++ == CONST" transformation.
2007-05-02  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * fold-const.c (fold_comparision): Remove the "foo++ == CONST"
        transformation.

From-SVN: r124353
2007-05-02 10:47:06 -07:00
Nick Clifton 5271f9bad5 * config/frv/predicates.md (symbolic_operand): Accept CONSTs.
From-SVN: r124352
2007-05-02 17:00:19 +00:00
Richard Guenther f6c5fefc1d re PR tree-optimization/31146 (forwprop does not look through casts)
2007-05-02  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31146
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): New
	argument, single_use_p.  If we have a single use that is
	a conversion to the definition rhs type, propagate that rhs.
	(forward_propagate_addr_expr): Pass single_use_p argument
	to forward_propagate_addr_expr_1.

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

From-SVN: r124349
2007-05-02 09:12:49 +00:00
H.J. Lu 9a60b02d97 i386.c (ix86_expand_sse_comi): Remove unused variable.
2007-05-01  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_expand_sse_comi): Remove unused
	variable.

From-SVN: r124344
2007-05-01 17:37:51 -07:00
Dwarakanath Rajagopal d8f52b0232 invoke.texi: Fix typo, 'AMD Family 10h core' instead of 'AMD Family 10 core'.
2007-05-01  Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>

        * doc/invoke.texi: Fix typo, 'AMD Family 10h core' instead of
	'AMD Family 10 core'.

From-SVN: r124341
2007-05-01 19:53:40 +00:00
Dwarakanath Rajagopal 9369ed9561 Accept k8-sse3, opteron-sse3 and athlon64-sse3 as improved versions of k8,opteron and athlon64 with SSE3 instruction set support
From-SVN: r124340
2007-05-01 19:48:29 +00:00
Dwarakanath Rajagopal 2af6cb38db Tuning 32-byte loop alignment for amdfam10 architecture
From-SVN: r124336
2007-05-01 18:29:39 +00:00
Kazu Hirata b38bab9485 constraints.md: New.
* config/m68k/constraints.md: New.
	* config/m68k/m68k.h (REG_CLASS_FROM_LETTER,
	CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P,
	EXTRA_CONSTRAINT): Remove.
	* config/m68k/m68k.md: Include constraints.md.
	* expr.c (expand_expr_real_1): Copy DECL_RTL before using it.

From-SVN: r124335
2007-05-01 17:54:15 +00:00
Ian Lance Taylor e1f28918ef re PR tree-optimization/31739 (ICE at tree.c:902 compiling g-regexp.adb)
PR tree-optimization/31739
	* tree-vrp.c (vrp_val_is_max): New static function.
	(vrp_val_is_min): New static function.
	(set_value_range_to_value): Use TYPE_{MAX,MIN}_VALUE rather than
	copying the node.
	(set_value_range): Use vrp_val_is_{max,min}.
	(extract_range_from_assert): Likewise.
	(extract_range_from_binary_expr): Likewise.
	(extract_range_from_unary_expr): Likewise.
	(dump_value_range, vrp_meet): Likewise.
	(vrp_visit_phi_node): Likewise.
	* tree.c (build_distinct_type_copy): Revert change of 2007-04-27.

From-SVN: r124334
2007-05-01 17:51:56 +00:00
Mark Mitchell 1d87d70dd0 gmon-sol2.c (size_t): New type.
* config/i386/gmon-sol2.c (size_t): New type.
	(intptr_t): Likewise.
	(s_textsize): Declare as size_t.
	(sbrk): Declare.
	(monstartup): Use size_t for sizes.
	(_mcount): Save and restore registers.
	(internal_mcount): Pass 0 as the first argument to monstartup
	in 64-bit mode.
	(moncontrol): Convert pointer to appropriately sized integer
	before passing to profil.

From-SVN: r124333
2007-05-01 17:51:21 +00:00
Joseph Myers b26941b46a darwin-ldouble.c (__gcc_qunord): Define if __NO_FPRS__, not just if _SOFT_DOUBLE.
* config/rs6000/darwin-ldouble.c (__gcc_qunord): Define if
	__NO_FPRS__, not just if _SOFT_DOUBLE.
	* config/rs6000/libgcc-ppc-glibc.ver (__gcc_qunord): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_libfuncs): Use __gcc_qunord
	also for E500 double.
	* config/rs6000/rs6000.md (buneq, bunge, bungt, bunle, bunlt,
	suneq, sunge, sungt, sunle, sunlt): Disable for (TARGET_HARD_FLOAT
	&& !TARGET_FPRS).

From-SVN: r124332
2007-05-01 18:41:48 +01:00
Richard Guenther ae2cf11b91 tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt is NULL.
2007-05-01  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-loop-manip.c (ip_normal_pos): Check if last stmt
 	is NULL.

From-SVN: r124329
2007-05-01 14:54:30 +00:00
Joseph Myers 037ab18d88 * config/rs6000/libgcc-ppc-glibc.ver (__gcc_qgt): Fix typo.
From-SVN: r124328
2007-05-01 14:44:56 +01:00
Jan Hubicka 617428e9f6 tree-vectorize.c (vect_is_simple_use): gimple_min_invariant is invariant.
* tree-vectorize.c (vect_is_simple_use): gimple_min_invariant is
	invariant.

From-SVN: r124324
2007-05-01 11:19:59 +00:00
Jan Hubicka fe9821b88c tree.h (maybe_fold_offset_to_component_ref): Remove.
* tree.h (maybe_fold_offset_to_component_ref): Remove.
	(maybe_fold_offset_to_reference): Declare.
	* fold-const.c (fold_unary): Do not fold
	(type *)&A into &A->field_of_type_and_offset_0
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): When base type
	size is unknown, give up.
	(maybe_fold_offset_to_component_ref): Ignore firelds with unknown
	offsets.
	(maybe_fold_offset_to_reference): New.
	(maybe_fold_stmt_indirect): Use it.
	(fold_stmt_r): Fold (type *)&A+offset into A->field_if_type_and_offset.
	* gimplify.c (gimplify_conversion): Canonicalize conversions to
	field references.
	(gimplify_expr): Likewise for plus_expr.

From-SVN: r124323
2007-05-01 11:18:01 +00:00
Zdenek Dvorak 8b11009bad tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Use bsi_after_labels.
* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Use
	bsi_after_labels.  Always insert statements before bsi.
	* tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto.
	* predict.c (apply_return_prediction): Check for empty blocks.
	* cfgexpand.c (lab_rtx_for_bb): New variable.
	(label_rtx_for_bb): Do not create new tree labels.
	(expand_gimple_basic_block): Add labels recorded in lab_rtx_for_bb.
	(tree_expand_cfg): Initialize lab_rtx_for_bb.
	* tree-cfg.c (build_tree_cfg): Call cleanup_dead_labels after
	creating edges.
	(label_for_bb): Add field used.
	(update_eh_label, main_block_label): Mark the label used.
	(cleanup_dead_labels): Remove unused labels.

From-SVN: r124322
2007-05-01 10:17:43 +00:00
Richard Guenther f5052e291a tree-vrp.c (set_value_range): Do not allocate equiv bitmap if it is not about to be set.
2007-05-01  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (set_value_range): Do not allocate equiv bitmap
	if it is not about to be set.
	(get_value_range): Do not pre-allocate equiv bitmap.
	(update_value_range): No need to clear equiv field.
	(add_equivalence): Change prototype to get bitmap pointer.
	Allocate bitmap here if it is not already.
	(extract_range_from_assert): Do not allocate bitmap here.
	Update callers to add_equivalence.
	(extract_range_from_ssa_name): Likewise.
	(get_vr_for_comparison): New static helper.
	(compare_name_with_value): Handle NULL equiv bitmap by
	peeling the first iteration of the comparison loop.
	Use get_vr_for_comparison.
	(compare_names): Handle NULL equiv bitmaps by using fake
	ones.  Use get_vr_for_comparison.

From-SVN: r124321
2007-05-01 09:32:34 +00:00
Brooks Moses e4fd22c6d5 double-int.c (mpz_set_double_int): Moved from tree-ssa-loop-niter.c.
* double-int.c (mpz_set_double_int): Moved from
tree-ssa-loop-niter.c.
(mpz_get_double_int): Likewise; also, add option to wrap
out-of-range integers.
* double-int.h: New prototypes for above.
* tree.c (get_static_type_bounds): Moved from
tree-ssa-loop-niter.c; now returns TYPE_MIN_VALUE and
TYPE_MAX_VALUE if they exist..
* tree.h: New prototype for above.
* tree-ssa-loop-niter.c: Adjust mpz_to_double_int and
get_type_bounds calls.
(mpz_set_double_int): Move to double-int.c.
(get_type_bounds): Move to tree.c, rename to
get_static_type_bounds.
(mpz_to_double_int): Move to double-int.c, rename to
mpz_get_double_int.

From-SVN: r124304
2007-04-30 12:14:04 -07:00
Bob Wilson 0a21c1d2ba lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that DIV0 exception can fall through to a normal return.
* config/xtensa/lib1funcs.asm (__umodsi3, __modsi3): Rearrange so that
	DIV0 exception can fall through to a normal return.

From-SVN: r124303
2007-04-30 17:59:10 +00:00
Alexandre Oliva 143569a85c re PR middle-end/22156 (bit-field copying regressed)
PR middle-end/22156
Temporarily revert:
2007-04-06  Andreas Tobler  <a.tobler@schweiz.org>
2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
* tree-sra.c (try_instantiate_multiple_fields): Needlessly
initialize align to silence bogus warning.
2007-04-05  Alexandre Oliva  <aoliva@redhat.com>
* tree-sra.c (struct sra_elt): Add in_bitfld_block.  Remove
all_no_warning.
(struct sra_walk_fns): Remove use_all parameter from use.
(sra_hash_tree): Handle BIT_FIELD_REFs.
(sra_elt_hash): Don't hash bitfld blocks.
(sra_elt_eq): Skip them in parent compares as well.  Handle
BIT_FIELD_REFs.
(sra_walk_expr): Don't maintain or pass down use_all_p.
(scan_use): Remove use_all parameter.
(scalarize_use): Likewise.  Re-expand assignment to
BIT_FIELD_REF of gimple_reg.  De-scalarize before input or
output, and re-scalarize after output.  Don't mark anything
for no warning.
(scalarize_ldst): Adjust.
(scalarize_walk_gimple_modify_statement): Likewise.
(build_element_name_1): Handle BIT_FIELD_REFs.
(instantiate_element): Don't warn for any element whose parent
is used as a whole.
(instantiate_missing_elements_1): Return the sra_elt.
(canon_type_for_field): New.
(try_instantiate_multiple_fields): New.
(instantiate_missing_elemnts): Use them.
(mark_no_warning): Removed.
(generate_one_element_ref): Handle BIT_FIELD_REFs.
(REPLDUP, sra_build_elt_assignment): New.
(generate_copy_inout): Use them.
(generate_element_copy): Likewise.  Handle bitfld differences.
(generate_element_zero): Don't recurse for blocks.  Use
sra_build_elt_assignment.
(generate_one_element_int): Take elt instead of var.  Use
sra_build_elt_assignment.
(generate_element_init_1): Adjust.
(scalarize_use, scalarize_copy): Use REPLDUP.
(scalarize_ldst): Move assert before dereference.
(dump_sra_elt_name): Handle BIT_FIELD_REFs.

From-SVN: r124302
2007-04-30 17:41:11 +00:00
Andrew Pinski ab44f2818c [multiple changes]
2007-04-30  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C++/31721
        * tree.c (reconstruct_complex_type): Reconstruct a reference
        correctly.
        Also use the same mode for the pointer as the old pointer type.
2007-04-30  Andrew pinski  <andrew_pinski@playstation.sony.com>

        PR C++/31721
        * g++.dg/ext/vector7.C: New testcase.

From-SVN: r124300
2007-04-30 10:01:18 -07:00
Francois-Xavier Coudert a19632d4f9 trouble.texi (Interoperation): Remove note about Ultrix Fortran compiler.
* doc/trouble.texi (Interoperation): Remove note about Ultrix
	Fortran compiler.

From-SVN: r124292
2007-04-30 07:54:41 +00:00
Zdenek Dvorak 8d6e09d988 changelog entry fix.
From-SVN: r124284
2007-04-29 17:34:11 +00:00
Zdenek Dvorak 268886f3b8 df-scan.c (record_nonlocal_goto_receiver_defs): New function.
* df-scan.c (record_nonlocal_goto_receiver_defs): New function.
	(df_refs_record): Call it.

From-SVN: r124283
2007-04-29 17:33:34 +00:00
Bernd Schmidt 26c5953d27 rtl.def (SS_ABS): New code.
* rtl.def (SS_ABS): New code.
	* config/bfin/bfin.c (print_operand): New modifier 'v'.
	(enum bfin_builtins): Add BFIN_BUILTIN_SUM_2X16, BFIN_BUILTIN_ABS_1x32,
	BFIN_BUILTIN_ROUND_1x32, BFIN_BUILTIN_MULT_1x32x32,
	BFIN_BUILTIN_MULT_1x32x32NS, BFIN_BUILTIN_SSASHIFT_1x32.
	(bfin_init_builtins): Define them.
	(bdesc_1arg, bdesc_2arg): Add some of them here, ...
	(bfin_expand_builtin): ... and handle the others here.
	* config/bfin/bfin.md (ssabssi2, ssroundsi2, ssashiftsi3,
	flag_mul_macv2hi_parts_acconly_andcc0): New patterns.
	(ss_absv2hi2): Renamed from absv2hi; use ss_abs code.
	(ssashiftv2hi3, ssashifthi3, lshiftv2hi3, lshifthi3): Shift count
	operand is only HImode.

From-SVN: r124280
2007-04-29 13:22:04 +00:00
Steven Bosscher 88250695a7 regclass.c (scan_one_insn): Remove splitting of two address insns.
* regclass.c (scan_one_insn): Remove splitting of
        two address insns.

From-SVN: r124277
2007-04-29 11:47:11 +00:00
Sandra Loosemore 64e7e23811 mips.h (SLOW_BYTE_ACCESS): Turn off for MIPS16.
2007-04-28  Sandra Loosemore  <sandra@codesourcery.com>
	    Nigel Stephens  <nigel@mips.com>

	gcc/
	* config/mips/mips.h (SLOW_BYTE_ACCESS): Turn off for MIPS16.

Co-Authored-By: Nigel Stephens <nigel@mips.com>

From-SVN: r124261
2007-04-28 13:47:28 -04:00
Jan Hubicka 55e092c4d0 alpha.c (alpha_output_mi_thunk_osf): Use insn_locators_alloc instead of insn_locators_initialize...
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Use
	insn_locators_alloc instead of insn_locators_initialize;
	call reset_block_changes.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* config/sh/sh.c (sparc_output_mi_thunk): Likewise.
	* config/is64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/score/score.c (th_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block):
	tolerate uninitialized locator info.

	Re-apply:
	* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124258
2007-04-28 08:20:08 +00:00
Zdenek Dvorak 3722506a9e tree-cfg.c (move_block_to_fn): Release bb from dominance info.
* tree-cfg.c (move_block_to_fn): Release bb from dominance
	info.  Update last_basic_block correctly.

From-SVN: r124257
2007-04-28 08:00:44 +00:00
Kaz Kojima eb996a4ac9 re PR target/31701 (SH: wrong epilogue for sibling calls)
PR target/31701
	* config/sh/sh.c (output_stack_adjust): Avoid using the frame
	register itself to hold the offset constant.  Tell flow the use
	of r4 and r5 when they are used.

From-SVN: r124248
2007-04-28 00:07:40 +00:00
Richard Guenther 113ab41c05 tree-ssa-forwprop.c (forward_propagate_into_cond): Keep track if we simplified anything.
2007-04-27  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-forwprop.c (forward_propagate_into_cond): Keep track
	if we simplified anything.
	(tree_ssa_forward_propagate_single_use_vars): Defer overflow
	warnings until we did a simplification and the stmt was not
	marked as TREE_NO_WARNING.

From-SVN: r124242
2007-04-27 21:50:04 +00:00
Mike Stump bfa455647c * config/rs6000/darwin.h (ALWAYS_PUSH_CONSTS_USING_REGS_P): Remove.
From-SVN: r124240
2007-04-27 21:36:34 +00:00
Ian Lance Taylor 093b203ba9 re PR middle-end/31710 (ICE in in set_value_range, at tree-vrp.c:278)
./:	PR middle-end/31710
	* tree.c (build_distinct_type_copy): If TYPE_MIN_VALUE or
	TYPE_MAX_VALUE exist, convert them to the new type.
testsuite/:
	PR middle-end/31710
	* gcc.c-torture/compile/pr31710.c: New test.

From-SVN: r124237
2007-04-27 20:47:24 +00:00
Zdenek Dvorak 30251f7a3a tree-cfgcleanup.c (cleanup_tree_cfg): Verify dominance info if it claims to be available.
* tree-cfgcleanup.c (cleanup_tree_cfg): Verify dominance info
	if it claims to be available.
	* tree-ssa-dce.c (remove_dead_stmt): Mark cfg as altered when
	edge is redirected.
	(perform_tree_ssa_dce): Always free postdominators.

From-SVN: r124236
2007-04-27 20:40:26 +00:00
Richard Henderson 48f46219bd predicates.md (aligned_memory_operand): Mark as define_special_predicate.
* config/alpha/predicates.md (aligned_memory_operand): Mark
        as define_special_predicate.
        (unaligned_memory_operand, normal_memory_operand): Likewise.
        (reg_or_unaligned_mem_operand): Remove.
        (any_memory_operand): Match the documentation and check for
        non-renumbered pseudos during reload.
        * config/alpha/alpha.c (alpha_secondary_reload): Rename from
        alpha_secondary_reload_class, update to new interface, make static.
        Handle CQImode like HImode.  Remove FP subreg check.
        (alpha_expand_mov): Use replace_equiv_address.
        (alpha_expand_mov_nobwx): Use any_memory_operand.
        (TARGET_SECONDARY_RELOAD): New.
        * config/alpha/alpha.h (SECONDARY_INPUT_RELOAD_CLASS): Remove.
        (SECONDARY_OUTPUT_RELOAD_CLASS): Remove.
        * config/alpha/sync.md (I12MODE, I48MODE, modesuffix): Move ...
        * config/alpha/alpha.md: ... here.
        (RELOAD12, reloadmode): New.
        (movcqi): New.
        (reload_in<RELOAD12>): Macro-ize from reload_inqi, reload_inhi.
        Don't handle the aligned case here.
        (reload_out<RELOAD12>): Macro-ize from reload_outqi, reload_outhi.
        (reload_in<I12MODE>_aligned): Macro-ize from reload_inqi_help,
        reload_inhi_help.  Don't expect a scratch register.
        (reload_out<I12MODE>_aligned): Macro-ize from reload_outqi_help,
        reload_outhi_help.
        * config/alpha/alpha-protos.h (alpha_secondary_reload_class): Remove.

From-SVN: r124220
2007-04-27 07:47:57 -07:00
Richard Guenther 64e8a9f04e tree-ssa-forwprop.c (get_prop_dest_stmt): Fix comment typo.
2007-04-27  Richard Guenther  <rguenther@suse.de>
  
        * tree-ssa-forwprop.c (get_prop_dest_stmt): Fix comment typo.

From-SVN: r124218
2007-04-27 13:45:54 +00:00
Richard Guenther 3aef2dbd2e re PR tree-optimization/30965 (Fails to tree-combine conditions in COND_EXPRs)
2007-04-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/30965
	PR tree-optimization/30978
	* Makefile.in (tree-ssa-forwprop.o): Depend on $(FLAGS_H).
        * tree-ssa-forwprop.c (forward_propagate_into_cond_1): Remove.
        (find_equivalent_equality_comparison): Likewise.
        (simplify_cond): Likewise.
        (get_prop_source_stmt): New helper.
        (get_prop_dest_stmt): Likewise.
	(can_propagate_from): Likewise.
	(remove_prop_source_from_use): Likewise.
        (combine_cond_expr_cond): Likewise.
        (forward_propagate_comparison): New function.
        (forward_propagate_into_cond): Rewrite to use fold for
        tree combining.
	(tree_ssa_forward_propagate_single_use_vars): Call
	forward_propagate_comparison to propagate comparisons.

	* gcc.dg/tree-ssa/pr30978.c: New testcase.
	* gcc.dg/tree-ssa/bool-3.c: Remove XFAIL, explain why.
	* gcc.dg/tree-ssa/ssa-fre-4.c: Use char instead of bool
	* gcc.dg/strict-overflow-5.c: Adjust tree dump scanning.

From-SVN: r124217
2007-04-27 13:43:42 +00:00
Richard Guenther 891fc5e9f1 re PR tree-optimization/31715 (Array calculation done incorrectly)
2007-04-27  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31715
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Make
	sure to do computation on the offset in an appropriate
	signed type.

	* gcc.dg/Warray-bounds-4.c: New testcase.

From-SVN: r124216
2007-04-27 11:42:43 +00:00
Richard Sandiford 8c74fb06c6 reload.h (elimination_target_reg_p): Declare.
gcc/
	* reload.h (elimination_target_reg_p): Declare.
	* reload.c (find_reloads): Don't apply the reg_rtx move
	optimization if the SET_DEST satisfies elimination_target_reg_p.
	* reload1.c (elimination_target_reg_p): New function.
	(gen_reload): In the move/add2 fallback, make sure that op0
	does not overlap the destination register.

From-SVN: r124215
2007-04-27 11:39:47 +00:00
Zdenek Dvorak a9b77cd1f7 tree-ssa-loop-im.c (determine_invariantness_stmt): Attempt to transform only GIMPLE_MODIFY_STMTs.
* tree-ssa-loop-im.c (determine_invariantness_stmt): Attempt to
	transform only GIMPLE_MODIFY_STMTs.
	* tree-complex.c (expand_complex_operations_1): Ditto.
	(expand_complex_div_wide): Do not create gotos in COND_EXPR branches.
	* tree-ssa-loop-manip.c (build_if_stmt): Removed.
	(tree_transform_and_unroll_loop): Do not create gotos in COND_EXPR
	branches.
	* value-prof.c (tree_divmod_fixed_value, tree_mod_pow2,
	tree_mod_subtract, tree_ic, tree_stringop_fixed_value): Ditto.
	* omp-low.c (expand_parallel_call, expand_omp_for_generic,
	expand_omp_for_static_chunk, expand_omp_for_static_nochunk): Ditto.
	* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes,
	slpeel_add_loop_guard): Ditto.
	* tree-mudflap.c (mf_build_check_statement_for): Ditto.
	* lambda-code.c (perfect_nestify): Ditto.
	* tree-iterator.c (tsi_split_statement_list_before): Fix splitting
	before the first statement.
	* tree-optimize.c (execute_free_datastructures): Fix comments.
	(execute_free_cfg_annotations): Do not call disband_implicit_edges.
	* tree-flow.h (disband_implicit_edges): Declaration removed.
	* tree-cfg.c (make_cond_expr_edges): Remove gotos from COND_EXPR
	branches.
	(cleanup_dead_labels, tree_redirect_edge_and_branch): Handle COND_EXPRs
	without gotos.
	(disband_implicit_edges, has_label_p): Removed.
	(tree_verify_flow_info): Verify that COND_EXPR branches are empty.
	(tree_lv_add_condition_to_bb): Do not create gotos in COND_EXPR
	branches.
	* tree.c (build3_stat): Mark COND_EXPRs used as statements as having
	side effects.
	* tree-pretty-print.c (dump_implicit_edges): Dump implicit edges
	also for COND_EXPRs.
	* cfgexpand.c (label_rtx_for_bb): New function.
	(expand_gimple_cond_expr): Do not expect gotos in COND_EXPR branches.
	Use label_rtx_for_bb to find the labels.
	(expand_gimple_basic_block): Remove RETURN_EXPR at the end of the
	last block.  Detect fallthru edges.

From-SVN: r124214
2007-04-27 08:20:39 +00:00
Ian Lance Taylor f5c3dc96c3 re PR target/28675 (ICE in extract_insn, at recog.c:2084 (unrecognizable insn) [arm])
gcc/:
	PR target/28675
	* reload.c (find_reloads_subreg_address): If the address was valid
	in the original mode but not in the new mode, reload the whole
	address.
testsuite/:
	PR target/28675
	* gcc.c-torture/compile/pr28675.c: New test.

From-SVN: r124211
2007-04-27 04:11:47 +00:00
Zdenek Dvorak 672987e82f tree-cfgcleanup.c (cfgcleanup_altered_bbs): New global variable.
* tree-cfgcleanup.c (cfgcleanup_altered_bbs): New global variable.
	(remove_fallthru_edge): Use remove_edge_and_dominated_blocks.
	(cleanup_control_expr_graph): Do not invalidate dominance info.
	Record altered blocks.
	(cleanup_control_flow, cleanup_forwarder_blocks): Removed.
	(cleanup_control_flow_bb, split_bbs_on_noreturn_calls,
	cleanup_tree_cfg_bb): New functions.
	(remove_forwarder_block): Do not maintain the worklist of blocks.
	Record altered blocks.
	(cleanup_tree_cfg_1): Iterate over cfgcleanup_altered_bbs,
	not over whole cfg.
	(cleanup_tree_cfg): Do not iterate cleanup_tree_cfg_1.  Only call
	delete_unreachable_blocks if dominators are not available.
	* tree-inline.c (optimize_inline_calls): Free dominance information
	earlier.
	* tree-flow.h (remove_edge_and_dominated_blocks,
	cfgcleanup_altered_bbs): Altered.
	* tree-cfg.c (replace_uses_by, tree_merge_blocks): Record altered
	blocks.
	(get_all_dominated_blocks, remove_edge_and_dominated_blocks): New
	functions.
	(tree_purge_dead_eh_edges): Use remove_edge_and_dominated_blocks,
	do not invalidate dominators.

From-SVN: r124203
2007-04-26 23:13:41 +00:00
Anatoly Sokolov dd3b6c09ea avr.c (avr_mcu_types): Add support for ATmega8HVA and ATmega16HVA devices.
* config/avr/avr.c (avr_mcu_types): Add support for ATmega8HVA and 
	ATmega16HVA devices. Move AT90USB82 device to 'avr5' architecture.
	* config/avr/avr.h (LINK_SPEC, CRT_BINUTILS_SPECS): (Ditto.).
	* config/avr/t-avr (MULTILIB_MATCHES): (Ditto.).

From-SVN: r124198
2007-04-27 01:02:43 +04:00
Steve Ellcey 6107a6aef1 * config/ia64/ia64.md (ip_value): Fix itanium_class attribute.
From-SVN: r124194
2007-04-26 19:37:06 +00:00
Richard Guenther 5c7ec4f0d5 re PR tree-optimization/31703 (Gcc 4.3 revision 124101 failed to compile gcc 3.2)
2007-04-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/31703
	* tree-ssa-loop-im.c (rewrite_bittest): Make sure to use
	the right type for the target of the bittest.

	* gcc.c-torture/compile/pr31703.c: New testcase.
	* gcc.dg/tree-ssa/ssa-lim-1.c: Adjust pattern.
	* gcc.dg/tree-ssa/ssa-lim-2.c: Likewise.

From-SVN: r124190
2007-04-26 15:28:14 +00:00
Richard Sandiford 02cba8dfe4 vx-common.h (RETURN_IN_MEMORY): Use ix86_sol10_return_in_memory.
gcc/
	* config/i386/vx-common.h (RETURN_IN_MEMORY): Use
	ix86_sol10_return_in_memory.

From-SVN: r124185
2007-04-26 12:25:42 +00:00
Richard Sandiford e797f7e150 i386.c (ix86_sol10_return_in_memory): Remove unused variables.
gcc/
	* config/i386/i386.c (ix86_sol10_return_in_memory): Remove unused
	variables.

From-SVN: r124183
2007-04-26 10:43:39 +00:00
Jakub Jelinek 6f7195603e re PR c++/31598 (g++ does not accept some OpenMP code)
PR c++/31598
	* tree-inline.c (copy_body_r): Don't touch TREE_TYPE of OMP_CLAUSE.

	* semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
	for type dependent OMP_CLAUSE_DECLs.

	* g++.dg/gomp/pr31598.C: New test.

From-SVN: r124178
2007-04-26 09:32:27 +02:00
Jakub Jelinek e0eb05eaa1 re PR tree-optimization/30558 (ICE with OpenMP and exceptions)
PR tree-optimization/30558
	* tree-eh.c (lower_eh_filter): If EH_FILTER_MUST_NOT_THROW
	clear this_state.prev_try.

	* g++.dg/gomp/pr30558.C: New test.

From-SVN: r124177
2007-04-26 09:29:46 +02:00
Richard Sandiford 29173496a0 200x-xx-xx Richard Sandiford <richard@codesourcery.com> Mark Mitchell <mark@codesourcery.com>
gcc/
200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
	    Mark Mitchell  <mark@codesourcery.com>

	* config/i386/i386-protos.h (ix86_sol10_return_in_memory): Declare.
	* config/i386/i386.c (ix86_sol10_return_in_memory): New function.
	* config/i386/sol2-10.h (RETURN_IN_MEMORY): Use it.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r124176
2007-04-26 07:22:14 +00:00
Richard Sandiford a0f8745469 re PR driver/31107 (--target-help doesn't say which options are compiler, assembler or linker options)
gcc/
	PR driver/31107
	* doc/invoke.texi (%:print-asm-header): Document.
	* gcc.c (asm_options): Use %:print-asm-header() for --target-help
	and -ftarget-help.
	(static_spec_functions): Add print-asm-header.
	(main): Print a banner before the --target-help linker options.
	(print_asm_header_spec_function): New function.

From-SVN: r124175
2007-04-26 07:15:41 +00:00
Kaz Kojima 6b2eeb54e0 re PR target/31403 (wrong branch instructions generated with -m2a on sh-elf)
PR target/31403
	* config/sh/sh.md (movsi_ie): Fix length for TARGET_SH2A.
	(movsf_ie): Likewise.

From-SVN: r124171
2007-04-26 00:29:54 +00:00
Paolo Carlini b29441ec79 semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
gcc/cp
2007-04-25  Paolo Carlini  <pcarlini@suse.de>

	* semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
	per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
	(trait_expr_value): Adjust.

gcc/testsuite/
2007-04-25  Paolo Carlini  <pcarlini@suse.de>

	* g++.dg/ext/has_nothrow_assign.C: Adjust per N2255.

gcc/
2007-04-25  Paolo Carlini  <pcarlini@suse.de>

	* doc/extend.texi ([Type Traits]): Adjust per N2255.

From-SVN: r124170
2007-04-25 23:55:11 +00:00
Bob Wilson a2c2290b62 lib1funcs.asm (__udivsi3, __divsi3): Throw an exception for divide-by-zero.
* config/xtensa/lib1funcs.asm (__udivsi3, __divsi3): Throw an exception
        for divide-by-zero.
        (__umodsi3, __modsi3): Likewise.

From-SVN: r124165
2007-04-25 21:40:42 +00:00
Dirk Mueller aa86a51b89 c-common.c (handle_sentinel_attribute): Annotate warning call with OPT_Wattributes.
* c-common.c (handle_sentinel_attribute): Annotate warning
       call with OPT_Wattributes.

From-SVN: r124163
2007-04-25 18:59:17 +00:00
Dirk Mueller d1c2effe9a tree-ssa.c ((warn_uninit): Annotate warning with -Wuninitialized.
* tree-ssa.c ((warn_uninit): Annotate warning with
       -Wuninitialized.

From-SVN: r124161
2007-04-25 18:45:39 +00:00
Dirk Mueller 253a697e66 c-typeck.c (build_compound_expr): Annotate warning() call with OPT_Wunused_value.
2007-04-25  Dirk Mueller  <dmueller@suse.de>

       * c-typeck.c (build_compound_expr): Annotate warning()
       call with OPT_Wunused_value.

From-SVN: r124160
2007-04-25 18:44:07 +00:00
Thiemo Seufer 500fc42586 mips.opt (mdmx, [...]): New options.
* config/mips/mips.opt (mdmx, mmt, mno-mdmx): New options.
	(mips16): Fix typo.
	* config/mips/mips.h (ASM_SPEC): Pass -mmt/-mno-mt and -mdmx/-mno-mdmx
	on to the assembler.  Improve handling of -mno-mips16.  Add handling
	of -mno-mips3d, -mno-dsp, -mno-dspr2.
	* doc/invoke.texi (MIPS Options): Whitespace cleanup.  Fix wrong use
	of @itemx.  Document -mno-dsp, -mno-dspr2, -mno-paired-single, -mdmx,
	-mno-mdmx, -mno-mips3d, -mmt and -mno-mt.

From-SVN: r124153
2007-04-25 12:05:48 +00:00
Danny Smith 4b07e9f774 winnt.c (i386_pe_file_end): Strip only USER_LABEL_PREFIX when writing export name.
* config/i386/winnt.c (i386_pe_file_end): Strip only
	USER_LABEL_PREFIX when writing export name.

From-SVN: r124149
2007-04-25 10:06:28 +00:00
Richard Sandiford f5c7290e1e config.gcc (sh-wrs-vxworks): Don't include dbxelf.h.
gcc/
	* config.gcc (sh-wrs-vxworks): Don't include dbxelf.h.  Include
	sh/elf.h, vx-common.h and vxworks.h.
	* config/sh/sh.h: Include config/vxworks-dummy.h.
	(SUBTARGET_OVERRIDE_OPTIONS): Define.
	(OVERRIDE_OPTIONS): Use it.
	* config/sh/sh.md (GOTaddr2picreg): Add suport for VxWorks RTPs.
	(vxworks_picreg): New pattern.
	* config/sh/vxworks.h (TARGET_OS_CPP_BUILTINS): Use
	VXWORKS_OS_CPP_BUILTINS.
	(LIB_SPEC, LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Redefine
	to their VXWORKS_* equivalents.
	(SUBTARGET_OVERRIDE_OPTIONS, SUBTARGET_CPP_SPEC): Define.
	(SUBTARGET_LINK_EMUL_SUFFIX, FUNCTION_PROFILER): Define.
	* config/sh/lib1funcs.asm (NO_FPSCR_VALUES): Define for VxWorks PIC.
	(set_fpscr, ic_invalidate): Add VxWorks PIC sequences.
	* config/sh/t-vxworks (MULTILIB_OPTIONS): Add m4a, -mrtp and
	-mrtp/-fPIC multilibs.
	(MULTILIB_EXCEPTIONS): Generalize globs accordingly.
	(MULTILIB_MATCHES, EXTRA_MULTILIB_PARTS): Define.
	(MULTILIB_OSDIRNAMES): Delete.

From-SVN: r124145
2007-04-25 08:03:55 +00:00
Anatoly Sokolov 5178d50ab6 re PR target/18989 (A few potentially ominous, and several likely harmless warnings during 4.0 build)
PR target/18989
 	* config/avr/avr.h (ASM_OUTPUT_ALIGN): Redefine.

From-SVN: r124141
2007-04-25 10:18:33 +04:00
Brooks Moses 205a4d09ca real.c (mpfr_from_real): Handle Inf and NaN, and allow the rounding mode to be specified by the caller.
* real.c (mpfr_from_real): Handle Inf and NaN, and allow the
rounding mode to be specified by the caller.
(real_to_mpfr) Likewise.
* real.h: Update mpfr_from_real, mpfr_to_real prototypes to
include new arguments.
* builtins.c: Update mpfr_from_real, mpfr_to_real calls.

From-SVN: r124139
2007-04-24 19:12:47 -07:00
Ian Lance Taylor 8cf781f088 re PR tree-optimization/31605 (VRP eliminates a useful test due with conversion from unsigned int to int)
./:	PR tree-optimization/31605
	* tree-vrp.c (set_value_range): Check that min and max are not
	both overflow infinities.
	(set_value_range_to_value): New static function.
	(extract_range_from_binary_expr): Call set_value_range_to_value.
	(extract_range_from_cond_expr): Likewise.
	(extract_range_from_expr): Likewise.
	(extract_range_from_unary_expr): Likewise.  Don't create a range
	which overflows on both sides.
	(vrp_meet): Check for a useless range.
	(vrp_visit_phi_node): If we see a constant which looks like an
	overflow infinity, turn off the TREE_OVERFLOW flag.
testsuite/:
	PR tree-optimizatoin/31605
	* gcc.c-torture/execute/pr31605.c: New test.

From-SVN: r124128
2007-04-24 22:24:01 +00:00
Ian Lance Taylor 1965dd3a1f * flow.c (elim_reg_cond): Handle a comparison of a subreg.
From-SVN: r124122
2007-04-24 21:02:21 +00:00
Simon Martin 438d798f12 re PR middle-end/25923 ([gfortran] garbled diagnostics with -O -Wuninitialized)
2007-04-24  Simon Martin  <simartin@users.sourceforge.net>

	PR diagnostic/25923
	* tree-pass.h (TDF_DIAGNOSTIC): New dump control to specify that a
	diagnostic message is being built.
	* tree-pretty-print.c (dump_generic_node): Only write the formatted text
	into BUFFER's stream if we are not building a diagnostic message.
	* toplev.c (default_tree_printer): Pass TDF_DIAGNOSTIC to
	dump_generic_node.
	* Makefile.in (toplev.o): Depend on tree-pass.h.

From-SVN: r124121
2007-04-24 20:52:16 +00:00
Ian Lance Taylor 4df28528f6 re PR tree-optimization/31602 (Overflow warning causes GDB -Werror build failure)
./:	PR tree-optimization/31602
	* tree-ssa-loop-ch.c (copy_loop_headers): Set TREE_NO_WARNING for
	conditionals in the copied loop header.
	* tree-cfg.c (fold_cond_expr_cond): Don't issue undefined overflow
	warnings if TREE_NO_WARNING is set.
	* doc/invoke.texi (Warning Options): Clarify that
	-Wstrict-overflow does not warn about loops.
testsuite/:
	PR tree-optimization/31602
	* gcc.dg/Wstrict-overflow-11.c: We no longer issue a warning.

From-SVN: r124120
2007-04-24 20:44:45 +00:00
Janis Johnson 2d83f07035 rs6000.c (function_arg_advance): For 32-bit ELF ABI...
* config/rs6000/rs6000.c (function_arg_advance): For 32-bit ELF ABI,
	expand on the comment about _Decimal128 arguments and check the
	integer result of the modulus operation; for 64-bit ELF ABI, ensure
	that _Decimal128 argument uses even/odd register pair.
	(function_arg): For 32-bit ELF ABI, expand on the comment about
	_Decimal128 arguments and check the integer result of the modulus
	operation; for 64-bit ELF ABI, ensure that _Decimal128 argument
	uses even/odd register pair.
testsuite/
	* gcc.target/powerpc/ppc32-abi-dfp-1.c: New test.
	* gcc.target/powerpc/ppc64-abi-dfp-1.c: New test.

From-SVN: r124116
2007-04-24 19:29:34 +00:00
Hui-May Chang b883ab57fa reload1.c (merge_assigned_reloads): Do not merge a RELOAD_OTHER instruction with a RELOAD_FOR_OPERAND_ADDRESS...
2007-04-24  Hui-May Chang <hm.chang@apple.com>

	* reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
	instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.

	* gcc.target/i386/reload-1.c. New.

From-SVN: r124115
2007-04-24 19:17:22 +00:00
Olga Golovanevsky 8173746830 fix for PR31617
From-SVN: r124109
2007-04-24 15:54:18 +00:00
Richard Henderson 5fb54b9198 libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from IS_IBM_EXTENDED.
* libgcc2.h (AVOID_FP_TYPE_CONVERSION): Rename from 
        IS_IBM_EXTENDED.  Also define in terms of WIDEST_HARDWARE_FP_SIZE.
        * libgcc2.c (__floatdisf): Avoid double-word arithmetic when
        looking for non-zero bits shifted out.  Avoid a recursive call
        when constructing the scalar.
        (__floatundisf): Likewise.

From-SVN: r124106
2007-04-24 08:28:21 -07:00
Nathan Froyd cd0a10dd99 dwarf2out.c (field_byte_offset): Move the existing logic under the control of PCC_BITFIELD_TYPE_MATTERS and just...
* dwarf2out.c (field_byte_offset): Move the existing logic
	under the control of PCC_BITFIELD_TYPE_MATTERS and just use
	the bit offset of the field if !PCC_BITFIELD_TYPE_MATTERS.

From-SVN: r124104
2007-04-24 14:45:08 +00:00
Andreas Krebbel c9f599914f re PR target/31641 (ICE in s390_expand_setmem, at config/s390/s390.c:3618)
2007-04-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/31641
	* config/s390/s390.c (s390_expand_setmem): Don't ICE for constant length
	argument of 0 for memset.
	(s390_expand_movmem, s390_expand_setmem, s390_expand_cmpmem): Use
	unsigned shift instead of the signed variant.

2007-04-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	PR target/31641
	* gcc.c-torture/compile/pr31641.c: New testcase.

From-SVN: r124099
2007-04-24 12:08:05 +00:00
Andreas Krebbel 142cd70f50 s390.md ("*cmp<mode>_ccs_0_ibm", [...]): Insn definitions removed.
2007-04-24  Andreas Krebbel  <krebbel1@de.ibm.com>

	* config/s390/s390.md ("*cmp<mode>_ccs_0_ibm", "*cmp<mode>_ccs_ibm",
	"fix_trunc<BFP:mode><GPR:mode>2_ieee", "fix_truncdfsi2_ibm",
	"floatsidf2_ibm", "floatsisf2", "truncdfsf2_ieee", "truncdfsf2_ibm",
	"*trunctfdf2_ieee", "*trunctfdf2_ibm", "*trunctfsf2_ieee",
	"*trunctfsf2_ibm", "extendsfdf2_ieee", "extendsfdf2_ibm",
	"*extenddftf2_ieee", "*extenddftf2_ibm", "*extendsftf2_ieee",
	"*extendsftf2_ibm", "*add<mode>3", "*add<mode>3_ibm", "*sub<mode>3_ibm",
	"*mul<mode>3", "*mul<mode>3_ibm", "*div<mode>3", "*div<mode>3_ibm",
	"*neg<mode>2_ibm", "*abs<mode>2_ibm"): Insn definitions removed.
	("fix_trunc<BFP:mode><GPR:mode>2_bfp", "floatsi<mode>2",
	"truncdfsf2", "trunctf<mode>2", "add<mode>3", "sub<mode>3",
	"mul<mode>3", "div<mode>3"): Insn definitions added.
	("fixuns_trunc<BFP:mode><GPR:mode>2", "fix_trunc<mode>di2",
	"fix_trunc<mode>si2"): gen_fix_trunc<BFP:mode><GPR:mode>2_ieee renamed
	to gen_fix_trunc<BFP:mode><GPR:mode>2_bfp.
	("fix_truncdfsi2", "floatsitf2", "truncdfsf2", "trunctfdf2",
	"trunctfsf2", "extendsfdf2", "extenddftf2", "extendsftf2", "add<mode>3",
	"sub<mode>3", "mul<mode>3", "div<mode>3"): Expander removed.
	("fix_trunc<mode>si2", "extend<DSF:mode><BFP:mode>2"): Expander added.
	* config/s390/s390.h (TARGET_IBM_FLOAT, TARGET_IEEE_FLOAT,
	TARGET_FLOAT_FORMAT): Macro definitions removed.
	(FP_REGNO_P): No special case for !TARGET_IEEE_FLOAT anymore.
	* config/s390/s390.c (struct processor_costs, z900_cost, z990_cost,
	z9_109_cost): Remove fields for hexfloat instructions: dxr, ddr and der.
	(s390_rtx_costs): Remove !TARGET_IEEE_FLOAT special branches.
	(s390_gen_rtx_const_DI): Function removed.
	* config/s390/s390-protos.h (s390_gen_rtx_const_DI): Prototype removed.

From-SVN: r124097
2007-04-24 08:25:28 +00:00
Richard Sandiford aeed4133ae optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions over an external ffs function.
gcc/
	* optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions
	over an external ffs function.

From-SVN: r124096
2007-04-24 06:46:37 +00:00
Richard Sandiford 7f9844caf1 2007-xx-xx Chao-ying Fu <fu@mips.com> Richard Sandiford <richard@nildram.co.uk>
gcc/
2007-xx-xx  Chao-ying Fu  <fu@mips.com>
	    Richard Sandiford  <richard@nildram.co.uk>

	* doc/md.texi (madd@var{m}@var{n}4, umadd@var{m}@var{n}4): Document.
	* optabs.h (OTI_smadd_widen, OTI_umadd_widen): New optab_indexes.
	(smadd_widen_optab, umadd_widen_optab): Define.
	* optabs.c (init_optabs): Initialize smadd_widen_optab and
	umadd_widen_optab.
	* genopinit.c (optabs): Fill in smadd_widen_optab and
	umadd_widen_optab.
	* expr.c (expand_expr_real_1): Try to use smadd_widen_optab
	and umadd_widen_optab to implement multiply-add sequences.
	* config/mips/mips.md (*<su>mul_acc_di): Rename to...
	(<u>maddsidi4): ...this.  Extend condition to include
	GENERATE_MADD_MSUB and TARGET_DSPR2.  Change the constraint
	of operand 0 to "ka" and use the three-operand form of madd<u>
	for TARGET_DSPR2.
	* config/mips/mips-dspr2.md (mips_madd, mips_maddu): Convert
	to define_expands.
	* config/mips/constraints.md (ka): New register constraint.

gcc/testsuite/
2007-xx-xx  Richard Sandiford  <richard@nildram.co.uk>

	* gcc.target/mips/madd-1.c, gcc.target/mips/madd-2.c,
	* gcc.target/mips/madd-3.c, gcc.target/mips/madd-4.c,
	* gcc.target/mips/maddu-1.c, gcc.target/mips/maddu-2.c,
	* gcc.target/mips/maddu-3.c, gcc.target/mips/maddu-4.c: New tests.

From-SVN: r124095
2007-04-24 05:51:57 +00:00
Jan Hubicka ec9ac2bc42 Revert:
2007-04-23  Jan Hubicka  <jh@suse.cz>
	* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124094
2007-04-24 00:05:57 +00:00
Daniel Franke edc5f63bf6 invoke.texi: Removed leading '-' from option index entries.
2007-04-24  Daniel Franke  <franke.daniel@gmail.com>

       * doc/invoke.texi: Removed leading '-' from option index entries.

From-SVN: r124092
2007-04-23 20:02:46 -04:00
Zdenek Dvorak 7506e1cbdc tree-phinodes.c (reserve_phi_args_for_new_edge, [...]): Use phi_nodes_ptr.
* tree-phinodes.c (reserve_phi_args_for_new_edge, remove_phi_node):
	Use phi_nodes_ptr.
	(create_phi_node): Use set_phi_nodes.
	* omp-low.c (expand_omp_parallel): Use bb_stmt_list.
	* tree-if-conv.c (process_phi_nodes): Use set_phi_nodes.
	(combine_blocks):  Use bb_stmt_list and set_bb_stmt_list.
	* tree-flow-inline.h (phi_nodes, set_phi_nodes,
	(bsi_start, bsi_last): Use bb_stmt_list.
	(phi_nodes_ptr, bb_stmt_list, set_bb_stmt_list): New functions.
	* cfgexpand.c (expand_gimple_basic_block): Use bb_stmt_list.
	Traverse the statements using tsi iterator.
	* basic-block.h (struct basic_block_def): Fields stmt_list
	and phi_nodes moved to ...
	(struct tree_bb_info): ... new structure.
	* tree-cfg.c (create_bb): Allocate il.tree.  Use set_bb_stmt_list.
	(tree_merge_blocks): Use bb_stmt_list and set_bb_stmt_list.
	(remove_bb): Handle blocks with NULL stmt list.  Clear il.tree field.
	(tree_verify_flow_info): Verify that il.tree is not set for
	entry and exit block.
	(tree_split_block): Use set_bb_stmt_list.

From-SVN: r124086
2007-04-23 23:15:54 +00:00
Mike Stump 933e4fe7ae i386.c (ix86_tune_features [X86_TUNE_DEEP_BRANCH_PREDICTION]): Prefer call over thunks on nocona and core2.
* config/i386/i386.c (ix86_tune_features
	[X86_TUNE_DEEP_BRANCH_PREDICTION]: Prefer call over thunks on
	nocona and core2.

From-SVN: r124084
2007-04-23 22:09:21 +00:00
H.J. Lu 10e4d956c1 i386.md (prefix_extra): New attribute.
2007-04-23  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.md (prefix_extra): New attribute.
	(length): Add prefix_extra.

	* onfig/i386/sse.md (sse2_movdqu): Set prefix_data16.
	(sse2_movntv2di): Likewise.
	(sse2_cvtps2dq): Likewise.
	(sse2_cvtpd2pi): Likewise.
	(sse2_cvttpd2pi): Likewise.
	(*sse2_cvtpd2ps): Likewise.
	(*add<mode>3): Likewise.
	(sse2_ssadd<mode>3): Likewise.
	(sse2_usadd<mode>3): Likewise.
	(*sub<mode>3): Likewise.
	(sse2_sssub<mode>3): Likewise.
	(sse2_ussub<mode>3): Likewise.
	(*mulv8hi3): Likewise.
	(*smulv8hi3_highpart): Likewise.
	(*umulv8hi3_highpart): Likewise.
	(sse2_umulv2siv2di3): Likewise.
	(sse2_pmaddwd): Likewise.
	(ashr<mode>3): Likewise.
	(lshr<mode>3): Likewise.
	(ashl<mode>3): Likewise.
	(sse2_ashlti3): Likewise.
	(sse2_lshrti3): Likewise.
	(*umaxv16qi3): Likewise.
	(*smaxv8hi3): Likewise.
	(*uminv16qi3): Likewise.
	(*sminv8hi3): Likewise.
	(sse2_eq<mode>3): Likewise.
	(sse2_gt<mode>3): Likewise.
	(*and<mode>3): Likewise.
	(sse2_nand<mode>3): Likewise.
	(*ior<mode>3): Likewise.
	(*xor<mode>3): Likewise.
	(sse2_packsswb): Likewise.
	(sse2_packssdw): Likewise.
	(sse2_packuswb): Likewise.
	(sse2_punpckhbw): Likewise.
	(sse2_punpcklbw): Likewise.
	(sse2_punpckhwd): Likewise.
	(sse2_punpcklwd): Likewise.
	(sse2_punpckhdq): Likewise.
	(sse2_punpckldq): Likewise.
	(sse2_punpckhqdq): Likewise.
	(sse2_punpcklqdq): Likewise.
	(*sse2_pinsrw): Likewise.
	(*sse2_pextrw): Likewise.
	(sse2_pshufd_1): Likewise.
	(sse2_uavgv16qi3): Likewise.
	(sse2_uavgv8hi3): Likewise.
	(sse2_psadbw): Likewise.
	(sse2_pmovmskb): Likewise.
	(*sse2_maskmovdqu): Likewise.
	(*sse2_maskmovdqu_rex64): Likewise.
	(sse4a_extrqi): Likewise.
	(sse4a_extrq): Likewise.
	(sse3_lddqu): Set prefix_rep.
	(sse3_addsubv4sf3): Likewise.
	(sse3_haddv4sf3): Likewise.
	(sse3_hsubv4sf3): Likewise.
	(sse_cvtss2si): Likewise.
	(sse_cvtss2si_2): Likewise.
	(sse_cvtss2siq): Likewise.
	(sse_cvtss2siq_2): Likewise.
	(sse_cvttss2si): Likewise.
	(sse_cvttss2siq): Likewise.
	(sse2_cvttps2dq): Likewise.
	(sse3_movshdup): Likewise.
	(sse3_movsldup): Likewise.
	(sse2_cvtsd2si): Likewise.
	(sse2_cvtsd2si_2): Likewise.
	(sse2_cvtsd2siq): Likewise.
	(sse2_cvtsd2siq_2): Likewise.
	(sse2_cvttsd2si): Likewise.
	(sse2_cvttsd2siq): Likewise.
	(*sse2_cvtpd2dq): Likewise.
	(*sse2_cvttpd2dq): Likewise.
	(sse2_pshuflw_1): Likewise.
	(sse2_pshufhw_1): Likewise.
	(sse4a_insertqi): Likewise.
	(sse4a_insertq): Likewise.
	(ssse3_phaddwv8hi3): Set prefix_data16 and prefix_extra.
	(ssse3_phadddv4si3): Likewise.
	(ssse3_phaddswv8hi3): Likewise.
	(ssse3_phsubwv8hi3): Likewise.
	(ssse3_phsubdv4si3): Likewise.
	(ssse3_phsubswv8hi3): Likewise.
	(ssse3_pmaddubswv8hi3): Likewise.
	(ssse3_pmulhrswv8hi3): Likewise.
	(ssse3_pshufbv16qi3): Likewise.
	(ssse3_psign<mode>3): Likewise.
	(ssse3_palignrti): Likewise.
	(abs<mode>2): Likewise.
	(ssse3_phaddwv4hi3): Set prefix_extra.
	(ssse3_phadddv2si3): Likewise.
	(ssse3_phaddswv4hi3): Likewise.
	(ssse3_phsubwv4hi3): Likewise.
	(ssse3_phsubdv2si3): Likewise.
	(ssse3_phsubswv4hi3): Likewise.
	(ssse3_pmaddubswv4hi3): Likewise.
	(ssse3_pmulhrswv4hi3): Likewise.
	(ssse3_pshufbv8qi3): Likewise.
	(ssse3_psign<mode>3): Likewise.
	(ssse3_palignrdi): Likewise.
	(abs<mode>2): Likewise.
	(sse2_cvtdq2ps): Set mode to V4SF instead of V2DF.
	(*vec_dupv2df): Set mode to V2DF instead of V4SF.
	(sse2_pmovmskb): Set mode to SI instead of V2DF.

From-SVN: r124077
2007-04-23 12:02:57 -07:00
Nick Clifton f4b4a3e235 * params.def: Fix formatting of emacs local variables.
From-SVN: r124074
2007-04-23 16:20:38 +00:00
H.J. Lu 9a072eb638 sse.md (sse2_stored): Don't split to inter-unit move if inter-unit move isn't allowed.
2007-04-23  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/sse.md (sse2_stored): Don't split to inter-unit
	move if inter-unit move isn't allowed.
	Don't split moving the first element of V2DI to DI to inter-unit
	move if inter-unit move isn't allowed.

From-SVN: r124070
2007-04-23 09:15:14 -07:00
Richard Guenther 3b5ee6a4c1 tree-ssa-sink.c (execute_sink_code): Calculate CDI_DOMINATORS and CDI_POST_DOMINATORS separately.
2007-04-23  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sink.c (execute_sink_code): Calculate CDI_DOMINATORS
	and CDI_POST_DOMINATORS separately.

From-SVN: r124065
2007-04-23 14:19:39 +00:00
Nick Clifton 6d16b6e782 c.opt (Wformat-contains-nul): Add warning attribute.
From-SVN: r124063
2007-04-23 11:04:11 +00:00
Jan Hubicka c90533c60b function.c (init_function_start): Don't init line number info.
* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124061
2007-04-23 09:53:59 +00:00
Andrew Pinski 1f2ad84c3c re PR middle-end/31448 (ICE in expand_shift with bit fields and expand inlining constants)
2007-04-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31448
        * expr.c (reduce_to_bit_field_precision): Handle
        CONST_INT rtx's.

2007-04-22  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/31448
        * gcc.c-torture/execute/pr31448.c: New testcase.

From-SVN: r124054
2007-04-22 18:53:56 -07:00
Uros Bizjak 8115817bf2 re PR tree-optimization/24659 (Conversions are not vectorized)
2007-04-22  Uros Bizjak  <ubizjak@gmail.com>

        PR tree-optimization/24659
        * optabs.h (enum optab_index) [OTI_vec_unpacks_hi,
        OTI_vec_unpacks_lo]: Update comment to mention floating point operands.
        (vec_pack_trunc_optab): Rename from vec_pack_mod_optab.
        * genopinit.c (optabs): Rename vec_pack_mod_optab
        to vec_pack_trunc_optab.
        * tree-vect-transform.c (vectorizable_type_demotion): Do not fail
        early for scalar floating point operands for NOP_EXPR.
        (vectorizable_type_promotion): Ditto.
        * optabs.c (optab_for_tree_code) [VEC_PACK_TRUNC_EXPR]: Return
        vec_pack_trunc_optab.
        (expand_binop): Rename vec_float_trunc_optab to vec_pack_mod_optab.

        * tree.def (VEC_PACK_TRUNC_EXPR): Rename from VEC_PACK_MOD_EXPR.
        * tree-pretty-print.c (dump_generic_node) [VEC_PACK_TRUNC_EXPR]:
        Rename from VEC_PACK_MOD_EXPR.
        (op_prio) [VEC_PACK_TRUNC_EXPR]: Ditto.
        * expr.c (expand_expr_real_1): Ditto.
        * tree-inline.c (estimate_num_insns_1): Ditto.
        * tree-vect-generic.c (expand_vector_operations_1): Ditto.

        * config/i386/sse.md (vec_unpacks_hi_v4sf): New expander.
        (vec_unpacks_lo_v4sf): Ditto.
        (vec_pack_trunc_v2df): Ditto.
        (vec_pack_trunc_v8hi): Rename from vec_pack_mod_v8hi.
        (vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.
        (vec_pack_trunc_v2di): Rename from vec_pack_mod_v2di.
    
        * config/rs6000/altivec.md (vec_pack_trunc_v8hi): Rename from
        vec_pack_mod_v8hi.
        (vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.

        * doc/c-tree.texi (Expression trees) [VEC_PACK_TRUNC_EXPR]:
        Rename from VEC_PACK_MOD_EXPR.  This expression also represent
        packing of floating point operands.
        [VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR]: These expression also
        represent unpacking of floating point operands.
        * doc/md.texi (Standard Names) [vec_pack_trunc]: Update documentation.
        [vec_unpacks_hi]: Ditto.
        [vec_unpacks_lo]: Ditto.

testsuite/ChangeLog:

2007-04-22  Uros Bizjak  <ubizjak@gmail.com>

    PR tree-optimization/24659
    * gcc.dg/vect/vect-float-extend-1.c: New test.
    * gcc.dg/vect/vect-float-truncate-1.c: New test.

From-SVN: r124045
2007-04-22 20:45:06 +02:00
Jan Hubicka 395a40e0e2 misc.c (gnat_expand_body): Don't call target for destructors, avoid redundant check on syntax errors.
* ada/misc.c (gnat_expand_body): Don't call target for destructors,
	avoid redundant check on syntax errors.

	* final.c (rest_of_handle_final): Call
	targetm.asm_out.constructor/targetm.asm_out.destructor
	* cgraphunit.c (cgraph_build_static_cdtor): Don't do it here; set
	proper priority via decl_*_priority_insert.
	* c-common.c (c_expand_body): Likewise.

From-SVN: r124044
2007-04-22 15:33:32 +00:00
Zdenek Dvorak b7716a8e90 Fix whitespace.
From-SVN: r124043
2007-04-22 12:02:29 +00:00
Richard Guenther e0a607311c re PR tree-optimization/29789 (Missed invariant out of the loop with conditionals and shifts)
2007-04-22  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/29789
	* tree-ssa-loop-im.c (stmt_cost): Adjust cost of shifts.
	(rewrite_reciprocal): New helper split out from
	determine_invariantness_stmt.
	(rewrite_bittest): Likewise.
	(determine_invariantness_stmt): Rewrite (A >> B) & 1 to
	A & (1 << B) if (1 << B) is loop invariant but (A >> B)
	is not.

	* gcc.dg/tree-ssa/ssa-lim-1.c: New testcase.
	* gcc.dg/tree-ssa/ssa-lim-2.c: Likewise.

From-SVN: r124042
2007-04-22 11:26:49 +00:00
Revital Eres 76fd2caa7d Extend MVE patterns
From-SVN: r124037
2007-04-22 08:46:58 +00:00
Zdenek Dvorak f06b0a10f9 predict.c: Include pointer-set.h.
* predict.c: Include pointer-set.h.
	(bb_predictions): New variable.
	(tree_predicted_by_p, tree_predict_edge,
	remove_predictions_associated_with_edge): Use bb_predictions map
	instead of bb->predictions.
	(clear_bb_predictions, assert_is_empty): New functions.
	(combine_predictions_for_bb): Use bb_predictions map.  Call
	clear_bb_predictions.
	(tree_estimate_probability): Create and free bb_predictions map.
	* Makefile.in (predict.o): Add pointer-set.h dependency.
	* basic-block.h (struct basic_block_def): Remove predictions
	field.
	* cfgrtl.c (rtl_verify_flow_info_1): Do not check bb->predictions.

From-SVN: r124032
2007-04-22 00:51:38 +00:00
Kaz Kojima e919dfe284 re PR target/31480 (ICE with -O -fomit-frame-pointer on SH)
PR target/31480
	* config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
	is null.

From-SVN: r124031
2007-04-22 00:18:02 +00:00
Andrew Pinski 7be97ac71e timevar.c (timevar_print): Change reference of --disable-checking to --enable-checking=release.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * timevar.c (timevar_print): Change reference of --disable-checking to
        --enable-checking=release.  Also warn if assert checking is disabled.

From-SVN: r124025
2007-04-21 14:55:33 -07:00
Andrew Pinski c8a0a219fd re PR c/30265 (Compound literal can cause invalid gimple)
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/30265
        * c-gimplifier.c (gimplify_compound_literal_expr): Mark the
        decl as addressable if the compound literal was marked as
        addressable.
        Mark the decl as a gimple register if it is a complex or
        vector decl and does not live in memory.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR C/30265
        * gcc.c-torture/compile/compound-literal-2.c: New testcase.
        * gcc.c-torture/compile/compound-literal-3.c: New testcase.

From-SVN: r124024
2007-04-21 14:47:35 -07:00
Andrew Pinski 3d95caa4af tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * tree.h (GIMPLE_TUPLE_P): Also true for PHI_NODEs.
        (GENERIC_NEXT): New function macro.
        (PHI_CHAIN): Use phi_node's new chain variable.
        (tree_phi_node): Change tree_common to tree_base
        and add the chain field.
        * tree-phinodes.c (make_phi_node): Don't set
        TREE_TYPE on the new node.
        * c-decl.c (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_TUPLE_P in chain_next.
        * tree-vect-transform.c
        (get_initial_def_for_induction): Look at
        PHI_RESULT_TREE for the type of the phi node.
        (update_vuses_to_preheader): Use PHI_CHAIN
        instead of TREE_CHAIN on the phi node.
        * tree-ssa-structalias.c (compute_points_to_sets):
        Likewise.
        (ipa_pta_execute): Likewise.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * ada-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.
2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        * java-tree.h (lang_tree_node): Use GENERIC_NEXT
        instead of checking GIMPLE_STMT_P in chain_next.

From-SVN: r124021
2007-04-21 13:40:31 -07:00
Richard Guenther 84ece8efd2 re PR tree-optimization/31136 (FRE ignores bit-field truncation (C and C++ front-end don't produce bit-field truncation)
2007-04-21  Richard Guenther  <rguenther@suse.de>

	PR middle-end/31136
	* fold-const.c (fold_unary): Call fold_convert_const on the
	original tree.

	* gcc.c-torture/execute/pr31136.c: New testcase.

From-SVN: r124020
2007-04-21 17:47:13 +00:00
Alexandre Oliva 1071bcbdf8 gcse.c (store_killed_in_insn): Handle PARALLELs.
gcc/ChangeLog:
* gcse.c (store_killed_in_insn): Handle PARALLELs.
(store_killed_in_pat): New.
gcc/testsuite/ChangeLog:
* gcc.target/i386/movsi-sm-1.c: New.

From-SVN: r124015
2007-04-21 06:48:37 +00:00
Richard Henderson c7a2139bef re PR target/31628 (stdcall function is miscompiled)
PR target/31628
        * config/i386/i386.c (type_has_variadic_args_p): Look for any
        TREE_LIST with a void_type_node value, not void_list_node exactly.

From-SVN: r124014
2007-04-20 16:53:37 -07:00
Douglas Gregor fda0adca8d standards.texi: Re-arrange into language-specific subsections.
2007-04-21  Douglas Gregor  <doug.gregor@gmail.com>

	* doc/standards.texi: Re-arrange into language-specific
	subsections. Add a C++ section, documenting which standards we
	support.

From-SVN: r124013
2007-04-20 23:45:25 +00:00
Zdenek Dvorak 285463b5a2 tree-ssa-structalias.c (delete_points_to_sets): Free graph->complex.
* tree-ssa-structalias.c (delete_points_to_sets): Free graph->complex.
	* tree-ssa-operands.c (finalize_ssa_vuse_ops): Free new_ops.

From-SVN: r124012
2007-04-20 23:27:51 +00:00
Daniel Jacobowitz 860532dff2 sysv4.h (STARTFILE_DEFAULT_SPEC): Include ecrti.o and crtbegin.o.
* config/rs6000/sysv4.h (STARTFILE_DEFAULT_SPEC): Include
	ecrti.o and crtbegin.o.
	(LIB_DEFAULT_SPEC): Include -lc.
	(ENDFILE_DEFAULT_SPEC): Include crtend.o and ecrtn.o.

From-SVN: r124006
2007-04-20 21:56:53 +00:00
Richard Henderson 60e9352519 re PR target/28623 (ICE in extract_insn, at recog.c:2077 (nrecognizable insn) [alpha])
PR target/28623
        * config/alpha/alpha.c (get_unaligned_address): Remove extra_offset
        argument; update all callers.
        (get_unaligned_offset): New.
        * config/alpha/alpha.md (extendqidi2, extendhidi2): Don't use
        get_unaligned_address, just pass on the address directly.
        (unaligned_extendqidi): Use gen_lowpart instead of open-coding
        the subreg in the helper patterns.
        (unaligned_extendqidi_le): Use get_unaligned_offset.
        (unaligned_extendqidi_be, unaligned_extendhidi_le): Likewise.
        (unaligned_extendhidi_be): Likewise.
        (unaligned_extendhidi): Tidy.
        * config/alpha/alpha-protos.h: Update.

From-SVN: r124002
2007-04-20 12:35:55 -07:00
Richard Henderson f326fd7a03 alpha.h (CPP_SPEC, [...]): Remove.
* config/alpha/alpha.h (CPP_SPEC, CPP_SUBTARGET_SPEC): Remove.
        (EXTRA_SPECS, SUBTARGET_EXTRA_SPECS): Remove.
        * config/alpha/linux.h (CPP_SPEC): Undef before redefine.
        * config/alpha/linux-elf.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        * config/alpha/freebsd.h (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        (CPP_SPEC): Don't include %(cpp_subtarget).
        * config/alpha/netbsd.h (CPP_SPEC): Rename CPP_SUBTARGET_SPEC.
        (EXTRA_SPECS): Rename SUBTARGET_EXTRA_SPECS.
        * config/alpha/osf.h (CPP_SPEC, EXTRA_SPECS): Similarly.

From-SVN: r123999
2007-04-20 12:05:24 -07:00
Jakub Jelinek a5b9afd1a1 i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED for __builtin_ia32_cmpordss.
* config/i386/i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED
	for __builtin_ia32_cmpordss.

	* gcc.target/i386/ordcmp-1.c: New test.
	* gcc.target/i386/unordcmp-1.c: New test.

From-SVN: r123989
2007-04-20 13:42:21 +02:00
Jakub Jelinek 86122f7282 re PR tree-optimization/31632 (ICE in compare_values)
PR tree-optimization/31632
	* fold-const.c (fold_binary): Use op0 and op1 instead of arg0
	and arg1 for optimizations of comparison against min/max values.
	Fold arg0 to arg1's type for optimizations of comparison against
	min+1 and max-1 values.

	* gcc.c-torture/compile/20070419-1.c: New test.

From-SVN: r123988
2007-04-20 13:40:47 +02:00
Bernd Schmidt c1673e1b5a reload.c (combine_reloads): When trying to use a dying register...
* reload.c (combine_reloads): When trying to use a dying register,
	check whether it's uninitialized and don't use if so.

From-SVN: r123986
2007-04-20 00:08:46 +00:00
Brooks Moses db136335ce fold-const.c: Remove prototypes for native_encode_expr and native_interpret_expr.
* fold-const.c: Remove prototypes for native_encode_expr and
native_interpret_expr.
(native_encode_expr): Make non-static.
(native_interpret_expr): Likewise.
* tree.h: Add prototypes for the above.

From-SVN: r123980
2007-04-19 14:52:58 -07:00
Joseph Myers b6fda43f4e spe.md (*frob_tf_ti, [...]): Add length attributes.
gcc/
	* config/rs6000/spe.md (*frob_tf_ti, *frob_ti_tf, *frob_ti_tf_2,
	*mov_si<mode>_e500_subreg0, *mov_si<mode>_e500_subreg0_2,
	*mov_sitf_e500_subreg8, *mov_sitf_e500_subreg8_2, spe_extenddftf2,
	spe_fix_trunctfsi2_internal, spe_negtf2_internal, cmptfeq_gpr,
	tsttfeq_gpr, cmptfgt_gpr, tsttfgt_gpr, cmptflt_gpr, tsttflt_gpr):
	Add length attributes.

From-SVN: r123979
2007-04-19 22:00:44 +01:00
Janis Johnson 93167356eb float.h: Check that __STDC_WANT_DEC_FP__ is defined, not that it is 1.
* ginclude/float.h: Check that __STDC_WANT_DEC_FP__ is defined,
	not that it is 1.

From-SVN: r123974
2007-04-19 16:58:42 +00:00
Janis Johnson 589dd99500 c-cppbuiltin.c (c_cpp_builtins): Remove definition of __STDC_WANT_DEC_FP__.
* c-cppbuiltin.c (c_cpp_builtins): Remove definition of
	__STDC_WANT_DEC_FP__.

From-SVN: r123973
2007-04-19 16:57:23 +00:00
Joseph Myers f7cc5390ec configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu* for long double compatibility.
gcc:
	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.

libstdc++-v3:
	* configure.ac: Allow both powerpc*-*-linux* and powerpc*-*-gnu*
	for long double compatibility.
	* configure: Regenerate.
	* src/complex_io.cc, src/istream-inst.cc, src/ostream-inst.cc:
	Condition some _GLIBCXX_LDBL_COMPAT calls on _GLIBCXX_USE_WCHAR_T.

From-SVN: r123972
2007-04-19 13:11:07 +01:00
Eric Botcazou d47a8b8331 re PR rtl-optimization/29841 (ICE with scheduling and __builtin_trap)
PR rtl-optimization/29841
	* cfgbuild.c (control_flow_insn_p): Return TRUE for unconditional
	trap instructions.
	* sched-deps.c (sched_analyze_insn): Prevent all non-jump instructions
	that may cause control flow transfer from being moved.

From-SVN: r123970
2007-04-19 11:19:16 +00:00
Jan Hubicka 8d5d586529 fold-const.c (div_if_zero_remainder): Do signed divide for pointer types.
* fold-const.c (div_if_zero_remainder): Do signed divide for pointer
	types.

From-SVN: r123966
2007-04-19 01:35:25 +00:00