1. 16 Apr, 2010 22 commits
  2. 15 Apr, 2010 18 commits
    • re PR target/43741 (sh-elf ICEs for libstdc++-v3/src/ios_init.cc with -m2a) · 7140f0f9
      	PR target/43471
      	* config/sh/sh.c (sh_legitimize_reload_address): Use
      	MAYBE_BASE_REGISTER_RTX_P instead of BASE_REGISTER_RTX_P.
      	Remove a unneeded check for offset_base.
      
      From-SVN: r158393
      Kaz Kojima committed
    • re PR fortran/30073 (Array out of bounds gives name of RHS array not LHS array) · e3e529d1
          PR fortran/30073
          * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
          block of code.  Set name to the variable associated with the descriptor.
      
      From-SVN: r158392
      Steven G. Kargl committed
    • cuintp.c (UI_To_gnu): Fix long line. · 58c8f770
      	* gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
      	* gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
      	(process_attributes): Delete.
      	(post_error_ne_num): Change parameter name.
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
      	with -g3.  Remove a couple of obsolete lines.  Minor tweaks.
      	If type annotating mode, operate on trees to compute the adjustment to
      	the sizes of tagged types.  Fix long line.
      	(cannot_be_superflat_p): Tweak head comment.
      	(annotate_value): Fold local constant.
      	(set_rm_size): Fix long line.
      	* gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
      	(Attribute_to_gnu): Fix long line.
      	<Attr_Size>: Remove useless assertion.
      	Reorder statements.  Use size_binop routine.
      	(Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
      	Create local variables for the label and the test.  Tweak comments.
      	(Subprogram_Body_to_gnu): Reset cfun to NULL.
      	(Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
      	(process_inlined_subprograms): Integrate into...
      	(Compilation_Unit_to_gnu): ...this.
      	(gnat_to_gnu): Fix long line.
      	(post_error_ne_num): Change parameter name.
      	* gcc-interface/utils.c (process_attributes): Static-ify.
      	<ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
      	(create_type_decl): Add comment.
      	(create_var_decl_1): Process the attributes after adding the VAR_DECL
      	to the current binding level.
      	(create_subprog_decl): Likewise for the FUNCTION_DECL.
      	(end_subprog_body): Do not reset cfun to NULL.
      	(build_vms_descriptor32): Fix long line.
      	(build_vms_descriptor): Likewise.
      	(handle_nonnull_attribute): Likewise.
      	(convert_vms_descriptor64): Likewise.
      	* gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
      	(gnat_protect_expr): Fix thinko.
      
      From-SVN: r158390
      Eric Botcazou committed
    • trans.c (gigi): Set DECL_IGNORED_P on EH functions. · 1fc24649
      	* gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
      	(gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
      	before translating the top-level node.
      	(lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
      	<N_Object_Declaration>: Likewise.
      	<N_Assignment_Statement>: Likewise.
      	<N_Unchecked_Type_Conversion>: Likewise.
      	(call_to_gnu): Remove kludge.
      	(gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
      	associated with user returns to be preserved.
      	(gnat_to_gnu): Add special code to deal with boolean rvalues.
      	* gcc-interface/utils2.c (compare_arrays): Set input_location on all
      	comparisons.
      	(build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
      	<INDIRECT_REF>: Call build_fold_indirect_ref.
      
      From-SVN: r158388
      Eric Botcazou committed
    • Regenerate gcc/configure. · bafaef55
      2010-04-15  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* configure: Regenerated.
      
      From-SVN: r158386
      H.J. Lu committed
    • s390.c (s390_call_save_register_used): Switch back to HARD_REGNO_NREGS. · e8de8fea
      2010-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
      
      	* config/s390/s390.c (s390_call_save_register_used): Switch back
      	to HARD_REGNO_NREGS.
      
      From-SVN: r158384
      Andreas Krebbel committed
    • g-socket.adb: A target can have multiple missing errno's. · 8c709695
      2010-04-15  Joel Sherrill <joel.sherrill@oarcorp.com>
      
      	* g-socket.adb: A target can have multiple missing errno's.  This
      	will result in multiple errno's being defined as -1.  Because of this
      	we can not use a case but must use a series of if's to avoid 
      	a duplicate case error in GNAT.Sockets.Resolve_Error.
      
      From-SVN: r158382
      Joel Sherrill committed
    • gsocket.h: Run-time can no longer be built without network OS headers available. · d8a653c5
      2010-04-13  Joel Sherrill <joel.sherrill@oarcorp.com>
      
      	* gsocket.h: Run-time can no longer be built without network
      	OS headers available.  Changing RTEMS GNAT build procedure to
      	reflect this and letting run-time build use network .h files.
      
      From-SVN: r158381
      Joel Sherrill committed
    • alias.c (alias_set_subset_of): Handle alias-set zero child properly. · 038a39d1
      2010-04-15  Richard Guenther  <rguenther@suse.de>
      
      	* alias.c (alias_set_subset_of): Handle alias-set zero
      	child properly.
      
      From-SVN: r158380
      Richard Guenther committed
    • thumb2.md (thumb2_movsi_insn): Split ldr and str alternatives according to use… · 28907f9a
      thumb2.md (thumb2_movsi_insn): Split ldr and str alternatives according to use of high and low regs.
      
      	gcc/
      	* config/arm/thumb2.md (thumb2_movsi_insn): Split ldr and str
      	alternatives according to use of high and low regs.
      	* config/arm/vfp.md (thumb2_movsi_vfp): Likewise.
      	* config/arm/arm.h (CONDITIONAL_REGISTER_USAGE): Use high regs when
      	optimizing for size on Thumb-2.
      
      
      Co-Authored-By: Julian Brown <julian@codesourcery.com>
      
      From-SVN: r158378
      Mark Shinwell committed
    • config.gcc: Handle softfp as for Linux. · 3f56ef8b
      2010-04-15 Thomas Schwinge <tschwinge@gnu.org>
      
      	gcc/
      	* config.gcc <i[34567]86-*-gnu*>: Handle softfp as for Linux.
      
      	libgcc/
      	* config.host <i[34567]86-*-gnu*>: Handle softfp as for Linux.
      
      From-SVN: r158375
      Thomas Schwinge committed
    • tree-ssa-structalias.c (struct variable_info): Add is_fn_info flag. · 25a6a873
      2010-04-15  Richard Guenther  <rguenther@suse.de>
      
      	* tree-ssa-structalias.c (struct variable_info): Add
      	is_fn_info flag.
      	(new_var_info): Initialize it.
      	(dump_constraints): Support printing last added constraints.
      	(debug_constraints): Adjust.
      	(dump_constraint_graph): Likewise.
      	(make_heapvar_for): Check for NULL cfun.
      	(get_function_part_constraint): New function.
      	(get_fi_for_callee): Likewise.
      	(find_func_aliases): Properly implement IPA PTA constraints.
      	(process_ipa_clobber): New function.
      	(find_func_clobbers): Likewise.
      	(insert_into_field_list_sorted): Remove.
      	(create_function_info_for): Properly allocate vars for IPA mode.
      	Do not use insert_into_field_list_sorted.
      	(create_variable_info_for): Properly generate constraints for
      	global vars in IPA mode.
      	(dump_solution_for_var): Always dump the solution.
      	(set_uids_in_ptset): Initialize DECL_PT_UID if in ipa-mode.
      	(find_what_var_points_to): Adjust.
      	(pt_solution_set): Change.
      	(pt_solution_ior_into): New function.
      	(pt_solution_empty_p): Export.
      	(pt_solution_includes_global): Adjust.
      	(pt_solution_includes_1): Likewise.
      	(pt_solutions_intersect_1): Likewise.
      	(dump_sa_points_to_info): Check some invariants.
      	(solve_constraints): Move constraint dumping ...
      	(compute_points_to_sets): ... here.
      	(ipa_pta_execute): ... and here.
      	(compute_may_aliases): Do not re-compute points-to info
      	locally if IPA info is available.
      	(ipa_escaped_pt): New global var.
      	(ipa_pta_execute): Properly implement IPA PTA.
      	* tree-into-ssa.c (dump_decl_set): Support dumping
      	decls not in referenced-vars.
      	* tree-flow.h (struct gimple_df): Add ipa_pta flag.
      	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Adjust.
      	(dump_points_to_solution): Likewise.
      	* tree-dfa.c (dump_variable): Also dump DECL_PT_UID.
      	* tree-inline.c (remap_ssa_name): Copy IPA points-to solution.
      	(remap_gimple_stmt): Reset call clobber/use information if
      	necessary.
      	(copy_decl_to_var): Copy DECL_PT_UID.
      	(copy_result_decl_to_var): Likewise.
      	* tree.c (make_node_stat): Initialize DECL_PT_UID.
      	(copy_node_stat): Copy it.
      	* tree.h (DECL_PT_UID): New macro.
      	(SET_DECL_PT_UID): Likewise.
      	(DECL_PT_UID_SET_P): Likewise.
      	(struct tree_decl_minimal): Add pt_uid member.
      	* tree-ssa-alias.h (struct pt_solution): Add ipa_escaped flag.
      	(pt_solution_empty_p): Declare.
      	(pt_solution_set): Adjust.
      	(ipa_escaped_pt): Declare.
      	* cfgexpand.c (update_alias_info_with_stack_vars): Adjust.
      	* gimple-pretty-print.c (pp_points_to_solution): New function.
      	(dump_gimple_call): Dump call clobber/use information.
      	* tree-dump.c (dump_option_value_in): Add TDF_ALIAS entry.
      	* tree-pass.h (TDF_ALIAS): New dump option.
      	* tree-pretty-print.c (dump_decl_name): Dump DECL_PT_UID if asked to.
      	* doc/invoke.texi (-fipa-pta): Update documentation.
      
      	* gcc.dg/ipa/ipa-pta-1.c: New testcase.
      	* gcc.dg/ipa/ipa-pta-2.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-3.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-4.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-5.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-6.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-7.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-8.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-9.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-10.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-11.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-12.c: Likewise.
      	* gcc.dg/ipa/ipa-pta-13.c: Likewise.
      	* gcc.dg/torture/ipa-pta-2.c: Likewise.
      	* gcc.dg/torture/ipa-pta-1.c: Adjust.
      
      From-SVN: r158374
      Richard Guenther committed
    • Makefile.in (OBJS-common): Add gimple-fold.o. · cbdd87d4
      2010-04-15  Richard Guenther  <rguenther@suse.de>
      
      	* Makefile.in (OBJS-common): Add gimple-fold.o.
      	(gimple-fold.o): New rule.
      	* tree.h (maybe_fold_offset_to_reference,
      	maybe_fold_offset_to_address, maybe_fold_stmt_addition): Move
      	prototypes ...
      	* gimple.h: ... here.
      	* tree-flow.h (fold_stmt, fold_stmt_inplace, get_symbol_constant_value,
      	may_propagate_address_into_dereference): Move prototypes ...
      	* gimple.h: ... here.
      	* tree-ssa-ccp.c (get_symbol_constant_value,
      	may_propagate_address_into_dereference, maybe_fold_offset_to_array_ref,
      	maybe_fold_offset_to_component_ref, maybe_fold_offset_to_reference,
      	maybe_fold_offset_to_address, maybe_fold_stmt_indirect,
      	maybe_fold_stmt_addition, maybe_fold_reference, get_maxval_strlen,
      	ccp_fold_builtin, fold_gimple_assign, fold_gimple_cond,
      	fold_gimple_call, fold_stmt_1, fold_stmt, fold_stmt_inplace,
      	gimplify_and_update_call_from_tree): Move ...
      	* gimple-fold.c: ... here.  New file.
      	(ccp_fold_builtin): Rename to ...
      	(gimple_fold_builtin): ... this.
      	* tree-ssa-ccp.c (execute_fold_all_builtins): Adjust.
      
      From-SVN: r158373
      Richard Guenther committed
    • fold-const.c (LOWPART, [...]): Move ... · 330db1e3
      2010-04-15  Richard Guenther  <rguenther@suse.de>
      
      	* fold-const.c (LOWPART, HIGHPART, BASE, encode, decode,
      	fit_double_type, force_fit_type_double, add_double_with_sign,
      	neg_double, mul_double_with_sign, lshift_double, rshift_double,
      	lrotate_double, rrotate_double, div_and_round_double): Move ...
      	* double-int.c: ... here.
      	* tree.h (force_fit_type_double, fit_double_type, add_double_with_sign,
      	add_double, neg_double, mul_double_with_sign, mul_double,
      	lshift_double, rshift_double, lrotate_double, rrotate_double,
      	div_and_round_double): Move prototypes ...
      	* double-int.h: ... here.
      
      From-SVN: r158372
      Richard Guenther committed
    • trans.c (call_to_gnu): Open a nesting level if this is a statement. · 0b3467c4
      	* gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
      	a statement.  Otherwise, if at top-level, push the processing of the
      	elaboration routine.  In the misaligned case, issue the error messages
      	again on entry and create the temporary explicitly.  Do not issue them
      	for CONSTRUCTORs.
      	For a function call, emit the range check if necessary.
      	In the copy-in copy-out case, create the temporary for the return
      	value explicitly.
      	Do not unnecessarily convert by-ref parameters to the formal's type.
      	Remove obsolete guards in conditions.
      	(gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
      	target to call_to_gnu in all cases.
      	(gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
      	(addressable_p) <CONSTRUCTOR>: Return false if not static.
      	<COMPOUND_EXPR>: New case.
      	* gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
      	expression if it has unconstrained array type.
      	(gnat_mark_addressable) <COMPOUND_EXPR>: New case.
      	(gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
      	individual basis.
      
      From-SVN: r158371
      Eric Botcazou committed
    • trans.c (gigi): Do not start statement group. · a09d56d8
      	* gcc-interface/trans.c (gigi): Do not start statement group.
      	(Compilation_Unit_to_gnu): Set current_function_decl to NULL.
      	Start statement group and push binding level here...
      	(gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
      	Do not push fake contexts at top level.  Remove redundant code.
      	(call_to_gnu): Rename a local variable and constify another.
      	* gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
      	(set_current_block_context): Set it as the group's block.
      	(gnat_init_decl_processing): Delete unrelated init code.
      	(end_subprog_body): Use NULL_TREE.
      
      From-SVN: r158370
      Eric Botcazou committed
    • trans.c (call_to_gnu): Do not unnecessarily force side-effects of actual… · 932c8650
      trans.c (call_to_gnu): Do not unnecessarily force side-effects of actual parameters before the call.
      
      	* gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
      	side-effects of actual parameters before the call.
      
      From-SVN: r158369
      Eric Botcazou committed
    • decl.c (validate_size): Reorder, remove obsolete test and warning. · 8ff6c664
      	* gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
      	and warning.
      	(set_rm_size): Reorder and remove obsolete test.
      
      From-SVN: r158368
      Eric Botcazou committed