1. 01 Sep, 2010 3 commits
  2. 31 Aug, 2010 21 commits
  3. 30 Aug, 2010 16 commits
    • re PR fortran/45456 ([OOP] Bogus pointer initialization error on pointer-valued TBP) · e8cd3983
      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
      Janus Weil committed
    • Stack usage support · d3c12306
      	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
      Eric Botcazou committed
    • re PR tree-optimization/45427 (Number of iteration analysis bogus) · 1987baa3
      	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
      Zdenek Dvorak committed
    • mips.h (BASE_DRIVER_SELF_SPECS): Infer -mdspr2 for the the 74K. · 037f9973
      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
      Catherine Moore committed
    • re PR c++/45043 (ICE: tree check: expected identifier_node, have bit_not_expr in… · b960ce04
      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
      Paolo Carlini committed
    • re PR debug/45419 (-fcompare-debug failure at -O3) · b0268cc0
      	PR debug/45419
      	* tree-ssa-live.c (dump_enumerated_decls): Clear the whole wi variable.
      
      From-SVN: r163654
      Jakub Jelinek committed
    • re PR middle-end/45423 (#pragma omp atomic on bool has issues) · f2b11865
      	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
      Jakub Jelinek committed
    • utils.c (gnat_pushdecl): Remove test for PARM_DECLs. · bd9c7fb9
      	* 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
      Eric Botcazou committed
    • nested-2.C: Allow for single / as comment delimiter. · fc26dab3
      	* g++.dg/debug/dwarf2/nested-2.C: Allow for single / as comment
      	delimiter.
      
      From-SVN: r163650
      Rainer Orth committed
    • xtensa-protos.h (function_arg_advance): Delete. · 626a4b31
      	* 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
      Nathan Froyd committed
    • trans.c (call_to_gnu): Also force the return slot opt for the call to a function… · ae423550
      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
      Eric Botcazou committed
    • re PR middle-end/21602 (builtin memmove could be memcpy if src and dst don't alias) · 2e481a2f
      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
      Richard Guenther committed
    • * Move compare peephole2 to a better place. · 3727f434
      From-SVN: r163645
      Uros Bizjak committed
    • decl.c (FOREIGN_FORCE_REALIGN_STACK): New macro, replacement for… · 66194a98
      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
      Olivier Hainque committed
    • Replace | with || in TARGET_HAS_SINCOS. · a95054c1
      2010-08-30  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* config/linux.h (TARGET_HAS_SINCOS): Replace | with ||.
      
      From-SVN: r163640
      H.J. Lu committed