2010-07-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/44773
* trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
if the lhs has never been host associated, as well as not being
use associated, a pointer or a target.
* resolve.c (resolve_variable): Mark variables that are host
associated.
* gfortran.h: Add the host_assoc bit to the symbol_attribute
structure.
From-SVN: r162038
2010-07-10 Richard Guenther <rguenther@suse.de>
PR lto/44889
* gimple.c (gimple_fixup_complete_and_incomplete_subtype_p): New
helper function.
(gimple_types_compatible_p): Similar to pointed-to
types allow and merge a mix of complete and incomplete aggregate.
Use gimple_fixup_complete_and_incomplete_subtype_p for that.
(iterative_hash_gimple_type): Adjust for that.
* gcc.dg/lto/20100709-1_0.c: New testcase.
* gcc.dg/lto/20100709-1_1.c: Likewise.
From-SVN: r162032
gcc/
PR objc/44140
* config/darwin.c (output_objc_section_asm_op): Save and restore
section when outputting ObjC section list.
testsuite/
PR objc/44140
* objc.dg/lto/trivial-1_0.m: New.
* objc.dg/lto/lto.exp: New.
* obj-c++.dg/lto/trivial-1_0.mm: New.
* obj-c++.dg/lto/lto.exp: New.
* objc.dg/symtab-1.m: Adjust sizes.
* objc.dg/image-info.m: Do not run for gnu-runtime.
gcc/objc/
PR objc/44140
* objc-act.c: build_objc_string_decl() remove declaration.
(finish_var_decl): Remove forcing of var output and marking
as "Used".
(init_def_list): Use integer_zero_node.
(init_objc_symtab): Use integer_zero_node, make the short
integer type specific on relevant nodes.
(generate_objc_symtab_decl): Remove call to
forward_declare_categories(). Use null_pointer_node where
appropriate.
(build_module_descriptor): Comment and mark this item as
DECL_PRESERVE_P.
(generate_static_references): Use gcc_unreachable instead of
abort ().
(diagnose_missing_method): New.
(build_next_selector_translation_table): New.
(build_gnu_selector_translation_table): New.
(add_objc_string): Merge code from build_objc_string_decl...
... and delete build_objc_string_decl().
(generate_dispatch_table): Make integer types explicit.
(generate_category): Pass implent and arrange for the data
to be extracted within the routine. Do not start new vars,
but finish the ones collcted during parsing.
(generate_shared_structures): Likewise.
(finish_objc): Reorder code so that we finish variables before
referencing them. Save the global data before calling meta-data
creation routines, and pass the current reference to the two
main routines. Only call generate_objc_image_info () for the
NeXT runtime.
(generate_classref_translation_entry): Comment on and make this
item DECL_PRESERVE_P.
(handle_class_ref): Use varpool interfaces, comment on and make
this item DECL_PRESERVE_P.
(handle_impent): Likewise.
(generate_objc_image_info): Only generate when the content is
non-zero. Make integer types explict.
From-SVN: r162030
2010-07-09 Changpeng Fang <changpeng.fang@amd.com>
PR tree-optimization/44576
* tree-ssa-loop-prefetch.c (trip_count_to_ahead_ratio_too_small_p):
New. Pull out from is_loop_prefetching_profitable to implement
the trip count to ahead ratio heuristic.
(mem_ref_count_reasonable_p): New. Pull out from
is_loop_prefetching_profitable to implement the instruction to
memory reference ratio heuristic. Also consider not reasonable if
the memory reference count is above a threshold (to avoid
explosive compilation time.
(insn_to_prefetch_ratio_too_small_p): New. Pull out from
is_loop_prefetching_profitable to implement the instruction to
prefetch ratio heuristic.
(is_loop_prefetching_profitable): Removed.
(loop_prefetch_arrays): Distribute the cost analysis across the
function to allow early exit of the prefetch analysis.
is_loop_prefetching_profitable is splitted into three functions,
with each one called as early as possible.
(PREFETCH_MAX_MEM_REFS_PER_LOOP): New. Threshold above which the
number of memory references in a loop is considered too many.
From-SVN: r162023
* config/arm/arm.md (cbranchqi4): Fix array size.
(addsi3_cbranch): Also andle alternative 2 like alternative 3 when
calculating length.
From-SVN: r162022
* reload.c (find_reloads): Don't clear badop if we have a
winreg alternative, but not win, and the class only has fixed
regs.
* hard-reg-set.h (class_only_fixed_regs): Declare.
* reginfo.c (class_only_fixed_regs): New array.
(init_reg_sets_1): Initialize it.
* config/arm/arm.md (arm_addsi3, thumb1_addsi3, arm_subsi3_insn): Don't
discourage alternatives using the stack pointer.
testsuite/
* gcc.dg/pr32370.c: Allow another kind of error message.
From-SVN: r162019
2010-07-09 Richard Guenther <rguenther@suse.de>
* gimple.c (struct type_fixup_s): New struct and VEC type.
(gimple_register_type_fixups): New static global.
(gimple_queue_type_fixup): New function.
(gimple_types_compatible_p): Queue type fixups instead of
applying them here.
(gimple_register_type): Apply queued fixups for the
canonical type. Empty the type fixup queue.
From-SVN: r162017
2010-07-09 Janus Weil <janus@gcc.gnu.org>
* intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
SIZEOF and C_SIZEOF.
From-SVN: r162006
2010-07-09 Richard Guenther <rguenther@suse.de>
PR middle-end/44890
* tree-ssa-address.c (create_mem_ref_raw): Only build a MEM_REF
if base is a pointer.
* tree-cfg.c (verify_expr): Update MEM_REF checking.
From-SVN: r162005
2010-07-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44882
* tree-vect-stmts.c (vectorizable_store): Do not assert alias
sets do conflict.
(vectorizable_load): Likewise.
* gfortran.dg/pr44882.f90: New testcase.
From-SVN: r161990
PR target/40657
* config/arm/arm.c (thumb1_extra_regs_pushed): New arg FOR_PROLOGUE.
All callers changed.
Handle the case when we're called for the epilogue.
(thumb_unexpanded_epilogue): Use it.
(thumb1_expand_epilogue): Likewise.
testsuite/
PR target/40657
* gcc.target/arm/pr40657-1.c: New test.
* gcc.target/arm/pr40657-2.c: New test.
* gcc.c-torture/execute/pr40657.c: New test.
From-SVN: r161988
* tree-vrp.c (extract_range_from_binary_expr) <BIT_AND_EXPR>: If
both ranges are range_int_cst_p with non-negative minimum,
try harder to derive smaller range.
* gcc.dg/tree-ssa/vrp50.c: New test.
* gcc.dg/vect/slp-perm-4.c (main): Make sure loop isn't vectorized.
From-SVN: r161984
PR middle-end/44843
* emit-rtl.c (set_mem_attributes_minus_bitpos): Do not rely on the
pointed-to type of the offset in a MEM_REF to compute the alignment.
From-SVN: r161974
PR fortran/44847
* match.c (match_exit_cycle): Error on EXIT also from collapsed
!$omp do loops. Error on CYCLE to non-innermost collapsed
!$omp do loops.
* gfortran.dg/gomp/pr44847.f90: New test.
From-SVN: r161967