2009-11-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/42154
* tree-sra.c (struct access): Added comments.
(sra_modify_expr): Build references to the old aggregate with
build_ref_for_offset instead of reusing access->expr.
(load_assign_lhs_subreplacements): Likewise.
* testsuite/gcc.c-torture/execute/pr42154.c: New test.
From-SVN: r154493
2009-11-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/42045
* resolve.c (resolve_actual_arglist): Make sure procedure pointer
actual arguments are resolved correctly.
(resolve_function): An EXPR_FUNCTION which is a procedure pointer
component, has already been resolved.
(resolve_fl_derived): Procedure pointer components should not be
implicitly typed.
2009-11-24 Janus Weil <janus@gcc.gnu.org>
PR fortran/42045
* gfortran.dg/proc_ptr_comp_2.f90: Correct invalid test case.
* gfortran.dg/proc_ptr_comp_3.f90: Extended test case.
* gfortran.dg/proc_ptr_comp_24.f90: New.
From-SVN: r154492
* config/i386/i386.md (add<mode>3_carry): Change insn pattern
to expander.
(sub<mode>3_carry): Ditto.
(x86_mov<mode>cc_0_m1): Ditto.
(*add<mode>3_carry): New insn pattern. Use VOIDmode match_operator
for ix86_carry_flag_operator operator predicate.
(*sub<mode>3_carry): Ditto.
(*x86_mov<mode>cc_0_m1): Ditto.
(*addsi3_carry_zext): Use VOIDmode match_operator for
ix86_carry_flag_operator operator predicate.
(*subsi3_carry_zext): Ditto.
(*x86_mov<mode>cc_0_m1_s): Ditto.
(*x86_mov<mode>cc_0_m1_neg): Ditto.
* config/i386/predocates.md (ix86_carry_flag_operator): Do not
check operator sub-expressions for FLAGS_REG and const0_rtx.
* config/i386/i386.c (*ix86_gen_sub3_carry): Update prototype.
(ix86_expand_int_movcc): Update calls to gen_x86_mov{si,di}cc_0_m1.
(ix86_expand_int_addcc): Update calls to
gen_{add,sub}{qi,hi,si,di}3_carry. Do not set mode of compare_op.
(ix86_expand_strlensi_unroll_1): Update calls to ix86_gen_sub3_carry.
Do not set mode of compare operation.
From-SVN: r154480
PR testsuite/36470
* gcc.dg/utf-cvt.c: Skip int test for 16bit int targets.
Enable short test for avr target.
* gcc.dg/utf32-1.c: Enable test for avr and m32 targets.
* gcc.dg/utf32-2.c: Ditto.
* gcc.dg/utf32-3.c: Ditto.
* gcc.dg/utf32-4.c: Enable test for non-32bit targets.
From-SVN: r154471
* gcc.dg/pr36998.c: Frame pointer required for avr target.
* gcc.dg/debug/pr41264-1.c: Use long if int size 16bit or smaller.
* gcc.dg/pr39226.c: Use smaller bitfield if int size is 16bit.
* gcc.dg/pr41340.c: Test requires long pointer target.
* gcc.dg/profile-generate-3.c: Test requires profiling support.
From-SVN: r154467
* ipa-cp.c (ipcp_compute_node_scale): Work around completely
wrong profile updates.
* predict.c (counts_to_freqs): Be expected for ENTRY/EXIT block
having largest frequency.
* ira-live.c (ira_implicitly_set_insn_hard_regs): Silecne
used uninitalized warning.
* tree-optimize.c (execute_fixup_cfg): Rescale entry and exit block
frequencies.
From-SVN: r154462
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Pass the list
of attributes when building the corresponding variable of a constant.
* gcc-interface/utils.c (create_var_decl_1): Do not process attributes
for constants.
From-SVN: r154458
Fix PR c++/14777
gcc/cp/ChangeLog:
PR c++/14777
* cp-tree.def <TEMPLATE_INFO>: Declare new kind of tree
node.
* cp-tree.h (struct tree_template_info,
struct qualified_typedef_usage_s): New.
(cp_tree_node_structure_enum): add TS_CP_TEMPLATE_INFO.
(union lang_tree_node): Add template_info.
(TI_TEMPLATE, TI_ARGS, TI_TYPEDEFS_NEEDING_ACCESS_CHECKING):
Adjust.
(build_template_info): Declare.
(get_types_needing_access_check): Adjust return type.
(add_typedef_to_current_template_for_access_check): Declare.
* cp-objcp-common.c (cp_tree_size): Handle TEMPLATE_INFO.
* semantics.c (add_typedef_to_current_template_for_access_check):
Split from ...
(check_accessibility_of_qualified_id): ... here.
* decl.c (make_typename_type): Use it.
* pt.c (build_template_info): Define.
(check_explicit_specialization, find_parameter_packs_r,
push_template_decl_real, lookup_template_class,
for_each_template_parm_r, tsubst_decl, tsubst): Use
build_template_info.
(get_types_needing_access_check): Adjust return type.
(append_type_to_template_for_access_check_1): Record the
location of the usage point of the typedef. Adjust to TEMPLATE_INFO.
(append_type_to_template_for_access_check): Add new location
parameter. Pass it to append_type_to_template_for_access_check_1.
Adjust to TEMPLATE_INFO.
(perform_typedefs_access_check): Temporarily set input_location to
the usage point of the typedef we are checking access for. Adjust
to new TEMPLATE_INFO tree node.
* tree.c (bind_template_template_parm): Use build_template_info.
* call.c (add_template_candidate_real): Likewise.
* decl.c (grokfndecl): Likewise.
(cp_tree_node_structure): Handle TEMPLATE_INFO.
gcc/testsuite/ChangeLog:
PR c++/14777
* g++.dg/template/typedef13.C: Adjust.
* g++.dg/template/typedef19.C: Adjust.
* g++.dg/template/typedef20.C: Adjust.
* g++.dg/template/typedef22.C: New test.
From-SVN: r154443
2009-11-23 Paul Brook <paul@codesourcery.com>
gcc/
* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Add special
case for noreturn functions.
(arm_compute_save_reg_mask): Remove special noreturn handling.
From-SVN: r154441
* pex-unix.c (pex_child_error): Improve warning avoidance by
checking the results of write(3) and exiting with -2 if any write
returns a negative value.
Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r154431
./: * configure.ac: Change default of poststage1_ldflags to be empty if
poststage1_libs is set. When poststage1_libs is empty, and
ENABLE_BUILD_WITH_CXX is set, add -static-libgcc.
* configure: Rebuild.
gcc/:
* Makefile.in (HOST_LIBS): Move higher in file.
(LINKER, LINKER_FLAGS): If ENABLE_BUILD_WITH_CXX, but $(HOST_LIBS)
is not empty, set to $(CC) and $(CFLAGS).
From-SVN: r154422
2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/41807
* trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
with error message if not constant.
* resolve.c (next_data_value): Delete check for constant.
From-SVN: r154420
2009-11-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
with error message if not constant.
* resolve.c (next_data_value): Delete check for constant.
From-SVN: r154418
2009-11-22 Martin Jambor <mjambor@suse.cz>
* tree-cfg.c (verify_types_in_gimple_reference): Error out on
V_C_E of an SSA_NAME or an invariant if lvalue is required.
(verify_gimple_call): Verify LHS also with with
verify_types_in_gimple_reference.
From-SVN: r154414
2009-11-21 Martin Jambor <mjambor@suse.cz>
PR middle-end/42025
* tree-sra.c (access_precludes_ipa_sra_p): New function.
(splice_param_accesses): Check all accesses by calling
access_precludes_ipa_sra_p.
(sra_ipa_modify_expr): Rename argument erite to dont_convert and do
not convert types if it is true.
(sra_ipa_modify_assign): Convert types in case of mismatch.
* testsuite/gcc.c-torture/compile/pr42025-1.c: New test.
* testsuite/gcc.c-torture/compile/pr42025-2.c: New test.
From-SVN: r154413
* config/mips/mips-protos.h (mulsidi3_gen_fn): New typedef.
(mips_mulsidi3_gen_fn): Declare new function.
* config/mips/mips.c (mips_mulsidi3_gen_fn): New function.
* config/mips/mips.md (<u>mulsidi3): Change condition to use
mips_mulsidi3_gen_fn. Use mips_mulsidi3_gen_fn to generate the
insn.
(<u>mulsidi3_64bit): Don't match for ISA_HAS_DMUL3.
(mulsidi3_64bit_dmul): New define_insn.
testsuite/
* gcc.target/mips/mult-1.c: Forbid octeon.
* gcc.target/mips/octeon-dmul-3.c: New test.
From-SVN: r154410