* function.c (record_hard_reg_sets): Restrict the previous change
to cases where the incoming nominal mode is the same as the
incoming promoted mode and everything happens in MODE_INT.
From-SVN: r162391
PR bootstrap/44970
PR middle-end/45009
* postreload.c: Include "target.h".
(reload_combine_closest_single_use): Don't take DEBUG_INSNs
into account.
(fixup_debug_insns): Don't copy the rtx.
(reload_combine_recognize_const_pattern): DEBUG_INSNs can't
have uses. Don't copy when replacing. Call fixup_debug_insns
in the case where we merged one add with another.
(reload_combine_recognize_pattern): Fail if there aren't any
uses. Try harder to determine whether we're picking a valid
index register. Don't set store_ruid for an insn we're going
to scan in the next iteration.
(reload_combine): Remove unused code.
(reload_combine_note_use): When updating use information for
an old insn, ignore a use that occurs after store_ruid.
* Makefile.in (postreload.o): Update dependencies.
From-SVN: r162390
PR debug/45015
* var-tracking.c (adjust_mems): Ignore ASM_OPERANDS with non-zero
ASM_OPERANDS_OUTPUT_IDX.
(adjust_insn): For inline asm with multiple sets ensure first
ASM_OPERANDS vectors are used by all following ASM_OPERANDS in
the insn.
* gcc.target/m68k/pr45015.c: New test.
From-SVN: r162385
2010-07-21 Changpeng Fang <changpeng.fang@amd.com>
PR tree-optimization/44955
* tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
and imagine parts of a complex, so that they can have the same
base and fall into the same group.
From-SVN: r162381
2010-07-21 Richard Guenther <rguenther@suse.de>
PR lto/45018
* tree.c (find_decls_types_r): Do not follow TREE_CHAIN
of TYPE_DECLs. Do not follow TYPE_NEXT_VARIANT,
TYPE_NEXT_PTR_TO, nor TYPE_NEXT_REF_TO or TYPE_CANONICAL.
* g++.dg/lto/20100721-1_0.C: New testcase.
From-SVN: r162380
2010-07-21 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44900
* tree-sra.c (load_assign_lhs_subreplacements): Updated comments.
(sra_modify_assign): Move gsi to the next statmenent unconditionally.
* testsuite/g++.dg/torture/pr44900.C: New test.
From-SVN: r162375
2010-07-21 Daniel Kraft <d@domob.eu>
* trans.h (gfc_get_return_label): Removed.
(gfc_generate_return): New method.
(gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
returning a tree directly.
* trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
(gfc_trans_block_construct): Update for new interface to
`gfc_trans_deferred_vars'.
* trans-decl.c (current_function_return_label): Removed.
(current_procedure_symbol): New variable.
(gfc_get_return_label): Removed.
(gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
returning a tree directly.
(get_proc_result), (gfc_generate_return): New methods.
(gfc_generate_function_code): Clean up and do init/cleanup here
also with gfc_wrapped_block. Remove return-label but rather
return directly.
From-SVN: r162373
2010-07-21 Richard Guenther <rguenther@suse.de>
PR middle-end/45013
* tree-ssa.c (useless_type_conversion_p): Dispatch to
gimple_types_compatible_p only when in lto.
* gimple.c (gimple_types_compatible_p): Use canonical types
to speed up comparison.
From-SVN: r162371
2010-07-21 Richard Guenther <rguenther@suse.de>
* tree-flow.h (referenced_var): Move define ...
* tree-flow-inline.h (referenced_var): ... here as an inline
function. Assert here ...
* tree-dfa.c (referenced_var_lookup): ... instead of here.
* tree-ssa.c (maybe_optimize_var): Check if the variable
is in referenced vars.
(execute_update_addresses_taken): Remove old broken check.
* gimple-pretty-print.c (pp_points_to_solution): Use
referenced_var_lookup.
* tree-into-ssa.c (dump_decl_set): Likewise.
From-SVN: r162368
PR debug/45003
* var-tracking.c (reverse_op): Also handle {SIGN,ZERO}_EXTEND of
a MEM.
* dwarf2out.c (loc_descriptor): Don't handle SIGN_EXTEND nor
ZERO_EXTEND here.
* gcc.dg/guality/pr45003-2.c: New test.
* gcc.dg/guality/pr45003-3.c: New test.
From-SVN: r162364
* config/arm/arm.md (thumb1_addsi3): Add alternative and split for
computing the sum of the stack pointer and a large constant.
* config/arm/constraints.md (M): Remove superfluous parentheses.
(Pc): New constraint.
From-SVN: r162355
PR c++/44641
* gcc/cp/pt.c (instantiate_class_template): Propagate the
template's location to its instance.
* gcc/testsuite/lib/scanasm.exp (dg-function-on-line): Test
that a function is defined on the current line.
* gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C: New.
Line number sanity test.
* gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C: New.
From-SVN: r162349
* postreload.c (fixup_debug_insns): Remove arg REGNO. New args
FROM and TO. All callers changed. Don't look for tracked uses,
just scan the RTL for DEBUG_INSNs and substitute.
(reload_combine_recognize_pattern): Call fixup_debug_insns.
(reload_combine): Ignore DEBUG_INSNs.
From-SVN: r162342
PR debug/45003
* cfgexpand.c (expand_debug_expr) <case NOP_EXPR>: Use ZERO_EXTEND
or SIGN_EXTEND depending on TYPE_UNSIGNED of the operand's type
instead of the result's type.
* gcc.dg/guality/pr45003-1.c: New test.
From-SVN: r162336
2010-07-20 Richard Guenther <rguenther@suse.de>
PR middle-end/44971
PR middle-end/44988
* tree-ssa.c (maybe_optimize_var): New function split out from ...
(execute_update_addresses_taken): ... here.
(non_rewritable_mem_ref_base): Likewise.
(execute_update_addresses_taken): Do not iterate over all referenced
vars but just all local decls and parms.
Properly check call and asm arguments and rewrite call arguments.
* gcc.dg/pr44971.c: New testcase.
* gcc.c-torture/compile/pr44988.c: Likewise.
From-SVN: r162329
2010-07-19 Benjamin Kosnik <bkoz@redhat.com>
* doc/Makefile.am (doc-texinfo): New rule.
(doc-texinfo-docbook): New rule.
(DB2TEXI_FLAGS): New.
(doc-xml-single-docbook): Just the manual, not the set. Tweak flags.
* doc/Makefile.in: Regenerate.
From-SVN: r162327
2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/44929
* gfortran.dg/allocate_with_typespec.f90: New test.
* gfortran.dg/allocate_derived_1.f90: Update error message.
2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/44929
* fortran/match.c (match_type_spec): Check for derived type before
intrinsic types.
From-SVN: r162325
gcc/
* gengtype.c (start_root_entry): New function, split out from
write_root. Check whether V is null and raise an error if so.
(write_field_root): Check for V being null. Don't raise an error here;
set V to null instead.
(write_root): Update comment above function. Use start_root_entry.
From-SVN: r162314
2010-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42385
* interface.c (matching_typebound_op): Add argument for the
return of the generic name for the procedure.
(build_compcall_for_operator): Add an argument for the generic
name of an operator procedure and supply it to the expression.
(gfc_extend_expr, gfc_extend_assign): Use the generic name in
calls to the above procedures.
* resolve.c (resolve_typebound_function): Catch procedure
component calls for CLASS objects, check that the vtable is
complete and insert the $vptr and procedure components, to make
the call.
(resolve_typebound_function): The same.
* trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
an allocatable scalar if it is a result.
2010-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/42385
* gfortran.dg/class_defined_operator_1.f03 : New test.
From-SVN: r162313