Commit Graph

102519 Commits

Author SHA1 Message Date
Ian Bolton 2fabf1b772 MAINTAINERS (Write After Approval): Add myself.
2010-09-01  Ian Bolton  <ian.bolton@arm.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r163734
2010-09-01 14:14:47 +00:00
Richard Guenther 23a534a102 alias.c (ao_ref_from_mem): Adjust.
2010-09-01  Richard Guenther  <rguenther@suse.de>

	* alias.c (ao_ref_from_mem): Adjust.
	* builtins.c (get_object_alignment): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* gimple.c (get_base_address): Likewise.
	* tree-dfa.c (get_ref_base_and_extent): Likewise.
	(get_addr_base_and_unit_offset): Likewise.  Fix for
	both TMR_SYMBOL and TMR_BASE being set.
	* tree-eh.c (tree_could_trap_p): Likewise.
	* gimplify.c (gimplify_expr): Do not attempt to gimplify
	TMR_SYMBOL.  Always gimplify TMR_BASE.
	* tree-cfg.c (verify_types_in_gimple_reference): Verify
	TMR_BASE if there is a TMR_SYMBOL.
	* tree-pretty-print.c (dump_generic_node): Adjust.
	* tree-ssa-address.c (addr_for_mem_ref): Likewise.
	(tree_mem_ref_addr): Likewise.
	(create_mem_ref_raw): Likewise.
	(move_fixed_address_to_symbol): Likewise.
	(create_mem_ref): Likewise.
	(dump_mem_address): Likewise.
	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Adjust.
	Fix for both TMR_SYMBOL and TMR_BASE being set.
	(indirect_refs_may_alias_p): Likewise.
	* tree-ssa-operands.c (get_tmr_operands): Adjust.
	* tree.def (TARGET_MEM_REF): Adjust documentation.

From-SVN: r163733
2010-09-01 13:28:46 +00:00
Uros Bizjak d8b08ecdf6 i386.h (enum ix86_tune_indices): Rename from X86_TUNE_ADD_ESP_4.
* config/i386/i386.h (enum ix86_tune_indices) <X86_TUNE_SINGLE_POP>:
	Rename from X86_TUNE_ADD_ESP_4.
	<IX86_TUNE_DOUBLE_POP>: Rename from X86_TUNE_ADD_ESP_8.
	<IX86_TUNE_SINGLE_PUSH>: Rename from X86_TUNE_SUB_ESP_4.
	<IX86_TUNE_DOUBLE_PUSH>: Rename from X86_TUNE_SUB_ESP_8.
	(TARGET_SINGLE_POP): Rename from TARGET_ADD_ESP_4.
	(TARGET_DOUBLE_POP): Rename from TARGET_ADD_ESP_8.
	(TARGET_SINGLE_PUSH): Rename from TARGET_SUB_ESP_4.
	(TARGET_DOUBLE_POP): Rename from TARGET_SUB_ESP_8.
	* config/i386/i386.c (initial_ix86_tune_features)
	<X86_TUNE_SINGLE_POP>: Invert members.
	<X86_TUNE_DOUBLE_POP>: Ditto.
	<X86_TUNE_SINGLE_PUSH>: Ditto.
	<X86_TUNE_DOUBLE_PUSH>: Ditto.
	* config/i386/i386.md (*pop<mode>1): Rename from pop<mode>1.
	No longer exported.
	(push peephole2 patterns): Macroize peepholes using P mode iterator.
	Adjust for renamed TARGET_{SINGLE,DOUBLE}_PUSH defines.
	(pop peephole2 patterns): Macroize peepholes using P mode iterator.
	Adjust for renamed TARGET_{SINGLE,DOUBLE}_POP defines.

From-SVN: r163732
2010-09-01 14:26:49 +02:00
Eric Botcazou 558af7ca1c gimplify.c (gimplify_init_constructor): Do not create a temporary for a volatile LHS if...
* gimplify.c (gimplify_init_constructor): Do not create a temporary for
	a volatile LHS if the constructor has only one element.

From-SVN: r163727
2010-09-01 12:15:08 +00:00
Mikael Pettersson 6e0833db45 re PR bootstrap/45321 (ARM bootstrap failure due to stdarg_p change)
2010-09-01  Mikael Pettersson  <mikpe@it.uu.se>

       PR bootstrap/45321
       * tree.c (stdarg_p): Make fntype parameter const.
       * tree.h (stdarg_p): Likewise.
       (function_args_iterator): Remove unused fntype field.
       (function_args_iter_init): Do not initialize fntype
       field.  Make fntype parameter const.

From-SVN: r163726
2010-09-01 11:52:55 +00:00
Andi Kleen c961549127 bootstrap-lto.mk (STAGE2_CFLAGS, [...]): Change to -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1.
2010-09-01  Andi Kleen  <ak@linux.intel.com>

        * bootstrap-lto.mk (STAGE2_CFLAGS, STAGE3_CFLAGS): Change
        to -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1.

From-SVN: r163725
2010-09-01 11:47:41 +00:00
Richard Guenther e34882831e tree-vrp.c (adjust_range_with_scev): Use number of iteration estimate.
2010-09-01  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (adjust_range_with_scev): Use number of iteration
	estimate.
	(vrp_visit_phi_node): Delay using SCEV till we balloon the
	range.
	(execute_vrp): Compute number of iteration estimates.
	* cfgloop.h (estimate_numbers_of_iterations_loop): Adjust prototype.
	* tree-flow.h (estimate_numbers_of_iterations): Likewise.
	* tree-data-ref.c (estimated_loop_iterations): Adjust.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
	Infer loop bounds from undefined behavior based on a new
	parameter.
	(estimate_numbers_of_iterations): Likewise.
	(scev_probably_wraps_p): Adjust.
	* tree-ssa-loop.c (tree_ssa_loop_bounds): Likewise.

	* gcc.dg/vect/vect-outer-fir.c: Adjust.
	* gcc.dg/tree-ssa/vrp54.c: New testcase.
	* gcc.c-torture/execute/20100827-1.c: Likewise.

From-SVN: r163724
2010-09-01 11:39:55 +00:00
Francois-Xavier Coudert eacbdaaac1 trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize array quad_decls.
* trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
	array quad_decls. Remove unnecessary assignment.

From-SVN: r163723
2010-09-01 10:40:57 +00:00
Nick Clifton a21eaf5e2b stormy16.c: Use REG_P, MEM_P and CONST_INT_P where appropriate.
* config/stormy16/stormy16.c: Use REG_P, MEM_P and CONST_INT_P
        where appropriate.
        (xstormy16_legitimate_address_p): Use true and false instead of 1
        and 0.
        (xstormy16_expand_prologue): Delete unused local variable 'insn'.
        (xstormy16_function_arg): Use FIRST_ARGUMENT_REGNUM in place of
        magic constant 2.
        (xstormy16_expand_call): Fix comment at start of function.

From-SVN: r163722
2010-09-01 10:13:07 +00:00
Francois-Xavier Coudert 166d08bdde trans-expr.c (gfc_conv_power_op): Handle floating-point types other than long double.
* trans-expr.c (gfc_conv_power_op): Handle floating-point types
	other than long double.
	* mathbuiltins.def: Add builtins from the POW and CPOW family.
	* trans.h (gfc_builtin_decl_for_float_kind): New prototype.
	* trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
	prefix to function name.
	(gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
	(gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
	function name.
	(gfc_conv_intrinsic_exponent): Likewise.
	(gfc_conv_intrinsic_abs): Likewise.
	(gfc_conv_intrinsic_mod): Likewise.
	(gfc_conv_intrinsic_sign): Likewise.
	(gfc_conv_intrinsic_arith): Likewise.
	(gfc_conv_intrinsic_fraction): Likewise.
	(gfc_conv_intrinsic_nearest): Likewise.
	(gfc_conv_intrinsic_spacing): Likewise.
	(gfc_conv_intrinsic_rrspacing): Likewise.
	(gfc_conv_intrinsic_scale): Likewise.
	(gfc_conv_intrinsic_set_exponent): Likewise.

From-SVN: r163721
2010-09-01 08:40:53 +00:00
Nick Clifton e14ca1cef6 rx.c (rx_expand_prologue): Do not adjust frame size when pushing accumulator register.
* config/rx/rx.c (rx_expand_prologue): Do not adjust frame size
        when pushing accumulator register.
        (rx_get_stack_layout): Always save call clobbered registers inside
        interrupt handlers.
        * config/rx/rx-modes.def: Fix descriptive comment at start of file.

From-SVN: r163720
2010-09-01 08:33:35 +00:00
Francois-Xavier Coudert c14c81552a intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
* intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
	* intrinsic.h (gfc_resolve_execute_command_line): New function.
	* iresolve.c (gfc_resolve_execute_command_line): New function.
	* gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
	* intrinsic.texi: Document EXECUTE_COMMAND_LINE.

	* intrinsics/execute_command_line.c: New file.
	* gfortran.map (_gfortran_execute_command_line_i4,
	_gfortran_execute_command_line_i8): New symbols.
	* Makefile.am: Add new file intrinsics/execute_command_line.c.
	* Makefile.in: Regenerated.

	* gfortran.dg/execute_command_line_1.f90: New test.

From-SVN: r163719
2010-09-01 08:33:11 +00:00
Uros Bizjak d78552bd0f config.gcc (i[34567]86-*-freebsd*, [...]): Add i386/t-fprules-softfp and soft-fp/t-softfp to tmake_file.
gcc/ChangeLog:

	* config.gcc (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Add
	i386/t-fprules-softfp and soft-fp/t-softfp to tmake_file.

	* libgcc-std.ver (GCC_4.6.0): Define version.

libgcc/ChangeLog:

	* config.host (i[34567]86-*-freebsd*, x86_64-*-freebsd*): Add
	i386/t-freebsd to tmake_file.
	* config/i386/t-freebsd: New file.
	* config/i386/libgcc-bsd.ver: New file.

From-SVN: r163718
2010-09-01 08:42:53 +02:00
Uros Bizjak 451238b7e2 * f95-lang.c: Fix comment: POPAR -> POPPAR.
From-SVN: r163717
2010-09-01 08:33:06 +02:00
GCC Administrator 98ee9e659e Daily bump.
From-SVN: r163712
2010-09-01 00:17:09 +00:00
Jakub Jelinek a69d2520e0 re PR preprocessor/45457 (ICE: invalid built-in macro "__DBL_DENORM_MIN__")
PR preprocessor/45457
	* expr.c (parse_defined): Call pfile->cb.user_builtin_macro hook if
	needed.
	* directives.c (do_ifdef, do_ifndef): Likewise.

	* c-c++-common/cpp/pr45457.c: New test.

From-SVN: r163705
2010-09-01 00:47:25 +02:00
Eric Botcazou 0c1bebc414 tree-nested.c (convert_all_function_calls): Iterate until after the sum of static chains in the nest doesn't change.
* tree-nested.c (convert_all_function_calls): Iterate until after the
	sum of static chains in the nest doesn't change.

From-SVN: r163698
2010-08-31 21:05:22 +00:00
Anatoly Sokolov 0e607518d5 m32c.c (classes_intersect): Remove.
* config/m32c/m32c.c (classes_intersect): Remove.
	(m32c_preferred_reload_class, m32c_secondary_reload_class): Use
	reg_classes_intersect_p instead of classes_intersect.
	(class_can_hold_mode): Change arguments type from enum reg_class to
	reg_class_t.  Use reg_class_contents instead of class_contents.
	(m32c_register_move_cost): Make static. Change arguments type from
	enum reg_class to reg_class_t. Use reg_classes_intersect_p instead of
	classes_intersect. Use reg_class_contents instead of class_contents.
	(m32c_memory_move_cost): Make static. Change arguments type from
	enum reg_class to reg_class_t.
	(TARGET_REGISTER_MOVE_COST, TARGET_MEMORY_MOVE_COST): Define.
	* config/m32c/m32c.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
	* config/m32c/m32c-protos.h (m32c_register_move_cost,
	m32c_memory_move_cost): Remove.

From-SVN: r163693
2010-08-31 23:32:59 +04:00
Francois-Xavier Coudert ad5f4de228 re PR fortran/38282 (Bit intrinsics: ILEN and IBCHNG)
PR fortran/38282

	* f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
	and parity{,l,ll} builtins.
	* trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
	(gfc_conv_intrinsic_function): Call above new functions.
	* simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
	functions.
	* intrinsic.texi: Document POPCNT and POPPAR.

	* gfortran.dg/popcnt_poppar_1.F90: New test.
	* gfortran.dg/popcnt_poppar_2.F90: New test.

From-SVN: r163691
2010-08-31 18:56:46 +00:00
Paolo Carlini 18dbb85903 re PR libstdc++/44480 ([C++0x] Linear performance of begin() in unordered associative containers)
2010-08-31  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/44480
	* include/bits/hashtable.h (_Hashtable<>::_M_begin_bucket_index):
	Add, caching the index of the first non-empty bucket.
	(begin, cbegin): Use it.
	(_Hashtable<>::_Hashtable(_InputIterator, _InputIterator, ...),
	_Hashtable(const _Hashtable&), _Hashtable(_Hashtable&&),
	swap(_Hashtable&), clear): Adjust.
	(_M_insert_bucket, _M_insert, erase(const_iterator),
	erase(const key_type&), _M_rehash): Update it.

	* include/bits/hashtable.h (_Hashtable<>::_M_erase): Remove.
	(erase(const_iterator)): Inline the latter.

From-SVN: r163686
2010-08-31 17:39:51 +00:00
Uros Bizjak 6208468d29 volatile-2.c: Require nonpic target.
* gcc.target/i386/volatile-2.c: Require nonpic target.

From-SVN: r163685
2010-08-31 19:32:23 +02:00
Paolo Carlini ba6a601c1a remove_freed.cc: Fix test01 return type to void.
2010-08-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/23_containers/forward_list/operations/remove_freed.cc:
	Fix test01 return type to void.
	* testsuite/util/exception/safety.h: Avoid -Wall -m32 warnings.
	* testsuite/util/replacement_memory_operators.h: Likewise.

From-SVN: r163684
2010-08-31 17:24:39 +00:00
Nathan Froyd 9c6a2bee91 arm-protos.h (arm_function_arg_advance): Delete.
* config/arm/arm-protos.h (arm_function_arg_advance): Delete.
	(arm_function_arg): Delete.
	(arm_needs_doubleword_align): Take a const_tree.
	* config/arm/arm.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/arm/arm.c (aapcs_select_call_coproc): Take a const_tree.
	(aapcs_layout_arg, arm_needs_doubleword_align): Likewise.
	(arm_function_arg): Make static.  Take a const_tree and a bool.
	(arm_function_arg_advance): Likewise.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r163683
2010-08-31 17:19:20 +00:00
Andi Kleen a478ffff95 common.opt (fwhopr=): Update for -fwhopr=jobserver
* common.opt (fwhopr=): Update for -fwhopr=jobserver
       * doc/invoke.texi (fwhopr): Document -fwhopr=jobserver.
       * lto-wrapper.c (run_gcc): Add jobserver mode.
       * opts.c (common_handle_option): Fix OPT_fwhopr for non numeric
         argument.

From-SVN: r163680
2010-08-31 16:58:46 +00:00
Uros Bizjak 7d2c38c0b9 i386.md (popdi1): Rewrite using POST_INC memory operand.
* config/i386/i386.md (popdi1): Rewrite using POST_INC memory operand.
	(popsi1): Ditto.
	(*popdi1_epilogue): Ditto.
	(*popsi1_epilogue): Ditto.
	(popsi, popdi peephole2 patterns): Update peepholes for changed
	pop{si,di}1 and *pop{si,di}1_epilogue patterns.

	(pop<mode>1): Macroize insn from pop{si,di}1 using P code iterator.
	(*pop<mode>1_epilogue): Ditto from *pop{si,di}1_epilogue.

	* config/i386/i386.c (*ix86_gen_pop1): Remove indirect function.
	(override_options): Do not initialize removed ix86_gen_pop1.
	(gen_pop): New static function.
	(ix86_expand_prologue): Use gen_pop instead of ix86_gen_pop1.
	(release_scratch_register_on_entry): Ditto.
	(ix86_restore_reg_using_pop): Ditto.
	(ix86_expand_epilogue): Ditto.

From-SVN: r163679
2010-08-31 18:53:56 +02:00
Jakub Jelinek 0f643366ab re PR middle-end/45461 (ICE: verify_gimple failed: INDIRECT_REF in gimple IL with -fshort-enums and va_arg)
PR middle-end/45461
	* builtins.c (dummy_object): Return a MEM_REF instead of INDIRECT_REF.

	* gcc.dg/pr45461.c: New test.

From-SVN: r163678
2010-08-31 18:13:14 +02:00
Nathan Froyd 0835010695 fr30.c (fr30_move_double): Delete `dregno' and extra semicolons.
* config/fr30/fr30.c (fr30_move_double): Delete `dregno' and extra
	semicolons.

From-SVN: r163677
2010-08-31 15:00:43 +00:00
Francois-Xavier Coudert 6cea734df5 extend.texi: Fix documentation of the return value of __builtin_choose_expr.
* doc/extend.texi: Fix documentation of the return value of
	__builtin_choose_expr.

From-SVN: r163675
2010-08-31 14:26:47 +00:00
Nathan Froyd 74a3d2c3aa v850-protos.h (function_arg): Delete.
* config/v850/v850-protos.h (function_arg): Delete.
	* config/v850/v850.h (FUNCTION_ARG): Delete.
	(FUNCTION_ARG_ADVANCE): Move code to...
	* config/v850/v850.c (v850_function_arg_advance): ...here.
	(v850_function_arg): Make static.  Take a const_tree and a bool.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r163674
2010-08-31 14:22:47 +00:00
Nathan Froyd 6fadd9bb86 m32r.h (FUNCTION_ARG, [...]): Move these...
* config/m32r/m32r.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Move
	these...
	(ROUND_ADVANCE, ROUND_ADVANCE_ARG, ROUND_ADVANCE_CUM, PASS_IN_REG_P):
	...and these...
	* config/m32r/m32r.c (m32r_function_arg, m32r_function_arg_advance):
	..to here..
	(ROUND_ADVANCE, ROUND_ADVANCE_ARG, ROUND_ADVANCE_CUM, PASS_IN_REG_P):
	...and here.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r163672
2010-08-31 13:12:14 +00:00
Nathan Froyd 3968a1c0e6 rx-protos.h (rx_function_arg, [...]): Delete.
* config/rx/rx-protos.h (rx_function_arg, rx_function_arg_size):
	Delete.
	* config/rx/rx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	* config/rx/rx.c (rx_function_arg_size): Make static.
	(rx_function_arg): Likewise.
	(rx_function_arg_advance): New function.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.

From-SVN: r163671
2010-08-31 13:10:39 +00:00
Richard Guenther 57c0584a92 re PR testsuite/45455 (gcc.dg/vect/vect-cond-4.c uses uninitialised variable)
2010-08-31  Richard Guenther  <rguenther@suse.de>

	PR testsuite/45455
	* gcc.dg/vect/vect-cond-4.c: Fix use of uninitialized variable.

From-SVN: r163669
2010-08-31 10:01:04 +00:00
Bingfeng Mei 9b9596dd6a pr43430-1.c: Requires vect_condition target.
2010-08-31  Bingfeng Mei  <bmei@broadcom.com>

	* gcc.dg/vect/pr43430-1.c: Requires vect_condition target.

From-SVN: r163668
2010-08-31 09:02:39 +00:00
John Tytgat 4546a2efe3 arm.c (arm_override_options): Remove superfluous test.
* config/arm/arm.c (arm_override_options): Remove superfluous test.
        Fix indentation.

From-SVN: r163667
2010-08-31 08:42:21 +00:00
Eric Botcazou 658af27df6 dwarf2out.c (gen_decl_die): Do not skip in Ada.
* dwarf2out.c (gen_decl_die) <CONST_DECL>: Do not skip in Ada.
	(dwarf2out_decl) <CONST_DECL>: Likewise.

From-SVN: r163666
2010-08-31 07:02:17 +00:00
GCC Administrator 299137e385 Daily bump.
From-SVN: r163665
2010-08-31 00:17:17 +00:00
Janus Weil e8cd398346 re PR fortran/45456 ([OOP] Bogus pointer initialization error on pointer-valued TBP)
2010-08-30  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45456
	* resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.


2010-08-30  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45456
	* gfortran.dg/typebound_proc_18.f03: New.

From-SVN: r163661
2010-08-30 23:56:28 +02:00
Eric Botcazou d3c1230697 Stack usage support
Stack usage support
	* common.opt (-fstack-usage): New option.
	* doc/invoke.texi (Debugging options): Document it.
	* builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to
	allocate_dynamic_stack_space.
	(expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE
	and propagate it to allocate_dynamic_stack_space.
	(expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change.
	* calls.c (initialize_argument_information): Pass TRUE as 4th
	argument to allocate_dynamic_stack_space.
	(expand_call): Set current_function_has_unbounded_dynamic_stack_size
	to 1 when pushing a variable-sized argument onto the stack.  Pass
	TRUE as 4th argument to allocate_dynamic_stack_space.
	Update current_function_pushed_stack_size.
	(emit_library_call_value_1): Likewise.
	* explow.c (allocate_dynamic_stack_space): Add 4th bool parameter
	CANNOT_ACCUMULATE.  If flag_stack_usage, look into the size and
	attempt to find an upper bound.  Remove redundant code for the
	SETJMP_VIA_SAVE_AREA case.
	* expr.h (allocate_dynamic_stack_space): Add 4th bool parameter.
	* function.h (struct stack_usage): New structure.
	(current_function_static_stack_size): New macro.
	(current_function_dynamic_stack_size): Likewise.
	(current_function_pushed_stack_size): Likewise.
	(current_function_dynamic_alloc_count): Likewise.
	(current_function_has_unbounded_dynamic_stack_size): Likewise.
	(current_function_allocates_dynamic_stack_space): Likewise.
	(struct function): Add new field 'su'.
	* function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA,
	add the value of the dynamic offset to the dynamic stack usage.
	(gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA
	for variable-sized objects.
	(prepare_function_start): Allocate cfun->su if flag_stack_usage.
	(rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage.
	* gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to
	BUILT_IN_ALLOCA for variable-sized objects.
	* output.h (output_stack_usage): Declare.
	* toplev.c (stack_usage_file): New file pointer.
	(output_stack_usage): New function.
	(open_auxiliary_file): Likewise.
	(lang_dependent_init): Open file if flag_stack_usage is set.
	(finalize): Close file if stack_usage_file is not null.
	* tree.h (ALLOCA_FOR_VAR_P): New macro.
	* config/alpha/alpha.c (compute_frame_size): New function.
	(alpha_expand_prologue): Use it.
	(alpha_start_function): Likewise.
	(alpha_expand_epilogue): Likewise.  Set stack usage info.
	* config/i386/i386.c (ix86_expand_prologue): Likewise.
	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
	* config/mips/mips.c (mips_expand_prologue): Likewise.
	* config/pa/pa.c (hppa_expand_prologue): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
testsuite/
	* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
	* lib/scanasm.exp (scan-stack-usage): Likewise.
	(scan-stack-usage-not): Likewise.
	* gcc.dg/stack-usage-1.c: New test.
	* gcc.target/i386/stack-usage-realign.c: Likewise.

From-SVN: r163660
2010-08-30 20:04:49 +00:00
Zdenek Dvorak 1987baa3ab re PR tree-optimization/45427 (Number of iteration analysis bogus)
PR tree-optimization/45427
	* tree-ssa-loop-niter.c (number_of_iterations_ne_max): Rewritten.
	Handle the case that the exit is never taken correctly.
	(number_of_iterations_ne): Pass exit_must_be_taken to
	number_of_iterations_ne_max.

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

From-SVN: r163659
2010-08-30 19:50:05 +00:00
Catherine Moore 037f997371 mips.h (BASE_DRIVER_SELF_SPECS): Infer -mdspr2 for the the 74K.
2010-08-31  Catherine Moore  <clm@codesourcery.com>

	* config/mips/mips.h (BASE_DRIVER_SELF_SPECS):
	Infer -mdspr2 for the the 74K.

From-SVN: r163656
2010-08-30 14:57:30 -04:00
Paolo Carlini b960ce040d re PR c++/45043 (ICE: tree check: expected identifier_node, have bit_not_expr in grokdeclarator, at cp/decl.c:8113 on invalid code)
/cp
2010-08-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/45043
	* decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.

/testsuite
2010-08-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/45043
	* g++.dg/template/crash102.C: New.

From-SVN: r163655
2010-08-30 18:13:32 +00:00
Jakub Jelinek b0268cc04f re PR debug/45419 (-fcompare-debug failure at -O3)
PR debug/45419
	* tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable.

From-SVN: r163654
2010-08-30 19:17:15 +02:00
Jakub Jelinek f2b11865fe re PR middle-end/45423 (#pragma omp atomic on bool has issues)
PR middle-end/45423
	* gimplify.c (goa_stabilize_expr): Handle TRUTH_NOT_EXPR
	and TRUTH_{AND,OR,XOR}_EXPR.
	* c-parser.c (c_parser_omp_atomic): Handle boolean
	{PRE,POST}_{INC,DEC}REMENT.
cp/
	* parser.c (cp_parser_omp_atomic): Handle boolean
	{PRE,POST}_INCREMENT.
testsuite/
	* gcc.dg/gomp/atomic-12.c: New test.
	* gcc.dg/gomp/atomic-13.c: New test.
	* gcc.dg/gomp/atomic-14.c: New test.
	* g++.dg/gomp/atomic-11.C: New test.
	* g++.dg/gomp/atomic-12.C: New test.
	* g++.dg/gomp/atomic-13.C: New test.
	* g++.dg/gomp/atomic-14.C: New test.

From-SVN: r163653
2010-08-30 19:16:29 +02:00
Eric Botcazou bd9c7fb909 utils.c (gnat_pushdecl): Remove test for PARM_DECLs.
* gcc-interface/utils.c (gnat_pushdecl): Remove test for PARM_DECLs.
	Attach fake PARM_DECLs to the topmost block of the function.

From-SVN: r163651
2010-08-30 16:30:41 +00:00
Rainer Orth fc26dab30f nested-2.C: Allow for single / as comment delimiter.
* g++.dg/debug/dwarf2/nested-2.C: Allow for single / as comment
	delimiter.

From-SVN: r163650
2010-08-30 16:03:55 +00:00
Nathan Froyd 626a4b315a xtensa-protos.h (function_arg_advance): Delete.
* config/xtensa/xtensa-protos.h (function_arg_advance): Delete.
	(function_arg): Delete.
	* config/xtensa/xtensa.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
	(FUNCTION_INCOMING_ARG): Delete.
	* config/xtensa/xtensa.c (function_arg_advance): Rename to...
	(xtensa_function_arg_advance): ...this.  Make static.  Take a const_tree
	and a bool.
	(function_arg): Rename to...
	(xtensa_function_arg_1): ...this.  Make static.  Take a const_tree and
	a bool.
	(xtensa_function_arg, xtensa_function_incoming_arg): Nex functions.
	(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
	(TARGET_FUNCTION_INCOMING_ARG): Define.

From-SVN: r163649
2010-08-30 16:03:44 +00:00
Eric Botcazou ae4235508e trans.c (call_to_gnu): Also force the return slot opt for the call to a function whose return type was...
* gcc-interface/trans.c (call_to_gnu): Also force the return slot opt
	for the call to a function whose return type was unconstrained.

From-SVN: r163648
2010-08-30 15:59:45 +00:00
Richard Guenther 2e481a2ff5 re PR middle-end/21602 (builtin memmove could be memcpy if src and dst don't alias)
2010-08-30  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/21602
	* builtins.c (fold_builtin_memory_op): Fold memmove to memcpy
	using points-to information.

From-SVN: r163646
2010-08-30 13:46:31 +00:00
Uros Bizjak 3727f43413 * Move compare peephole2 to a better place.
From-SVN: r163645
2010-08-30 15:40:36 +02:00
Olivier Hainque 66194a9876 decl.c (FOREIGN_FORCE_REALIGN_STACK): New macro, replacement for FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
* gcc-interface/decl.c (FOREIGN_FORCE_REALIGN_STACK): New macro,
        replacement for FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
        (gnat_to_gnu_entity) <case ..., E_Procedure>: Use it.

From-SVN: r163641
2010-08-30 13:26:10 +00:00