2009-03-27 Vladimir Makarov <vmakarov@redhat.com>
* genautomata.c: Add a new year to the copyright. Add a new
reference.
(struct insn_reserv_decl): Add comments for member bypass_list.
(find_bypass): Remove.
(insert_bypass): New.
(process_decls): Use insert_bypass.
(output_internal_insn_latency_func): Output all bypasses with the
same input insn in one switch case.
* rtl.def (define_bypass): Describe bypass choice.
* doc/md.texi (define_bypass): Ditto.
From-SVN: r145152
2009-03-27 Richard Guenther <rguenther@suse.de>
* gimplify.c (mark_addressable): Export.
* tree-flow.h (mark_addressable): Declare.
* tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
* tree-ssa.c (verify_phi_args): Verify that address taken
variables have TREE_ADDRESSABLE set.
2009-03-27 Richard Guenther <rguenther@suse.de>
* fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
(build_fold_addr_expr_with_type): ... this. Remove in_fold handling.
Do not mark decls TREE_ADDRESSABLE.
(build_fold_addr_expr): Adjust.
(fold_addr_expr): Remove.
(fold_unary): Use build_fold_addr_expr.
(fold_comparison): Likewise.
(split_address_to_core_and_offset): Likewise.
* coverage.c (tree_coverage_counter_addr): Mark the array decl
TREE_ADDRESSABLE.
* gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
(gimplify_modify_expr_to_memcpy): Mark source and destination
addressable.
* omp-low.c (create_omp_child_function): Mark the object decl
TREE_ADDRESSABLE.
(lower_rec_input_clauses): Mark the var we take the address of
TREE_ADDRESSABLE.
(lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.
fortran/
* trans-array.c (gfc_conv_descriptor_data_addr): Use
gfc_build_addr_expr instead of build_fold_addr_expr.
(gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
gfc_trans_constant_array_constructor, gfc_conv_array_data,
gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
* trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
gfc_conv_function_val, gfc_conv_operator_assign,
gfc_conv_subref_array_arg, gfc_conv_function_call,
gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_exponent,
gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
* trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
build_filepos, gfc_trans_inquire, gfc_trans_wait,
nml_get_addr_expr, transfer_namelist_element, build_dt,
gfc_trans_dt_end, transfer_array_component, transfer_expr,
transfer_array_desc, gfc_trans_transfer): Likewise.
* trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
* trans.c (gfc_build_addr_expr): Mark the base of the address
TREE_ADDRESSABLE.
From-SVN: r145143
2009-03-27 Richard Guenther <rguenther@suse.de>
* gimplify.c (mark_addressable): Export.
* tree-flow.h (mark_addressable): Declare.
* tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
* tree-ssa.c (verify_phi_args): Verify that address taken
variables have TREE_ADDRESSABLE set.
2009-03-27 Richard Guenther <rguenther@suse.de>
* fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
(build_fold_addr_expr_with_type): ... this. Remove in_fold handling.
Do not mark decls TREE_ADDRESSABLE.
(build_fold_addr_expr): Adjust.
(fold_addr_expr): Remove.
(fold_unary): Use build_fold_addr_expr.
(fold_comparison): Likewise.
(split_address_to_core_and_offset): Likewise.
* coverage.c (tree_coverage_counter_addr): Mark the array decl
TREE_ADDRESSABLE.
* gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
(gimplify_modify_expr_to_memcpy): Mark source and destination
addressable.
* omp-low.c (create_omp_child_function): Mark the object decl
TREE_ADDRESSABLE.
(lower_rec_input_clauses): Mark the var we take the address of
TREE_ADDRESSABLE.
(lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.
fortran/
* trans-array.c (gfc_conv_descriptor_data_addr): Use
gfc_build_addr_expr instead of build_fold_addr_expr.
(gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
gfc_trans_constant_array_constructor, gfc_conv_array_data,
gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
* trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
gfc_conv_function_val, gfc_conv_operator_assign,
gfc_conv_subref_array_arg, gfc_conv_function_call,
gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_exponent,
gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
* trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
build_filepos, gfc_trans_inquire, gfc_trans_wait,
nml_get_addr_expr, transfer_namelist_element, build_dt,
gfc_trans_dt_end, transfer_array_component, transfer_expr,
transfer_array_desc, gfc_trans_transfer): Likewise.
* trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
* trans.c (gfc_build_addr_expr): Mark the base of the address
TREE_ADDRESSABLE.
From-SVN: r145142
* memmem.c: New file, from gnulib.
* configure.ac: Add memmem to list of functions provided if they
are not available on the host.
* Makefile.in: Rebuild dependencies.
(CFILES): Add memmem.c.
(CONFIGURED_OFILES): Add memmem.o.
* configure, config.in, functions.texi: Rebuild.
From-SVN: r145139
2009-03-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39120
* tree-ssa-structalias.c (handle_rhs_call): Fill out return
constraints.
(handle_lhs_call): Process return constraints. Add escape
constraints if necessary.
(handle_const_call): Fill out return constraints. Make nested
case more precise. Avoid consttmp if possible.
(handle_pure_call): Fill out return constraints. Avoid
callused if possible.
(find_func_aliases): Simplify call handling.
* gcc.c-torture/execute/pr39120.c: New testcase.
2009-03-27 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39120
* tree-ssa-structalias.c (do_sd_constraint): Do not use CALLUSED
as a representative.
(solve_graph): Do propagate CALLUSED.
(handle_pure_call): Use a scalar constraint from CALLUSED for
the return value.
(find_what_p_points_to): CALLUSED shall not appear in poins-to
solutions.
* gcc.dg/torture/pta-callused-1.c: New testcase.
From-SVN: r145137
* builtins.c (fold_builtin_memory_op): Optimize memmove
into memcpy if we can prove source and destination don't overlap.
* gcc.dg/memmove-2.c: New test.
* gcc.dg/memmove-3.c: New test.
From-SVN: r145127
* tree-inline.c: Include gt-tree-inline.h.
(clone_fn_id_num): New variable.
(clone_function_name): New function.
(tree_function_versioning): Use it.
* Makefile.in (GTFILES): Add tree-inline.c.
* gcc.dg/ipa/ipacost-1.c: Adjust match pattern for change
in clone naming.
From-SVN: r145126
gcc/cp/
2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/38638
* parser.c (cp_parser_elaborated_type_specifier): If we have a
typename tag and don't have either a TYPE_DECL or a
TEMPLATE_ID_EXPR, set the type to NULL.
gcc/testsuite/
2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/38638
* g++.dg/template/typename17.C: New testcase.
* g++.dg/template/typename18.C: New testcase.
From-SVN: r145107
gcc/cp/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/37647
* decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
scope.
gcc/testsuite/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/37647
* g++.dg/parse/ctor9.C: New test.
From-SVN: r145105
gcc/cp/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/29727
* decl.c (check_array_designated_initializer): Handle error_mark_node.
gcc/testsuite/
2009-03-27 Simon Martin <simartin@users.sourceforge.net>
PR c++/29727
* g++.dg/init/error2.C: New test.
From-SVN: r145104
2009-03-26 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/39522
* reload1.c (reload_as_needed): Invalidate reg_last_reload_reg too
when reg_reloaded_valid is set.
From-SVN: r145093
2009-03-26 Andrew Haley <aph@redhat.com>
PR C++/39380
* decl2.c (possibly_inlined_p): If java exceptions are in use
don't inline a decl unless it is explicitly marked inline.
* lex.c: (pragma_java_exceptions): New variable.
(handle_pragma_java_exceptions): Set pragma_java_exceptions.
* cp-tree.h (pragma_java_exceptions): Declare new variable.
From-SVN: r145091