PR middle-end/51389
* Makefile.in (tree-data-ref.o): Depend on $(PARAMS_H).
* tree-data-ref.h (find_data_references_in_loop): Remove declaration.
* tree-data-ref.c (find_data_references_in_loop): Make static.
(compute_all_dependences): Change return type to bool. Bail out
for too many datarefs in a loop. Move the hunk resetting the data
dependences vector from ...
(compute_data_dependences_for_loop): ... here. Account for
compute_all_dependences returning false.
(compute_data_dependences_for_bb): Likewise.
* params.def (PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS): New param.
* doc/invoke.texi (loop-max-datarefs-for-datadeps): Document it.
From-SVN: r183624
2012-01-27 Richard Guenther <rguenther@suse.de>
PR middle-end/51959
* expr.c (store_field): Use the alias-set of the scratch memory
for storing to it.
* g++.dg/torture/pr51959.C: New testcase.
From-SVN: r183616
2012-01-27 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/48705
PR fortran/51870
PR fortran/51943
PR fortran/51946
* trans-array.c (gfc_array_init_size): Add two extra arguments
to convey the dynamic element size of a calls object and to
return the number of elements that have been allocated.
(gfc_array_allocate): Add the same arguments and use them to
call gfc_array_init_size. Before the allocation dereference
the data pointer, if necessary. Set the allocated array to zero
if the class element size or expr3 are non-null.
* trans-expr.c (gfc_conv_class_to_class): Give this function
global scope.
(get_class_array_ref): New function.
(gfc_copy_class_to_class): New function.
* trans-array.h : Update prototype for gfc_array_allocate.
* trans-stmt.c (gfc_trans_allocate): For non-variable class
STATUS expressions extract the class object and the dynamic
element size. Use the latter to call gfc_array_allocate and
the former for setting the vptr and, via
gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
* trans.h : Prototypes for gfc_get_class_array_ref,
gfc_copy_class_to_class and gfc_conv_class_to_class.
2012-01-27 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/48705
* gfortran.dg/class_allocate_11.f03: New.
PR fortran/51870
PR fortran/51943
PR fortran/51946
* gfortran.dg/class_allocate_7.f03: New.
* gfortran.dg/class_allocate_8.f03: New.
* gfortran.dg/class_allocate_9.f03: New.
* gfortran.dg/class_allocate_10.f03: New.
Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>
From-SVN: r183613
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set
an alignment on fields of the RETURN type built for the CICO mechanism.
From-SVN: r183611
* gcc-interface/trans.c (gnat_to_gnu): Avoid making a SAVE_EXPR for
a call to a function that returns an unconstrained type with default
discriminant. Similarly, avoid doing the conversion to the nominal
From-SVN: r183610
* gcc-interface/ada-tree.h (DECL_ALIASED_P): New flag.
* gcc-interface/decl.c (is_variable_size): Rename to...
(type_has_variable_size): ...this.
(adjust_packed): Adjust to above renaming.
(gnat_to_gnu_field): Set DECL_ALIASED_P on the field.
(field_is_artificial): New predicate.
(field_is_aliased): Likewise.
(field_has_self_size): Likewise.
(field_has_variable_size): Likewise.
(components_to_record): Record information for the final layout during
the first pass on fields.
If there is an aliased field placed after a field whose length depends
on discriminants, put all the fields of the latter sort, last.
From-SVN: r183609
* gcc-interface/gigi.h (get_minimal_subprog_decl): Declare.
* gcc-interface/decl.c (get_minimal_subprog_decl): New function.
* gcc-interface/trans.c (Attribute_to_gnu): Use it for the prefix of an
Access-like attribute in a dispatch table if the subprogram is public.
From-SVN: r183607
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: For an aliased
object with an unconstrained nominal subtype and if optimization isn't
enabled, create a special VAR_DECL for debugging purposes.
From-SVN: r183605
* config/m68k/m68k.c (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New.
* config/m68k/sync.md (atomic_test_and_set): Rename from
sync_test_and_setqi and adjust the operands.
(atomic_test_and_set_1): Rename from sync_test_and_setqi_1
and unconditionally enable.
From-SVN: r183585
* include/bits/atomic_base.h (__atomic_flag_base): Define _M_i
based on the value of __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
(ATOMIC_FLAG_INIT): Initialize with 0, not false.
(atomic_flag::atomic_flag): Use __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
From-SVN: r183582
PR rtl-optimization/51978
* ree.c (make_defs_and_copies_lists): Change set_pat type
to const_rtx.
(combine_reaching_defs): Likewise.
(struct re_info): Remove.
(add_removable_extension): Remove x and data arguments,
add insn, insn_list and def_map. Use the arguments directly
instead of using struct re_info.
(find_removable_extensions): Don't call add_removable_extension
through note_stores, instead just call it with single_set
result if non-NULL.
(find_and_remove_re): Pass curr_cand->expr instead of
PATTERN (curr_cand->insn) as set_pat argument to
combine_reaching_defs.
From-SVN: r183567
PR tree-optimization/46590
* cfgexpand.c: Revert last change (r183305).
* gimplify.c (gimplify_bind_expr): Add clobbers for all non-gimple
regs.
* tree-eh.c (cleanup_empty_eh): Try to optimize clobbers before
checking for emptiness.
From-SVN: r183566
2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.h: Make BRANCH_COST an option.
* config/s390/s390.opt: New option -mbranch-cost.
2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
* gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
memory.
* gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
the default value for s390 and s390x.
From-SVN: r183555