* ipa-cp.c (ipcp_analyze_node): New function.
(ipcp_update_cloned_node): Use it.
(ipcp_init_stage): Likewise.
* ipa-inline.c (function_insertion_hook_holder): New static var.
(analyze_function): Break out from ....
(inline_generate_summary): Here; register insertion hook.
(cgraph_decide_inlining): Remove hook.
(add_new_function): New function.
From-SVN: r139536
2008-08-24 Daniel Kraft <d@domob.eu>
* gfortran.h (gfc_typebound_proc): New struct.
(gfc_symtree): New member typebound.
(gfc_find_typebound_proc): Prototype for new method.
(gfc_get_derived_super_type): Prototype for new method.
* parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
* decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
CONTAINS section.
(gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
(gfc_match_private): Ditto.
(match_binding_attributes), (match_procedure_in_type): New methods.
(gfc_match_final_decl): Rewrote to make use of new
COMP_DERIVED_CONTAINS parser state.
* parse.c (typebound_default_access): New global helper variable.
(set_typebound_default_access): New callback method.
(parse_derived_contains): New method.
(parse_derived): Extracted handling of CONTAINS to new parser state
and parse_derived_contains.
* resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
(check_typebound_override), (resolve_typebound_procedure): New methods.
(resolve_typebound_procedures): New method.
(resolve_fl_derived): Call new resolving method for typebound procs.
* symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
(gfc_find_typebound_proc): New method.
(gfc_get_derived_super_type): New method.
2008-08-24 Daniel Kraft <d@domob.eu>
* gfortran.dg/finalize_5.f03: Adapted expected error message to changes
to handling of CONTAINS in derived-type declarations.
* gfortran.dg/typebound_proc_1.f08: New test.
* gfortran.dg/typebound_proc_2.f90: New test.
* gfortran.dg/typebound_proc_3.f03: New test.
* gfortran.dg/typebound_proc_4.f03: New test.
* gfortran.dg/typebound_proc_5.f03: New test.
* gfortran.dg/typebound_proc_6.f03: New test.
From-SVN: r139534
2008-08-23 Paolo Carlini <paolo.carlini@oracle.com>
* acinclude.m4 ([GLIBCXX_CHECK_GETTIMEOFDAY]): Change to use
GCC_TRY_COMPILE_OR_LINK.
([GLIBCXX_CHECK_CLOCK_GETTIME]): Rename to
[GLIBCXX_ENABLE_CLOCK_GETTIME], a versatile configure-time option,
[no] by default, since it includes TRY_LINK checks. librt is also
searched, if requested.
* doc/xml/manual/configure.xml: Document the latter.
* configure.ac: Move the above checks outside native-only.
* configure: Regenerate.
From-SVN: r139530
* ipa-cp.c (constant_val_insert): Remove.
(ipcp_propagate_one_const): Remove.
(ipcp_create_replace_map): Always insert replacements to the map.
(ipcp_insert_stage): Do not try to insert statements by hand.
* tree-inline.c (insert_init_stmt): Break out from ...
(setup_one_parameter): ... here; allow NULL BB pointer.
(tree_function_versioning): Use setup_one_parameter to process
replacement map.
From-SVN: r139525
* tree.c (decl_address_ip_invariant_p): New function.
* tree.h (decl_address_ip_invariant_p): Declare.
* gimple.c (strip_invariant_refs): Break out from ...
(is_gimple_invariant_address): ... here
(is_gimple_ip_invariant_address): New function.
(is_gimple_ip_invariant): New function.
* gimple.h (is_gimple_ip_invariant_address, is_gimple_ip_invariant):
Declare.
* ipa-cp.c (ipcp_lat_is_const): Remove handling of IPA_CONST_VALUE_REF.
(ipcp_lat_is_insertable): All constants are insertable.
(ipcp_lattice_from_jfunc, ipcp_print_all_lattices): Remove handling of
IPA_CONST_VALUE_REF.
(ipcp_initialize_node_lattices): Propagate all types of operands.
(build_const_val): Do not handle IPA_CONST_VALUE_REF.
(ipcp_create_replace_map): Reformat.
(ipcp_need_redirect_p): Simplify.
(ipcp_insert_stage): Check that argument is used before clonning.
* ipa-prop.c (ipa_print_node_jump_functions): Do not handle IPA_CONST_REF.
(compute_scalar_jump_functions): Simplify using is_gimple_ip_invariat.
(determine_cst_member_ptr): Keep wrapping ADDR_EXPR of members.
(update_call_notes_after_inlining): Expect ADDR_EXPR in operand.
* ipa-prop.h (jump_func_type): Remove IPA_CONST_REF.
(jump_func_type): Remove IPA_CONST_VALUE_REF.
* tree-inline.c (tree_function_versioning): Add variables referenced by
replacing trees.
From-SVN: r139523
PR tree-optimization/37161
* tree-vectorizer.h (vect_get_smallest_scalar_type): Declare.
* tree-vect-analyze.c (vect_get_smallest_scalar_type): New function.
(vect_determine_vectorization_factor): Move the scalar type
retrieval to vect_get_smallest_scalar_type.
(vect_build_slp_tree): Call vect_get_smallest_scalar_type to get
scalar type. Remove redundant computation.
* tree-vect-transform.c (vect_get_constant_vectors): Add argument.
(vect_get_slp_defs): Take the type of RHS into account if
necessary by calling vect_get_smallest_scalar_type. Call
vect_get_constant_vectors with additional argument.
From-SVN: r139518
PR tree-optimization/37174
* tree-vect-analyze.c (vect_get_and_check_slp_defs): Check that the
def stmt is a part of the loop before accessing its stmt_vec_info.
From-SVN: r139508
2008-08-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37143
* tree-vect-transform.c (vect_create_cond_for_align_checks): Build
a conversion statement instead of a copy.
* g++.dg/vect/pr37143.C: New testcase.
From-SVN: r139500
2008-08-22 Daniel Kraft <d@domob.eu>
PR fortran/30239
* symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
type is re-declared but neither -pedantic nor -std=f* is given and so
this is no error.
* invoke.texi (-Wsurprising): Document this new behaviour.
From-SVN: r139499
2008-08-22 Robert Dewar <dewar@adacore.com>
* s-sopco4.adb: Minor code fix to avoid warning
* s-sopco5.adb: Minor code fix to avoid warning
* s-strops.adb: Minor code fix to avoid warning
From-SVN: r139488
2008-08-22 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Build_Init_Statements): Transfer to the body of the
init procedure all the expanded code associated with the spec of
task types and protected types.
From-SVN: r139483
2008-08-22 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb (Has_Preelaborable_Initialization): Revise checking of
private types to allow for types derived from a private type with
preelaborable initialization, but return False for a private extension
(unless it has the pragma).
From-SVN: r139480
2008-08-22 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb (Static_Array_Aggregate): Call Analyze_And_Resolve on the
component expression copies rather than directly setting Etype and
Is_Static_Expression.
From-SVN: r139479
2008-08-22 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Build_Init_Statements): Transfer to the body of the
init procedure all the expanded code associated with the spec of
task types and protected types.
From-SVN: r139477
2008-08-22 Geert Bosch <bosch@adacore.com>
* gcc-interface/trans.c: Define FP_ARITH_MAY_WIDEN
(convert_with_check): Only use longest_float_type if FP_ARITH_MAY_WIDEN is 0
From-SVN: r139468
* checks.adb:
(In_Subrange_Of): New calling sequence
(Determine_Range): Prepare for new processing using base type
* exp_ch4.adb:
(Compile_Time_Compare): Use new calling sequence
* exp_ch5.adb:
(Compile_Time_Compare): Use new calling sequence
* sem_eval.adb:
(Compile_Time_Compare): New calling sequence allows dealing with
invalid values.
(In_Subrange_Of): Ditto
* sem_eval.ads:
(Compile_Time_Compare): New calling sequence allows dealing with
invalid values.
(In_Subrange_Of): Ditto
From-SVN: r139467
* exp_tss.adb:
(Base_Init_Proc): For a protected subtype, use the base type of the
corresponding record to locate the propoer initialization procedure.
From-SVN: r139465