Commit Graph

77911 Commits

Author SHA1 Message Date
Diego Novillo 9b3b55a105 * tree-scalar-evolution.c (scev_const_prop):
* tree-phinodes.c (remove_phi_node): Add argument
	RELEASE_LHS_P.  If given, release the SSA name on the LHS of
	the PHI node.
	Update all users.
	* tree-ssa-dce.c: Remove forward declarations for static
	functions.  Re-arrange functions bodies as needed.
	(find_obviously_necessary_stmts): Never mark PHI nodes as
	obviously necessary.

From-SVN: r119740
2006-12-11 12:50:53 -05:00
Carlos O'Donell 546447ae68 elf.h (MAX_OFILE_ALIGNMENT): Remove definition.
2006-12-11  Carlos O'Donell  <carlos@codesourcery.com>

	* config/arm/elf.h (MAX_OFILE_ALIGNMENT): Remove definition.

From-SVN: r119739
2006-12-11 17:31:48 +00:00
Jan Hubicka 34d85166bb value-prof.c (tree_stringops_transform): New.
* value-prof.c (tree_stringops_transform): New.
	(tree_value_profile_transformations): Require count to be non-zero;
	call stringop transform; reset stmt BSI after BB changed.
	(tree_divmod_fixed_value, tree_mod_pow2): Don't emit unnecesary label.
	(interesting_stringop_to_profile_p, tree_stringop_fixed_value): New.
	(tree_stringops_values_to_profile): New.
	(tree_values_to_profile): Call tree_stringops_values_to_profile.
	* tree.h (build_string_literal): Tidy prototype.
	(validate_arglist, builtin_memset_read_str, get_pointer_alignment):
	Declare.
	* builtins.c (validate_arglist, builtin_memset_read_str,
	get_pointer_alignment): Export.

From-SVN: r119735
2006-12-11 14:19:11 +00:00
Uros Bizjak fa283935de re PR target/30120 (silent miscompilation of argument passing)
PR target/30120
	Revert:
	2006-11-15  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.opt: New target option -mx87regparm.

	* config/i386/i386.h (struct ix86_args): Add x87_nregs, x87_regno,
	float_in_x87: Add new variables. mmx_words, sse_words: Remove.
	(X87_REGPARM_MAX): Define.

	* config/i386/i386.c (override_options): Error out for
	-mx87regparm but no 80387 support.
	(ix86_attribute_table): Add x87regparm.
	(ix86_handle_cconv_attribute): Update comments for x87regparm.
	(ix86_comp_type_attributes): Check for mismatched x87regparm types.
	(ix86_function_x87regparm): New function.
	(ix86_function_arg_regno_p): Add X87_REGPARM_MAX 80387 floating
	point registers.
	(init_cumulative_args): Initialize x87_nregs and float_in_x87
	variables.
	(function_arg_advance): Process x87_nregs and x87_regno when
	floating point argument is to be passed in 80387 register.
	(function_arg): Pass XFmode arguments in 80387 registers for local
	functions.  Pass SFmode and DFmode arguments to local functions
	in 80387 registers when flag_unsafe_math_optimizations is set.

	* reg-stack.c (convert_regs_entry): Disable NaN load for
	stack registers that are used for argument passing.

	* doc/extend.texi: Document x87regparm function attribute.
	* doc/invoke.texi: Document -mx87regparm.

testsuite/ChangeLog:

	PR target/30120
	* gcc.target/i386/pr30120.c: New test.

	Revert:
	2006-11-15  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/x87regparm-1.c: New test.
	* gcc.target/i386/x87regparm-2.c: New test.
	* gcc.target/i386/x87regparm-3.c: New test.
	* gcc.target/i386/x87regparm-4.c: New test.

From-SVN: r119734
2006-12-11 15:06:07 +01:00
Richard Guenther c3f824ce13 traits.hpp: Qualify types.
2006-12-11  Richard Guenther  <rguenther@suse.de>
	    Paolo Carlini  <pcarlini@suse.de>

	* include/ext/pb_ds/detail/pat_trie_/traits.hpp: Qualify types.
	* include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
	* include/ext/rope: Likewise.
	* include/bits/stl_tree.h (struct _Rb_tree): Change the _Link_type
	typedefs to use _Rb_tree_node<_Val> directly.
	(_M_get_node, _M_put_node): Use _Link_type.

Co-Authored-By: Paolo Carlini <pcarlini@suse.de>

From-SVN: r119732
2006-12-11 10:48:56 +00:00
Jan Hubicka 8a4a83ed92 Move all varpool routines out of cgraph/cgraphunit to varpool.c
Move all varpool routines out of cgraph/cgraphunit to varpool.c
	* cgraph.c: Update comments.
	(cgraph_varpool_hash,
	cgraph_varpool_nodes, cgraph_varpool_last_needed_node
	cgraph_varpool_node_name, cgraph_varpool_node,
	cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node,
	cgraph_variable_initializer_availability): Move to
	varpool.c and drop cgraph_ prefixes.
	(cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue,
	cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl):
	move to varpool.c; drop cgraph_ prefix; make static.
	(dump_cgraph_varpool_node): Move to varpool.c under name
	dump_varpool_node.
	(dump_varpool, hash_varpool_node, eq_varpool_node,
	decide_is_variable_needed): Move to varpool.c
	(decl_assembler_name_equal): Move to tree.c.
	(availability_names): Rename to ...
	(cgraph_availability_names): ... this one.
	(dump_cgraph_node): Update.
	* cgraph.h: Reorder declarations now in varpool.c
	(cgraph_vailablity_names): Declare.
	(struct cgraph_varpool_node): Rename to ...
	(struct varpool_node): ... this one.
	(cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue,
	cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node,
	cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node,
	cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node,
	cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls,
	cgraph_variable_initializer_availability): Rename to ...
	(varpool_first_unanalyzed_node, varpool_nodes_queue,
	varpool_first_unanalyzed_node, varpool_node,
	varpool_node_for_asm, varpool_mark_needed_node,
	varpool_finalize_decl, varpool_enqueue_needed_node,
	varpool_assemble_pending_decls, variable_initializer_availability):
	Rename to ...
	* tree.c (decl_assembler_name_equal): Move here from cgraph.c.
	* tree.h (decl_assembler_name_equal): Declare.
	* omp-low.c (lower_omp_critical): Update.
	* ipa-reference (analyze_variable, static_execute): Likewise.
	* toplev.c (wrapup_global_declaration_2, compile_file): Update.
	* cgraphunit.c: Update comments.
	(cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name
	varpool_assembled_nodes_queue.
	(cgraph_varpool_analyze_pending_decls): Move to varpool.c under name
	varpool_analyze_pending_decls.
	(cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name
	varpool_remove_unreferenced_decls.
	(record_reference): Update.
	(cgraph_create_edges): Update.
	(record_referneces_in_initializer): New function.
	(cgraph_varpool_assemble_decl): Move to varpool.c under name
	varpool_assemble_decl; make global.
	(cgraph_varpool_assemble_pending_decls): Move to varpool.c under name
	varpool_assemble_pending_decls.
	(process_function_and_variable_attributes, cgraph_finalize_compilation_unit,
	struct cgraph_order_sort, cgraph_output_in_order,
	cgraph_function_and_variable_invisibility, cgraph_optimize,
	cgraph_increase_alignment): Update.
	* dwarf2out.c (decls_for_scope): Likewise.
	* ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise.
	* except.c (output_ttype): Likewise.
	* varasm.c (mark_decl_referenced): Likewise.
	(find_decl_and_mark_referenced, assemble_alias): update.
	* Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c
	* passes.c (rest_of_decl_compilation): Update.

	* cp/decl2.c (var_finalized_p): Update for renamed varpool functions.
	* fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions.

From-SVN: r119731
2006-12-11 08:07:52 +00:00
Ira Rosen ce133c3fa2 tree-vect-patterns.c (vect_recog_dot_prod_pattern): Use GIMPLE_STMT_OPERAND.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Use
	GIMPLE_STMT_OPERAND.
	* tree-vect-transform.c (vect_permute_store_chain): Likewise.
	(vect_setup_realignment): Likewise.

From-SVN: r119730
2006-12-11 07:54:35 +00:00
Alan Modra 58e241475b configure.in: Handle spu makefile frag.
* configure.in:  Handle spu makefile frag.
	* config/mt-spu: New file.
	* Makefile.tpl (MAINT): Define
	(MAINTAINER_MODE_FALSE, MAINTAINER_MODE_TRUE): Define.
	* configure: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r119729
2006-12-11 17:13:16 +10:30
Ben Elliston 9b6f37a025 config.guess: Import latest version.
* config.guess: Import latest version.
	* config.sub: Likewise.

From-SVN: r119728
2006-12-11 15:11:34 +11:00
Sa Liu cc8d70cd9d spu-elf.h (STARTFILE_SPEC): Update.
* config/spu/spu-elf.h (STARTFILE_SPEC): Update.
	(ENDFILE_SPEC): Likewise.
	* config/spu/spu.opt (mstdmain): New option.
	* config/spu/crti.asm: Remove.
	* config/spu/crtn.asm: Likewise.
	* config/spu/crt0.c: Likewise.
	* config/spu/crtend.c: Likewise.
	* config/spu/t-spu-elf (EXTRA_MULTILIB_PARTS): Remove crt0 files
	listed above.
	($(T)crti.o, $(T)crtn.o, $(T)crt1.o, $(T)crtend1.o): Remove.
	* doc/invoke.texi (SPU Options): Document -mstdmain.

Co-Authored-By: Ben Elliston <bje@au.ibm.com>

From-SVN: r119727
2006-12-11 11:53:42 +11:00
Ben Elliston ea6f5c57de configure.in (spu-*-*): Don't skip target-libiberty.
* configure.in (spu-*-*): Don't skip target-libiberty.
	* configure: Regenerate.

From-SVN: r119726
2006-12-11 11:22:24 +11:00
GCC Administrator ee2be80a8e Daily bump.
From-SVN: r119724
2006-12-11 00:18:20 +00:00
Zdenek Dvorak a14865dbe0 loop.texi: Document number_of_latch_executions and number_of_cond_exit_executions.
* doc/loop.texi: Document number_of_latch_executions and
	number_of_cond_exit_executions.
	* tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
	chrec_is_positive, number_of_iterations_for_all_loops,
	scev_const_prop): Use number_of_latch_executions.
	(set_nb_iterations_in_loop): Do not increase the value of the
	number of iterations.
	(number_of_iterations_in_loop): Renamed to ...
	(number_of_latch_executions): ... this.
	(number_of_exit_cond_executions): New function.
	* tree-scalar-evolution.h (number_of_iterations_in_loop): Declaration
	removed.
	(number_of_latch_executions, number_of_exit_cond_executions): Declare.
	* tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables): Use
	number_of_latch_executions.
	* tree-data-ref.c (get_number_of_iters_for_loop): Use
	number_of_exit_cond_executions.
	* tree-vect-analyze.c (vect_get_loop_niters): Ditto.
	* cfgloop.h (struct loop): Improve description of the nb_iterations
	field.

	* gcc.dg/tree-ssa/loop-17.c: Update outcome.

From-SVN: r119718
2006-12-10 23:34:20 +00:00
Daniel Berlin c7463db95a tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
2006-12-10  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-alias.c (compact_name_tags): Use sort_tags_by_id.
	(tree_pointer_compare): Remove.

From-SVN: r119714
2006-12-10 22:39:41 +00:00
Zdenek Dvorak 42fd6772c6 tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop.
* tree-vrp.c (adjust_range_with_scev): Use get_chrec_loop.
	* loop-unswitch.c (unswitch_loops): Use FOR_EACH_LOOP.
	* tree-loop-linear.c (linear_transform_loops): Ditto.
	* tree-ssa-loop-im.c (determine_lsm): Ditto.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations,
	free_numbers_of_iterations_estimates): Ditto.
	* tree_ssa_unswitch_loops (tree_ssa_unswitch_loops): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto.
	* modulo-sched.c (sms_schedule): Ditto.
	* tree-ssa-loop-ivcanon.c (canonicalize_induction_variables,
	tree_unroll_loops_completely): Ditto.
	* predict.c (predict_loops): Ditto.
	* tree-if-conv.c (main_tree_if_conversion): Ditto.
	* loop-unroll.c (unroll_and_peel_loops, peel_loops_completely,
	decide_unrolling_and_peeling): Ditto.
	* cfgloopmanip.c (unloop): Use delete_loop.
	(place_new_loop): Access larray vector instead of parray.
	(create_preheaders, force_single_succ_latches,
	fix_loop_structure): Use FOR_EACH_LOOP and delete_loop..
	* loop-doloop.c (doloop_optimize_loops): Ditto.
	* loop-invariant.c (move_loop_invariants): Ditto.
	* tree-cfg.c (replace_uses_by): Ditto.
	* tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Ditto.
	* tree-chrec.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE):
	Moved to ...
	* tree.h (CHREC_VAR, CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE):
	... here.
	* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop,
	compute_overall_effect_of_inner_loop, chrec_is_positive): Use
	get_loop and get_chrec_loop.
	(number_of_iterations_for_all_loops): Use number_of_loops.
	(scev_initialize, scev_reset, scev_const_prop): Use FOR_EACH_LOOP.
	* tree-scalar-evolution.h (get_chrec_loop): New inline function.
	* cfgloopanal.c (mark_irreducible_loops): Use number_of_loops,
	and FOR_EACH_LOOP.
	* tree-chrec.c (evolution_function_is_invariant_rec_p,
	chrec_convert_1): Use get_loop and get_chrec_loop.
	* loop-init.c (loop_optimizer_init): Use number_of_loops.
	(loop_optimizer_init): Use FOR_EACH_LOOP.
	* tree-vectorizer.c (vect_loops_num): Removed.
	(vectorize_loops): Store number of loops locally.  Use
	FOR_EACH_LOOP and get_loop.
	* tree-vectorizer.h (vect_loops_num): Removed.
	* tree-data-ref.c (get_number_of_iters_for_loop): Use get_loop.
	(find_data_references_in_loop): Do not set parallel_p.
	* tree-data-ref.h: Do not declare VEC(loop_p).
	* cfgloop.c (flow_loops_dump, mark_single_exit_loops,
	verify_loop_structure): Use FOR_EACH_LOOP.
	(flow_loops_free): Use FOR_EACH_LOOP, free larray vector.
	(initialize_loops_parallel_p): Removed.
	(flow_loops_find): Push the loops into a vector.
	(delete_loop): New function.
	(cancel_loop): Use delete_loop.
	* cfgloop.h: Declare VEC(loop_p).
	(struct loop): Remove parallel_p field.
	(struct loops): Replace num and parray field by larray vector.
	Remove shared_headers field.
	(delete_loop): Declare.
	(get_loop, get_loops, number_of_loops, fel_next, fel_init,
	FOR_EACH_LOOP): New.
	* doc/loop.tex: Document new accessor functions.

From-SVN: r119713
2006-12-10 22:17:15 +00:00
Andrew MacLeod 7290d709ef New out of ssa Coalescer.
2006-12-10  Andrew MacLeod  <amacleod@redhat.com>

	* common.opt (-ftree-lrs): Remove live range splitting option.
	* makefile.in: Add tree-ssa-coalesce.o and reduce header dependancies.
	* opts.c (decode_options): Remove flag_tree_live_range_split.
	* tree-flow.h (struct var_ann_d): Rename fields from root_ to base_.
	* tree-flow-inline.h (single_imm_use_p): New.  Check for single use.
	* tree-outof-ssa.c: Remove header files which aren't needed.
	(SSANORM_*): Remove flags.
	(print_exprs_edge, coalesce_abnormal_edges, coalesce_phi_operands, 
	coalesce_result_decls_and_copies, coalesce_asm_operands): Remove.
	(coalesce_ssa_name): Move to tree-ssa-coalesce.c.
	(assign_vars): Use Basevar instead of root_var structure.
	(replace_def_variable): Dont do anything if def is replaceable.
	(remove_ssa_form): Integrate functional changes.
	(rewrite_out_of_ssa): Remove live-range_split option.
	* tree-ssa-coalesce.c: New File for ssa-name coalescing.
	(coalesce_cost): Calculate the cost of a coalesce.
	(coalesce_cost_bb): Calculate the coalesce cost within a BB.
	(coalesce_cost_edge): Calculate the coalesce cost on an edge.
	(pop_cost_one_pair): Remove the best coalesce with cost 1 from the list.
	(pop_best_coalesce): Remove the best coalesce from the list.
	(coalesce_pair_map_hash): Calculate coalesce pair hash.
	(coalesce_pair_map_eq): Compare 2 coalesce pairs for hash function.
	(create_coalesce_list): Create a coalesce list object.
	(delete_coalesce_list): Free a coalesce list object.
	(find_coalesce_pair): Find matching pair in the coalesce list.
	(add_cost_one_coalesce): Add a coalesce to the "cost one" list.
	(add_coalesce): Add a coalesce to the coalesce list.
	(compare_pairs): Comparision function to determine pair sorted order.
	(num_coalesce_pairs): Number of coalesced pairs.
	(first_coalesce_pair, end_coalesce_pair_p, next_coalesce_pair):
	Coalesce pair iterator functions.
	(sort_coalesce_list): Sort coalesce pairs in order of expense.
	(dump_coalesce_list): Show coalesce list.
	(ssa_conflicts_new): Create an SSA conflict graph.
	(ssa_conflicts_delete): Delete an SSA conflict graph.
	(ssa_conflicts_test_p): Test for conflicts.
	(ssa_conflicts_add_one): Add a single conflict.
	(ssa_conflicts_add): Add a conflict pair.
	(ssa_conflicts_merge): Merge conflicts.
	(struct live_track_d): Struct for tracking live partitions.
	(new_live_track): Create new live_track object.
	(delete_live_track): Delete a live_track object.
	(live_track_remove_partition): Remove a partition from the live list.
	(live_track_add_partition): Add a partition from the live list.
	(live_track_clear_var): Take VAR from the live list.
	(live_track_live_p): Is var live?
	(live_track_process_use): Make var come alive.
	(live_track_process_def): Make var go dead, add conflicts.
	(live_track_init): Initialize to a live on exit set.
	(live_track_clear_base_vars): Clear live partitions.
	(build_ssa_conflict_graph): Build a conflict graph.
	(print_exprs): Common debug output routine.
	(abnormal_corrupt): Output info about a failed coalesce across an
	abnormal edge.
	(fail_abnormal_edge_coalesce): Output info about a failed MUST_COALESCE.
	(create_outofssa_var_map): Create a var map and coalesce list.
	(attempt_coalesce): Coalesce a pair.
	(coalesce_partitions): Coalesce all pairs in a coalesce list.
	(coalesce_ssa_name): Entry point.  Determine what ssa_names to coalesce.
	* tree-ssa-live.c: Remove header files which aren't needed.
	(var_map_base_init): New.  Initialize a basevar list.
	(var_map_base_fini): New.  Finish a basevar list.
	(init_var_map): Initialize new fields.
	(delete_var_map): Free new fields.
	(var_union): Use renamed fields.
	(compact_var_map): Remove.
	(partition_to_view_init): Use renamed fields, change order of an if.
	(partition_view_fini): Use renamed fields.
	(partition_view_normal): Create basevar list if requested.
	(partition_view_bitmap): Create a view based on a bitmap of partitions.
	(change_partition_var): Use renamed fields.
	(create_ssa_var_map): Remove.
	(tpa_init, tpa_remove_partition, tpa_delete, tpa_compact,
	root_var_init): Remove.
	(partition_pair_map_hash, partition_pair_map_eq, create_coalesce_list,
	delete_coalesce_list, find_partition_pair, coalesce_cost, add_coalesce,
	compare_pairs, num_coalesce_pairs, first_partition_pair,
	end_partition_pair_p, next_partition_pair, sort_coalesce_list,
	pop_best_coalesce, add_conflicts_if_valid, set_if_valid,
	build_tree_conflict_graph, coalesce_tpa_members, dump_coalesce_list,
	tpa_dump): Moved to tree-ssa-coalesce.c and/or renamed there.
	(dump_var_map): Use renamed fields.
	* tree-ssa-live.h (struct  _var_map): Modify fields.
	(partition_to_var, version_to_var, var_to_partition): Use renamed 
	fields.
	(basevar_index): New.  Index of the base variable of a partition.
	(num_basevars): New.  Number of unique base variables in partition map.
	(register_ssa_partition): Use renamed fields.
	(struct tree_partition_associator_d): Remove.
	(tpa_num_trees, tpa_tree, tpa_first_partition, tpa_next_partition,
	tpa_find_tree, tpa_decompact, root_var_init, root_var_num,
	root_var, root_var_first_partition, root_var_next_partition,
	root_var_dump, root_var_delete, root_var_remove_partition, 
	root_var_find, root_var_compact, root_var_decompact): Remove.
	(struct partition_pair, struct coalesce_list_d): Moved to 
	tree-ssa-coalesce.c
	* tree-ssa-ter.c: Remove header files which aren't needed.

From-SVN: r119711
2006-12-10 21:25:40 +00:00
Tobias Burnus 669353d549 gfortran.texi: Update Fortran 2003 section.
2006-12-10  Tobias Burnus  <burnus@net-b.de>

	* gfortran.texi: Update Fortran 2003 section.

From-SVN: r119710
2006-12-10 22:22:49 +01:00
Tobias Burnus ee7e677fdd re PR fortran/23994 (PROTECTED attribute (F2003) is not implemented)
fortran/
2006-12-10  Tobias Burnus  <burnus@net-b.de>

    PR fortran/23994
    * interface.c (compare_actual_formal): PROTECTED is incompatible
with intent(out).
    * symbol.c (check_conflict): Check for PROTECTED conflicts.
      (gfc_add_protected): New function.
      (gfc_copy_attr): Copy PROTECTED attribute.
    * decl.c (match_attr_spec): Add PROTECTED support.
      (gfc_match_protected): New function.
    * dump-parse-tree.c (gfc_show_attr): Add PROTECTED support.
    * gfortran.h (gfc_symbol): Add protected flag.
      Add gfc_add_protected prototype.
    * expr.c (gfc_check_pointer_assign): Add PROTECTED support.
    * module.c (ab_attribute, attr_bits, mio_symbol_attribute,
mio_symbol_attribute):
       Add PROTECTED support.
    * resolve.c (resolve_equivalence): Add PROTECTED support.
    * match.c (gfc_match_assignment,)gfc_match_pointer_assignment:
       Check PROTECTED attribute.
    * match.h: Add gfc_match_protected prototype.
    * parse.c (decode_statement): Match PROTECTED statement.
    * primary.c (match_variable): Add PROTECTED support.

testsuite/
2006-12-10  Tobias Burnus  <burnus@net-b.de>

    PR fortran/23994
    * gfortran.dg/protected_1.f90: New test.
    * gfortran.dg/protected_2.f90: New test.
    * gfortran.dg/protected_3.f90: New test.
    * gfortran.dg/protected_4.f90: New test.
    * gfortran.dg/protected_5.f90: New test.
    * gfortran.dg/protected_6.f90: New test.

From-SVN: r119709
2006-12-10 20:53:07 +01:00
Andreas Tobler 42c1cd8a7a re PR bootstrap/30134 (Bootstrap error: "libffi has not been ported to powerpc64-apple-darwin8.8.0")
2006-12-10  Andreas Tobler  <a.tobler@schweiz.org>

	PR bootstrap/30134
	* configure.in: Correct x86 darwin support for libjava to powerpc
	and i?86 only.
	* configure: Regenerate.

From-SVN: r119708
2006-12-10 20:32:30 +01:00
Paolo Carlini 682b96647b valarray-inst.cc (__gslice_to_index): Optimize performance.
2006-12-10  Paolo Carlini  <pcarlini@suse.de>

	* src/valarray-inst.cc (__gslice_to_index): Optimize performance.
	* testsuite/performance/26_numerics/valarray_gslice_to_index.cc: New.

From-SVN: r119707
2006-12-10 16:47:27 +00:00
Steven Bosscher 932ad4d9b5 cse.c: (struct cse_basic_block_data): Remove LAST field.
* cse.c: (struct cse_basic_block_data): Remove LAST field.
	(struct branch_path): Remove BRANCH and TAKEN fields. Add new
	BB field.
	(cse_visited_basic_blocks): New static bitmap.
	(cse_end_of_basic_block, cse_basic_block): Remove.
	(cse_find_path, cse_dump_path, cse_prescan_path,
	cse_extended_basic_block): New static functions.
	(cse_insn): Don't CSE over setjmp calls.  Use the CFG to find
	basic block boundaries.  Don't record jump equivalences here.
	Update the CFG after doing in-place replacement of the SET_SRC.
	(cse_main): Rewrite.  Look for extended basic block headers
	and call cse_extended_basic_block on them until all paths that
	start at this header are exhausted.
	(rest_of_handle_cse): Verify that the CFG is incrementally updated
	and correct after cse_main.
	Don't call delete_trivially_dead_insns, let cfgcleanup do that.
	(rest_of_handle_cse2): Verify the CFG here, too, after cse_main.
	(pass_cse): Add TODO_verify_flow.
	(pass_cse2): Likewise.

From-SVN: r119706
2006-12-10 10:59:19 +00:00
Rask Ingemann Lambertsen 15447faef3 reload1.c (choose_reload_regs): Don't set byte offset when resolving subregs of hard regs.
2006-12-04  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	* reload1.c (choose_reload_regs): Don't set byte offset when
	resolving subregs of hard regs.

From-SVN: r119705
2006-12-10 10:37:48 +00:00
Zack Weinberg 566c6181e6 c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for the language, if set_yydebug is true.
* c-opts.c (c_common_parse_file): Unconditionally give a warning,
	suitable for the language, if set_yydebug is true.
	* c-pragma.h: Define enum pragma_omp_clause here.  Don't define
	YYDEBUG or declare yydebug.
	* c-parser.c (yydebug, enum pragma_omp_clause): Delete.
	* cp/parser.c: Likewise.

From-SVN: r119704
2006-12-10 05:09:29 +00:00
GCC Administrator 17c2c77545 Daily bump.
From-SVN: r119702
2006-12-10 00:18:39 +00:00
Paul Thomas 993ef28f82 re PR other/29975 ([meta-bugs] ICEs with CP2K)
2006-12-09  Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29975
	PR fortran/30068
	PR fortran/30096
	* interface.c (compare_type_rank_if): Reject invalid generic
	interfaces.
	(check_interface1): Give a warning for nonreferred to ambiguous
	interfaces.
	(check_sym_interfaces): Check whether an ambiguous interface is
	referred to.  Do not check host associated interfaces since these
	cannot be ambiguous with the local versions.
	(check_uop_interface, gfc_check_interfaces): Update call to
	check_interface1.
	* symbol.c (gfc_get_sym_tree, gfc_get_sym_tree): Allow adding
	unambiguous procedures to generic interfaces.
	* gfortran.h (symbol_attribute): Added use_only and
	ambiguous_interfaces.
	* module.c (load_need): Set the use_only flag, if needed.
	* resolve.c (resolve_fl_procedure): Warn for nonreferred
	interfaces.
	* expr.c (find_array_section): Fix initializer array contructor.


2006-12-09  Paul Thomas <pault@gcc.gnu.org>
	    Tobias Burnus <burnus@gcc.gnu.org>

	PR fortran/29975
	PR fortran/30068
	* gfortran.dg/interface_4.f90: Test adding procedure to generic
	interface.
	* gfortran.dg/interface_5.f90: Test warning for not-referenced-to
	ambiguous interfaces.
	* gfortran.dg/interface_6.f90: Test invalid, ambiguous interface.
	* gfortran.dg/interface_7.f90: Test invalid, ambiguous interface.
	* gfortran.dg/interface_8.f90: Test warning for not-referenced-to
	ambiguous interfaces.
	* gfortran.dg/interface_1.f90: Change dg-error into a dg-warning.
	* gfortran.dg/array_initializer_2.f90: Add initializer array
	constructor test.

	PR fortran/30096
	* gfortran.dg/interface_9.f90: Test that host interfaces are
	not checked for ambiguity with the local version.

Co-Authored-By: Tobias Burnus <burnus@gcc.gnu.org>

From-SVN: r119697
2006-12-09 21:13:29 +00:00
Paul Thomas 1027275d2e re PR fortran/29464 ([4.1 only] problem with duplicate USE, ONLY of procedure in INTERFACE)
2006-11-25  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29464
	* module.c (load_generic_interfaces): Add symbols for all the
	local names of an interface.  Share the interface amongst the
	symbols.
	* gfortran.h : Add generic_copy to symbol_attribute.
	* symbol.c (free_symbol): Only free interface if generic_copy
	is not set.

2006-11-25  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29464
	* gfortran.dg/module_interface_2.f90: New test.

From-SVN: r119696
2006-12-09 20:52:27 +00:00
Paul Thomas 4d4074e415 re PR fortran/29941 ([4.1 only] gfortran reports error with len of assumed size character array)
2006-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29941
	* resolve.c (resolve_function): Add LEN to the functions not
	checked for assumed size actual args.


2006-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/29941
	* gfortran.dg/assumed_len.f90: New test.

From-SVN: r119695
2006-12-09 20:41:51 +00:00
Richard Guenther 8aa25857e0 implicit-typename1.C: Qualify types.
2006-12-09  Richard Guenther  <rguenther@suse.de>

	* g++.dg/warn/implicit-typename1.C: Qualify types.
	* g++.dg/parse/crash12.C: Likewise.
	* g++.dg/tree-ssa/pr22444.C: Likewise.

From-SVN: r119693
2006-12-09 17:40:13 +00:00
Jan Hubicka efe75b6f9f cgraph.c: Update copyright.
* cgraph.c: Update copyright.
	* cgraph.h: Likewise
	(cgraph_update_pending_function): Remove prototype.
	* cgraphunit.c: Update copyright; update overall comment.
	(cgraph_assemble_pending_functions): Make local.

From-SVN: r119691
2006-12-09 15:36:55 +00:00
Maxim Kuvyrkov 448d5cc931 haifa-sched.c (schedule_block): Remove excessive sanity check.
2006-12-09  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* haifa-sched.c (schedule_block): Remove excessive sanity check.

From-SVN: r119688
2006-12-09 13:05:44 +00:00
Tobias Burnus a8feeaee72 array_2.f90: Added sqrt test.
2006-12-09  Tobias Burnus  <burnus@net-b.de>

       * gfortran.dg/array_2.f90: Added sqrt test.

From-SVN: r119687
2006-12-09 10:39:30 +01:00
Trevor Smigiel a1c6e4b803 spu-protos.h (spu_split_immediate): Renamed from spu_split_address.
* config/spu/spu-protos.h (spu_split_immediate): Renamed from
        spu_split_address.
        (cpat_const_p, gen_cpat_const): Add.
        * config/spu/spu.c (immediate_class): New enum.
        (cpat_info, classify_immediate): New.
        (print_operand): Use S, D, T instead of F, G, H.  Use
        classify_immediate.  Handle cpat cases.
        (spu_split_immediate):  Renamed from spu_split_address.  Split all
        immediates that can be split.
        (immediate_load_p): Use classify_immediate.
        (spu_legitimate_constant_p): Accept everything except some cases of
        CONST_VECTOR.
        (spu_expand_move): Use spu_split_immedate.
        (fsmbi_const_p): Use classify_immediate.
        (cpat_const_p): New.
        (gen_cpat_const: New.
        * config/spu/constraints.md (j,k,l): New constraints for cpat
        instructions.
        * config/spu/spu.md (unnamed splitter): Change address splitter to
        handle all immediates.
        (_mov<mode>, _movdi, _movti): Handle i, j, k constraints for cpat
        instructions.
        (cpat, _cpat, splitter): Generate a TImode constant for cpat patterns
        when possible.

From-SVN: r119682
2006-12-09 01:22:39 +00:00
Sandro Tolaini 55eb837db1 configure.in: Add x86 darwin support for libjava.
* configure.in: Add x86 darwin support for libjava.
	* configure: Regenerate.

From-SVN: r119678
2006-12-09 00:21:52 +00:00
GCC Administrator c47169c6e6 Daily bump.
From-SVN: r119676
2006-12-09 00:18:33 +00:00
Mike Stump 9a35ada535 configure.ac: Fix x86 darwin builds.
* configure.ac: Fix x86 darwin builds.
	* darwin_stop_world.c: Likewise.
	* include/private/gcconfig.h: Likewise.
	* connfigure: Regenerate.

From-SVN: r119670
2006-12-08 23:54:21 +00:00
John David Anglin 920aeaf3da re PR target/30039 (HPPA: Incorrect code generated on 64bit host)
PR target/30039
	* pa.md (high:DI and lo_sum:DI): Handle 64-bit CONST_INTs in 32-bit
	patterns.  Correct length of high:DI instruction sequence.

From-SVN: r119669
2006-12-08 23:41:03 +00:00
Mike Stump 44f31fec96 t-darwin (TARGET_LIBGCC2_CFLAGS): Build libgcc with -mmacosx-version-min=10.4.
* config/rs6000/t-darwin (TARGET_LIBGCC2_CFLAGS): Build
	libgcc with -mmacosx-version-min=10.4.
	* config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Default to
	G4 for 10.5+ unless doing kernel builds.

From-SVN: r119666
2006-12-08 22:22:51 +00:00
Uros Bizjak 4280a3e362 re PR target/30120 (silent miscompilation of argument passing)
PR target/30120
        * reg-stack.c (convert_regs_entry): Mark current argument passing
        registers as live.

        * config/i386/i386.h (X87_REGPARM_MAX): Set to 0 to disable passing
        of float arguments in x87 registers.

testsuite/ChangeLog:

        * gcc.target/i386/x87regparm-1.c: XFAIL.
        * gcc.target/i386/x87regparm-2.c: XFAIL.
        * gcc.target/i386/x87regparm-3.c: XFAIL.
        * gcc.target/i386/x87regparm-4.c: XFAIL.

From-SVN: r119663
2006-12-08 19:20:25 +01:00
Manuel López-Ibáñez 4efc447f98 2006-12-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* lib/target-supports.exp
	(check_effective_target_large_long_double): New.  
	* gcc.dg/Wconversion-real.c : Use it.  
	* gcc.dg/Wconversion-integer.c : Fix for targets where char is
	unsigned.

From-SVN: r119662
2006-12-08 18:14:21 +00:00
John David Anglin fd13de7772 pa.h (LEGITIMATE_CONSTANT_P): Simplify.
* pa.h (LEGITIMATE_CONSTANT_P): Simplify.

From-SVN: r119661
2006-12-08 17:28:59 +00:00
Mark Shinwell b9a76028a2 recog.c (mode_dependent_address_p): Identify pre-increment...
gcc/
	* recog.c (mode_dependent_address_p): Identify pre-increment,
	pre-decrement, post-increment and post-decrement addressing as always
	being mode-dependent.
	* config/m32c/m32c.c (m32c_mode_dependent_address): Delete.
	* config/m32c/m32c.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/m32c/m32c-protos.h (m32c_mode_dependent_address): Delete.
	* config/m32r/m32r.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete PRE_DEC,
	PRE_INC and POST_INC checks.
	* config/i386/i386.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/sh/sh.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/pdp11/pdp11.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/avr/avr.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/c4x/c4x.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete PRE_DEC,
	PRE_INC, POST_DEC and POST_INC cases.
	* config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p):
	Delete POST_INC and PRE_DEC cases.
	* config/m68hc11/m68hc11.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to
	no-op.
	* config/cris/cris.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/mn10300/mn10300.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to
	no-op.
	* config/ia64/ia64.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/m68k/m68k.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/rs6000/rs6000.c (rs6000_mode_dependent_address): Delete
	PRE_INC and PRE_DEC cases.
	* config/arc/arc.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/mcore/mcore.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/arm/arm.h (ARM_GO_IF_MODE_DEPENDENT_ADDRESS): Delete.
	(GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/pa/pa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	* config/vax/vax.c (vax_mode_dependent_address_p): Delete
	auto-increment cases.
	* config/h8300/h8300.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete
	auto-increment cases.
	* config/bfin/bfin.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op.
	
	gcc/testsuite/
	* gcc.c-torture/execute/mode-dependent-address.c: New test.

From-SVN: r119660
2006-12-08 16:37:42 +00:00
Andrew MacLeod 00509c04ee New TER code.
2006-12-08  Andrew MacLeod  <amacleod@redhat.com>

	* Makefile.in: Add new file tree-ssa-ter.c.
	* tree-outof-ssa.c (struct temp_expr_table_d, new_temp_expr_table, 
	free_temp_expr_table, add_value_to_version_list, 
	add_value_to_partition_list, remove_value_from_partition_list, 
	add_dependence, check_replaceable, finish_expr, mark_replaceable, 
	kill_expr, kill_virtual_exprs, find_replaceable_in_bb, 
	find_replaceable_exprs, dump_replaceable_exprs): Move to tree-ssa-ter.c.
	* tree-ssa-live.h (find_replaceable_exprs, dump_replaceable_exprs): Add
	prototypes.
	* tree-ssa-ter.c: New file using code moved from tree-outof-ssa.c.
	(struct value_expr_d): Remove.
	(struct temp_expr_table_d): Rename fields, add explicit vector of
	replaceable expressions instead of sharing. Change value_expr_p's to 
	bitmap.  Delete free_list.
	(new_temp_expr_table): Rename fields, count number of ssa_names in
	each partition.
	(free_temp_expr_table): Rename field, free new fields.
	(new_value_expr, free_value_expr, find_value_in_list, add_value_to_list,
	add_info_to_list, remove_value_from_list): Delete.
	(version_to_be_replaced_p): New. Is an ssa-name replaceable?
	(make_dependent_on_partition): New. Set bit in version list, allocating
	a bitmap if need be.
	(add_to_partition_kill_list): New.  Set bit in the partition list,
	allocating a bitmap if need be.
	(remove_from_partition_kill_list): New.  Remove a bit from the
	partition list, free the bitmap if it is empty.
	(add_dependence): Use renamed field, cleanup. Don't add a dependence
	on partitions with only one member.
	(is_replaceable_p): New.  Split out replaceability check from 
	check_replaceable.
	(process_replaceable): New. Replacement code split from 
	check_replaceable.
	(check_replaceable): Removed.
	(finished_with_expr): Renamed from finish_expr.
	(kill_expr): Use renamed fields. Less parameters.
	(kill_virtual_exprs): Less parameters.
	(mark_replaceable): Use renamed fields.
	(find_replaceable_in_bb): Use renamed fields, cleanup.
	(find_replaceable_exprs): Use renamed routines, cleanup.
	(dump_replaceable_exprs): don;t go past end of ssa_names list.
	(debug_ter): New.  Debug routine to dump state.

From-SVN: r119657
2006-12-08 14:07:53 +00:00
Eric Botcazou 5848e34ae4 Fix ChangeLog.
From-SVN: r119656
2006-12-08 13:34:03 +00:00
Bernd Schmidt 96f46444e1 bfin.c (effective_address_32bit_p): Return true for anything involving the GOT.
* config/bfin/bfin.c (effective_address_32bit_p): Return true for
	anything involving the GOT.
	(bfin_adjust_cost): Don't take the REGNO of a MEM.
	(trapping_loads_p): Look inside the pattern of an insn to find the
	SET.
	* config/bfin/bfin.md (attr "type"): Add movcc.
	(insn_reservation "alu"): Likewise.
	(movsicc_insn1, movsicc_insn2): Change type to movcc.

From-SVN: r119655
2006-12-08 12:42:44 +00:00
Jakub Jelinek 5fecd26633 testsuite_hooks.cc (set_memory_limits): Don't set RLIMIT_AS below 16MB on x86_64-linux.
* testsuite/util/testsuite_hooks.cc (set_memory_limits): Don't set
	RLIMIT_AS below 16MB on x86_64-linux.

From-SVN: r119652
2006-12-08 11:06:51 +01:00
Tobias Burnus c3240b8d52 re PR fortran/27546 (IMPORT is broken)
fortran/
2006-12-08  Tobias Burnus  <burnus@net-b.de>

    PR fortran/27546
    * trans-decl.f90 (gfc_create_module_variable): Allow imported symbols
      in interface bodys in modules.

testsuite/
2006-12-08  Tobias Burnus  <burnus@net-b.de>

    PR fortran/27546
    * gfortran.dg/import4.f90: New test for IMPORT in modules.

From-SVN: r119651
2006-12-08 10:45:44 +01:00
Andrew Pinski faf8957192 Correctly wrap my changelog entry.
From-SVN: r119650
2006-12-08 00:11:44 -08:00
Mark Mitchell 9ba7a2f292 re PR c++/29732 (ICE on invalid friend declaration)
PR c++/29732
	* cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
	(explicit_class_specialization_p): Declare.
	* pt.c (explicit_class_specialization_p): New function.
	* parser.c (cp_parser_init_declarator): Check correct number of
	template parameters for in-class function definitions.
	(cp_parser_check_declrator_template_parameters): Stop looking for
	template classes when we find an explicit specialization.
	PR c++/29732
	* g++.dg/template/crash65.C: New test.
	* g++.dg/template/spec16.C: Tweak error markers.

From-SVN: r119649
2006-12-08 06:27:22 +00:00
Andrew Pinski cf71109bd6 Add a PR reference for the patch which fixed PR 27558.
2006-04-20  Jakub Jelinek  <jakub@redhat.com>

        * c-pretty-print.c (pp_c_direct_abstract_declarator): Print
        TYPE_MAX_VALUE (TYPE_DOMAIN (t)) + 1 for ARRAY_TYPE rather
        than plain TYPE_MAX_VALUE (TYPE_DOMAIN (t)).

From-SVN: r119648
2006-12-07 20:50:02 -08:00
Mike Stump 5bdacbc777 Makefile.def (dependencies): Add dependency for install-target-libssp and install-target-libgomp on install-gcc.
* Makefile.def (dependencies): Add dependency for
	install-target-libssp and install-target-libgomp on
	install-gcc.
	* Makefile.in: Regenerate.

From-SVN: r119645
2006-12-08 02:03:42 +00:00