82528 Commits

Author SHA1 Message Date
Robert Dewar
d766cee3c3 a-stzsup.adb, [...]: Fix warnings for range tests optimized out.
2007-08-14  Robert Dewar  <dewar@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>
	    Thomas Quinot  <quinot@adacore.com>

	* a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb, 
	a-stwisu.adb, a-strsup.adb: Fix warnings for range
	tests optimized out.

	* exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
	(Get_Allocator_Final_List): For the case of an anonymous access type
	that has a specified Associated_Final_Chain, do not go up to the
	enclosing scope.
	(Expand_N_Type_Conversion): Test for the case of renamings of access
	parameters when deciding whether to apply a run-time accessibility
	check.
	(Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
	aggregate code before allocator, and ahead of declaration for
	temporary, to prevent access before elaboration when the allocator is
	an actual for an access parameter.
	(Expand_N_Type_Conversion): On an access type conversion involving an
	access parameter, do not apply an accessibility check when the
	operand's original node was an attribute other than 'Access. We now
	create access conversions for the expansion of 'Unchecked_Access and
	'Unrestricted_Access in certain cases and clearly accessibility should
	not be checked for those.

	* exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
	includes a type conversion of a packed component that has been expanded,
	recover the original expression for the object, and use this expression
	in the post-call assignment statement, so that the assignment is made
	to the object and not to a back-end temporary.
	(Freeze_Subprogram): In case of primitives of tagged types not defined
	at the library level force generation of code to register the primitive
	in the dispatch table. In addition some code reorganization has been
	done to leave the implementation clear.
	(Expand_Call): When expanding an inherited implicit conversion,
	preserve the type of the inherited function after the intrinsic
	operation has been expanded.

	* exp_ch2.ads, exp_ch2.adb
	(Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
	of an entry formal appearing in an assignment statement does not assign
	to the formal.
	(Expand_Current_Value): Instead of calling a routine to determine
	whether the prefix of an attribute reference should be optimized or
	not, prevent the optimization of such prefixes all together.

	* lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
	component whose prefix is known to be of an access type is an implicit
	dereference and does not assign to the prefix.

From-SVN: r127411
2007-08-14 10:37:26 +02:00
Robert Dewar
939c12d26a inline.adb, [...]: Suppress unmodified in-out parameter warning in some cases This patch is a also...
2007-08-14  Robert Dewar  <dewar@adacore.com>
	    Ed Schonberg  <schonberg@adacore.com>

	* inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads: 
	Suppress unmodified in-out parameter warning in some cases
	This patch is a also fairly significant change to the way suppressible
	checks are handled.

	* checks.ads, checks.adb (Install_Null_Excluding_Check): No check
	needed for access to concurrent record types generated by the expander.
	(Generate_Range_Check): When generating a temporary to capture the
	value of a conversion that requires a range check, set the type of the
	temporary before rewriting the node, so that the type is always
	properly placed for back-end use.
	(Apply_Float_Conversion_Check): Handle case where the conversion is
	truncating.
	(Get_Discriminal): Code reformatting. Climb the scope stack looking
	for a protected type in order to examine its discriminants.

From-SVN: r127410
2007-08-14 10:37:08 +02:00
Robert Dewar
835d23b2e0 uintp.adb, [...]: Minor reformatting.
2007-08-14  Robert Dewar  <dewar@adacore.com>

	* uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
	par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
	s-osinte-solaris.adb, s-osinte-solaris.ads,
	s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.

	* styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
	switch -gnatyS. Enable -gnatyS in GNAT style check mode

From-SVN: r127409
2007-08-14 10:36:48 +02:00
Hristian Kirtchev
4a9b6b95df a-calend-vms.adb, [...] ("+", [...]): Remove calls to Check_Within_Time_Bounds.
2007-08-14  Hristian Kirtchev  <kirtchev@adacore.com>

	* a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
	calls to Check_Within_Time_Bounds.
	("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
	(Difference): Account for possible rounding of the resulting difference

From-SVN: r127408
2007-08-14 10:36:33 +02:00
Thomas Quinot
40760d6c75 g-soccon-interix.ads, [...]: Removed.
2007-08-14  Thomas Quinot  <quinot@adacore.com>

	* g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads, 
	s-osinte-interix.ads, system-interix.ads: Removed.

From-SVN: r127407
2007-08-14 10:36:22 +02:00
Maxim Kuvyrkov
a46304171f * MAINTAINERS (Write After Approval): Change my email address.
From-SVN: r127406
2007-08-14 08:25:41 +00:00
Maxim Kuvyrkov
e2f6ff946a sched-int.h (struct _dep): Rename field 'kind' to 'type'.
* sched-int.h (struct _dep): Rename field 'kind' to 'type'.
	(DEP_KIND): Rename to DEP_TYPE.  Update all uses.
	(dep_def): New typedef.
	(init_dep_1, sd_debug_dep): Declare functions.
	(DEP_LINK_KIND): Rename to DEP_LINK_TYPE.
	(debug_dep_links): Remove.
	(struct _deps_list): New field 'n_links'.
	(DEPS_LIST_N_LINKS): New macro.
	(FOR_EACH_DEP_LINK): Remove.
	(create_deps_list, free_deps_list, delete_deps_list): Remove
	declaration.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con, move_dep_link): Ditto.
	(struct haifa_insn_data): Split field 'back_deps' into 'hard_back_deps'
	and 'spec_back_deps'.  New field 'resolved_forw_deps'.  Remove field
	'dep_count'.
	(INSN_BACK_DEPS): Remove.
	(INSN_HARD_BACK_DEPS, INSN_SPEC_BACK_DEPS, INSN_RESOLVED_FORW_DEPS):
	New macros.
	(INSN_DEP_COUNT): Remove.
	(enum DEPS_ADJUST_RESULT): Add new constant DEP_NODEP.  Fix comments.
	(spec_info, haifa_recovery_block_was_added_during_scheduling_p):
	Declare global variables.
	(deps_pools_are_empty_p, sched_free_deps): Declare functions.
	(add_forw_dep, compute_forward_dependences): Remove declarations.
	(add_or_update_back_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(debug_ds, sched_insn_is_legitimate_for_speculation_p): Declare
	functions.
	(SD_LIST_NONE, SD_LIST_HARD_BACK, SD_LIST_SPEC_BACK, SD_LIST_FORW): New
	constants.
	(SD_LIST_RES_BACK, SD_LIST_RES_FORW, SD_LIST_BACK): Ditto.
	(sd_list_types_def): New typedef.
	(sd_next_list): Declare function.
	(struct _sd_iterator): New type.
	(sd_iterator_def): New typedef.
	(sd_iterator_start, sd_iterator_cond, sd_iterator_next): New inline
	functions.
	(FOR_EACH_DEP): New cycle wrapper.
	(sd_lists_size, sd_lists_empty_p, sd_init_insn, sd_finish_insn):
	Declare functions.
	(sd_find_dep_between, sd_add_dep, sd_add_or_update_dep): Ditto.
	(sd_resolve_dep, sd_copy_back_deps, sd_delete_dep, sd_debug_lists):
	Ditto.

	* sched-deps.c (init_dep_1): Make global.
	(DUMP_DEP_PRO, DUMP_DEP_CON, DUMP_DEP_STATUS, DUMP_DEP_ALL): New
	constants.
	(dump_dep): New static function.
	(dump_dep_flags): New static variable.
	(sd_debug_dep): New function.
	(add_to_deps_list, remove_from_deps_list): Update 'n_links' field of
	the list.
	(move_dep_link): Use remove_from_deps_list (), instead of
	detach_dep_link ().
	(dep_links_consistent_p, dump_dep_links, debug_dep_links): Remove.
	(dep_link_is_detached_p): New static function.
	(deps_obstack, dl_obstack, dn_obstack): Remove.  Use dn_pool, dl_pool
	instead.
	(dn_pool, dl_pool): New alloc_pools.
	(dn_pool_diff, dl_pool_diff): New static variables.
	(create_dep_node, delete_dep_node): New static function.
	(create_deps_list): Make it static.  Use alloc_pool 'dl_pool'.
	(deps_list_empty_p): Make it static.  Use 'n_links' field.
	(deps_pools_are_empty_p): New static function.
	(alloc_deps_list, delete_deps_list): Remove.
	(dump_deps_list, debug_deps_list, add_back_dep_to_deps_list): Remove.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Remove.  Use sd_copy_back_deps () instead.
	(forward_dependency_cache): Remove.
	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Remove
	'back' from the names.  Change signature to use dep_t instead of
	equivalent quad.
	(add_back_dep): Ditto.  Make global.
	(check_dep_status): Rename to check_dep ().
	(sd_next_list, sd_lists_size, sd_lists_empty_p, sd_init_insn):
	New functions.
	(sd_finish_insn): Ditto.
	(sd_find_dep_between_no_cache): New static function.
	(sd_find_dep_between): New function.
	(ask_dependency_caches, set_dependency_caches): New static functions.
	(update_dependency_caches, change_spec_dep_to_hard, update_dep): Ditto.
	(add_or_update_dep_1): Separate pieces of functionality into
	ask_dependency_caches (), update_dependency_caches (),
	change_spec_dep_to_hard (), update_dep ().
	(get_back_and_forw_lists): New static function.
	(sd_add_dep): Separate setting of dependency caches into
	set_dependency_caches ().
	(sd_add_or_update_dep, sd_resolve_dep, sd_copy_back_deps):
	New functions.
	(sd_delete_dep): Ditto.
	(DUMP_LISTS_SIZE, DUMP_LISTS_DEPS, DUMP_LISTS_ALL): New constants.
	(dump_lists): New static function.
	(sd_debug_lists): New debug function.
	(delete_all_dependences, fixup_sched_groups): Update to use
	sd_* infrastructure.
	(sched_analyze_2): Create data-speculative dependency only if
	data-speculation is enabled.
	(sched_analyze_insn): If insn cannot be speculative, make all its
	dependencies non-speculative.
	(sched_analyze): Use sd_init_insn ().
	(add_forw_dep, compute_forward_dependencies): Remove.
	(delete_dep_nodes_in_back_deps): New static function.
	(sched_free_deps): New function.
	(init_dependency_caches): Init alloc_pools.
	(extend_depedency_caches): Update after removing of
	forward_dependency_cache.
	(free_dependency_caches): Ditto.  Free alloc_pools.
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Remove.
	(delete_forw_dep, add_or_update_back_dep, add_or_update_back_forw_dep):
	Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.
	(add_dependence): Use init_dep ().
	(get_dep_weak_1): New static function.
	(get_dep_weak): Move logic to get_dep_weak_1 ().
	(dump_ds): New static function moved from haifa-sched.c:
	debug_spec_status ().
	(debug_ds): New debug function.
	(check_dep_status): Rename to check_dep ().  Update to check whole
	dependencies.

	* haifa-sched.c (spec_info): Make global.
	(added_recovery_block_p): Rename to
	'haifa_recovery_block_was_added_during_current_schedule_block_p'.
	(haifa_recovery_block_was_added_during_scheduling_p): New variable.
	(dep_cost, priority, rank_for_schedule, schedule_insn): Update
	to use new interfaces.
	(ok_for_early_queue_removal): Ditto.
	(schedule_block): Initialize logical uids of insns emitted by the
	target.
	(sched_init): Initialize new variable.
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	interfaces.
	(extend_global): Initialize insn data.
	(init_h_i_d): Remove code that is now handled in sd_init_insn ().
	(process_insn_forw_deps_be_in_spec): Change signature.  Update to use
	new interfaces.
	(add_to_speculative_block): Update to use new interfaces.
	(create_recovery_block): Set new variables.
	(create_check_block_twin, fix_recovery_deps): Update to use new
	interfaces.
	(sched_insn_is_legitimate_for_speculation_p): New function.
	(speculate_insn): Move checking logic to
	sched_insn_is_legitimate_for_speculation_p ().
	(sched_remove_insn): Finalize sched-deps information of instruction.
	(clear_priorities, add_jump_dependencies): Update to use new
	interfaces.
	(debug_spec_status): Rename to dump_ds () and move to sched-deps.c.
	
	* sched-rgn.c (set_spec_fed, find_conditional_protection): Update
	to use new interfaces.
	(is_conditionally_protected, is_pfree, is_prisky) Ditto.
	(new_ready): Try to use control speculation only if it is available.
	(add_branch_dependences): Update to use new interfaces.
	(compute_block_backward_dependences): Rename to
	compute_block_dependences ().  Call
	targetm.sched.dependencies_evaluation_hook ().
	(free_block_dependencies): New static function.
	(debug_dependencies): Update to use new interfaces.
	(schedule_region): Remove separate computation of forward dependencies.
	Move call of targetm.sched.dependencies_evaluation_hook () to
	compute_block_dependences ().  Free dependencies at the end of
	scheduling the region.

	* sched-ebb.c (earliest_block_with_similiar_load): Update to use
	new interfaces.
	(add_deps_for_risky_insns): Ditto.
	(schedule_ebb): Remove separate computation of forward dependencies.
	Free dependencies at the end of	scheduling the ebb.

	* ddg.c (create_ddg_dependence): Update to use new interfaces.
	(build_intra_loop_deps): Ditto.  Remove separate computation of forward
	dependencies.  Free sched-deps dependencies.

	* config/ia64/ia64.c (ia64_dependencies_evaluation_hook): Update
	to use new interfaces.
	(ia64_dfa_new_cycle, ia64_gen_check): Ditto.

	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Update to use
	new interfaces.
	(is_costly_group): Ditto.

From-SVN: r127405
2007-08-14 06:40:34 +00:00
Kaveh R. Ghazi
ed7a4b4b30 alias.c (rtx_equal_for_memref_p): Constify.
* alias.c (rtx_equal_for_memref_p): Constify.
	* basic-block.h (const_edge, const_basic_block): New.
	(reg_set_to_hard_reg_set, dfs_enumerate_from, single_succ_p,
	single_pred_p, single_succ_edge, single_pred_edge, single_succ,
	single_pred, maybe_hot_bb_p, probably_cold_bb_p,
	probably_never_executed_bb_p, edge_probability_reliable_p,
	br_prob_note_reliable_p, forwarder_block_p, flow_nodes_print,
	inside_basic_block_p, control_flow_insn_p, dominated_by_p):
	Likewise.
	* bb-reorder.c (better_edge_p, push_to_next_round_p): Likewise.
	* bt-load.c (basic_block_freq, insn_sets_btr_p, can_move_up):
	Likewise.
	* cfganal.c (flow_active_insn_p, forwarder_block_p,
	flow_nodes_print, dfs_enumerate_from): Likewise.
	* cfgbuild.c (count_basic_blocks, inside_basic_block_p,
	control_flow_insn_p, count_basic_blocks): Likewise.
	* cfgloop.c (flow_bb_inside_loop_p, glb_enum_p,
	get_loop_body_with_size, loop_exit_edge_p): Likewise.
	* cfgloop.h (flow_bb_inside_loop_p, num_loop_insns,
	average_num_loop_insns, loop_exit_edge_p,
	just_once_each_iteration_p, can_duplicate_loop_p): Likewise.
	* cfgloopanal.c (just_once_each_iteration_p, num_loop_insns,
	average_num_loop_insns, seq_cost): Likewise.
	* cfgloopmanip.c (rpe_enum_p, can_duplicate_loop_p): Likewise.
	* dominance.c (dominated_by_p): Likewise.
	* emit-rtl.c (validate_subreg): Likewise.
	* except.c (can_throw_internal, can_throw_external): Likewise.
	* except.h (can_throw_internal, can_throw_external): Likewise.
	* gcse.c (gcse_constant_p, oprs_unchanged_p, oprs_anticipatable_p,
	oprs_available_p, hash_expr, expr_equiv_p, oprs_not_set_p,
	compute_transp, load_killed_in_block_p, reg_killed_on_edge,
	simple_mem, store_ops_ok, load_kills_store, find_loads,
	store_killed_in_insn, store_killed_after, store_killed_before,
	gcse_mem_operand, implicit_set_cond_p, store_killed_in_pat):
	Likewise.
	* ifcvt.c (count_bb_insns, cheap_bb_rtx_cost_p, noce_operand_ok,
	noce_mem_write_may_trap_or_fault_p): Likewise.
	* pointer-set.c (pointer_set_contains, pointer_map_contains):
	Likewise.
	* pointer-set.h (pointer_set_contains, pointer_map_contains):
	Likewise.
	* predict.c (can_predict_insn_p, maybe_hot_bb_p,
	probably_cold_bb_p, probably_never_executed_bb_p,
	edge_probability_reliable_p, br_prob_note_reliable_p,
	can_predict_insn_p): Likewise.
	* regclass.c (reg_set_to_hard_reg_set): Likewise.
	* resource.c (return_insn_p): Likewise.
	* rtl.h (reg_set_between_p, reg_set_p, validate_subreg):
	Likewise.
	* rtlanal.c (reg_set_between_p, reg_set_p): Likewise.
	* tracer.c (count_insns, ignore_bb_p, better_p): Likewise.
	* tree-cfg.c (verify_gimple_unary_expr, verify_gimple_binary_expr,
	verify_gimple_modify_stmt): Likewise.
	* tree-chrec.c (is_not_constant_evolution,
	is_multivariate_chrec_rec, is_multivariate_chrec,
	chrec_contains_symbols, chrec_contains_undetermined,
	tree_contains_chrecs, evolution_function_is_affine_multivariate_p,
	evolution_function_is_univariate_p, avoid_arithmetics_in_type_p,
	eq_evolutions_p, scev_direction): Likewise.
	* tree-chrec.h (automatically_generated_chrec_p, tree_is_chrec,
	eq_evolutions_p, is_multivariate_chrec, chrec_contains_symbols,
	chrec_contains_symbols_defined_in_loop,
	chrec_contains_undetermined, tree_contains_chrecs,
	evolution_function_is_affine_multivariate_p,
	evolution_function_is_univariate_p, chrec_zerop,
	evolution_function_is_constant_p, evolution_function_is_affine_p,
	evolution_function_is_affine_or_constant_p,
	tree_does_not_contain_chrecs, chrec_type): Likewise.
	* tree-data-ref.c (tree_fold_divides_p,
	object_address_invariant_in_loop_p, dr_may_alias_p,
	ziv_subscript_p, siv_subscript_p, gcd_of_steps_may_divide_p,
	same_access_functions, constant_access_functions,
	access_functions_are_affine_or_constant_p, find_vertex_for_stmt):
	Likewise.
	* tree-flow.h (scev_direction): Likewise.
	* tree-gimple.c (is_gimple_stmt): Likewise.
	* tree-outof-ssa.c (identical_copies_p, identical_stmt_lists_p):
	Likewise.
	* tree-pretty-print.c (op_prio): Likewise.
	* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop,
	analyzable_condition, backedge_phi_arg_p): Likewise.
	* tree-scalar-evolution.h (get_chrec_loop): Likewise.
	* tree-ssa-operands.c (get_name_decl, operand_build_cmp): Likewise.
	* tree-ssa-threadupdate.c (dbds_continue_enumeration_p):
	Likewise.

From-SVN: r127404
2007-08-14 04:44:35 +00:00
GCC Administrator
a0b7c7aef6 Daily bump.
From-SVN: r127402
2007-08-14 00:17:28 +00:00
Dan Hipschman
d46571c803 2007-08-3 1 Dan Hipschman <dsh@google.com>
gcc/
2007-08-3 1 Dan Hipschman  <dsh@google.com>

	PR 32953
	* c-format.c (check_format_arg): Move check for zero-length
	format strings below the check for unterminated strings.

testsuite/
2007-08-13  Dan Hipschman  <dsh@google.com>

	PR 32953
	* gcc.dg/format/array-1.c: Add an additional test for
	unterminated format strings of length 1.

From-SVN: r127399
2007-08-13 14:55:01 -07:00
Paul Thomas
eda0ed2597 re PR fortran/32926 (ICE with external function as argument)
2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32926
	* match.c (gfc_match_call): Do not create a new symtree in the
	case where the existing symbol is external and not referenced.

2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32926
	* gfortran.dg/external_procedures_3.f90: New test.

From-SVN: r127398
2007-08-13 21:02:00 +00:00
Paul Thomas
5a8af0b4ef re PR fortran/32827 (IMPORT fails for TYPE when also used in INTERFACE)
2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32827
	* decl.c (variable_decl): Check for an imported symbol
	by looking for its symtree and testing for the imported
	attribute.
	(gfc_match_import): Remove change of symbol's namespace
	and set the attribute imported instead.
	* symbol.c (gfc_get_sym_tree): It is not an error if a
	symbol is imported.
	* gfortran.h : Add the 'imported' to symbol_attribute.

2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32827
	* gfortran.dg/import6.f90: New test.

From-SVN: r127397
2007-08-13 20:58:00 +00:00
Andrew Pinski
462643f011 re PR c/30427 (~ vector float is accepted)
2007-08-13  Andrew Pinski  <pinskia@gmail.com>

        PR C/30427
        * c-typeck.c (build_unary_op <case BIT_NOT_EXPR>): Reject vector float
        types.

2007-08-13  Andrew Pinski  <pinskia@gmail.com>

        PR C/30427
        *  gcc.dg/vector-1.c: New test.

From-SVN: r127396
2007-08-13 13:06:15 -07:00
Danny Smith
6e20eae994 * acinclude.m4 (GTHREAD_USE_WEAK) Define to 0 for mingw32.
* configure: Regenerate.

From-SVN: r127395
2007-08-13 12:21:35 +00:00
Nick Clifton
b21fbb687b Revert GPLv3 patch to arm_neon.h
From-SVN: r127394
2007-08-13 10:05:38 +00:00
Richard Sandiford
89a9533c51 pr21255-4.c: Skip for PIC.
gcc/testsuite/
	* gcc.dg/pr21255-4.c: Skip for PIC.
	* gcc.dg/tree-ssa/loop-1.c: Allow bsrf as well as jsr for SH targets.

From-SVN: r127393
2007-08-13 09:25:08 +00:00
Richard Sandiford
5cc6957248 attr-isr.c: Skip for PIC.
gcc/testsuite/
	* gcc.dg/attr-isr.c: Skip for PIC.
	* gcc.dg/attr-isr-nosave_low_regs.c: Likewise.
	* gcc.dg/attr-isr-trapa.c: Likewise.
	* gcc.dg/pragma-isr-nosave_low_regs.c: Likewise.
	* gcc.dg/pragma-isr-trapa.c: Likewise.
	* gcc.dg/pragma-isr-trapa2.c: Likewise.

From-SVN: r127392
2007-08-13 09:24:46 +00:00
Paul Thomas
1229ece065 re PR fortran/32962 (b = conjg(transpose(a)) is erroneous if b is an allocatable array)
2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32962
	* trans-array.c (gfc_conv_array_transpose): Set the offset
	of the destination to zero if the loop is zero based.

2007-08-13  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/32962
	* gfortran.dg/transpose_1.f90: New test.

From-SVN: r127391
2007-08-13 06:16:03 +00:00
Ralf Wildenhues
d9acb717f1 configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Pass --silent if $silent.
* configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Pass
	--silent if $silent.
	* configure: Regenerate.

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

From-SVN: r127390
2007-08-13 11:24:29 +10:00
GCC Administrator
22a19ceb46 Daily bump.
From-SVN: r127388
2007-08-13 00:20:37 +00:00
Francois-Xavier Coudert
719e72fb6f re PR fortran/29600 ([F03] MINLOC and MAXLOC take an optional KIND argument)
PR fortran/29600

	* intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
	* iresolve.c (gfc_resolve_achar): Handle the KIND argument.
	* check.c (gfc_check_achar): Check for the optional KIND argument.
	* simplify.c (gfc_simplify_achar): Use KIND argument.
	* intrinsic.h (gfc_check_achar, gfc_simplify_achar,
	gfc_resolve_achar): Adjust prototypes.

	* gfortran.dg/intrinsics_kind_argument_1.f90: Add test for ACHAR
	intrinsic.

From-SVN: r127385
2007-08-12 21:21:08 +00:00
Francois-Xavier Coudert
34b4bc5c61 re PR fortran/30964 (optional arguments to random_seed)
PR fortran/30964
	PR fortran/33054

	* trans-expr.c (gfc_conv_function_call): When no formal argument
	list is available, we still substitute missing optional arguments.
	* check.c (gfc_check_random_seed): Correct the check on the
	number of arguments to RANDOM_SEED.
	* intrinsic.c (add_subroutines): Add a resolution function to
	RANDOM_SEED.
	* iresolve.c (gfc_resolve_random_seed): New function.
	* intrinsic.h (gfc_resolve_random_seed): New prototype.

	* intrinsics/random.c (random_seed): Rename into random_seed_i4.
	(random_seed_i8): New function.
	* gfortran.map (GFORTRAN_1.0): Remove _gfortran_random_seed,
	add _gfortran_random_seed_i4 and _gfortran_random_seed_i8.
	* libgfortran.h (iexport_proto): Replace random_seed by
	random_seed_i4 and random_seed_i8.
	* runtime/main.c (init): Call the new random_seed_i4.

	* gfortran.dg/random_4.f90: New test.
	* gfortran.dg/random_5.f90: New test.
	* gfortran.dg/random_6.f90: New test.
	* gfortran.dg/random_7.f90: New test.

From-SVN: r127383
2007-08-12 20:45:29 +00:00
Francois-Xavier Coudert
096f0d9dbc re PR fortran/32860 (Support %ld (for "long") for gfc_warning)
PR fortran/32860

	* error.c (error_uinteger): New function.
	(error_integer): Call error_uinteger.
	(error_print): Handle %u, %lu, %li and %ld format specifiers.
	* interface.c (compare_actual_formal): Use the new %lu specifier.

	* c-format.c (gcc_gfc_length_specs): New array.
	(gcc_gfc_char_table): Add unsigned specifier, and references to
	the l length modifier.
	(format_types_orig): Use the new gcc_gfc_length_specs.

	* gcc.dg/format/gcc_gfc-1.c: Updated with new formats.

From-SVN: r127382
2007-08-12 20:39:18 +00:00
Francois-Xavier Coudert
654b60732e re PR fortran/31629 (option to make module entities PRIVATE by default)
PR fortran/31629

	* lang.opt (-fmodule-private): New option.
	* gfortran.h (gfc_option_t): Add flag_module_private member.
	* invoke.texi (-fmodule-private): Document the new option.
	* module.c (gfc_check_access): Allow the -fmodule-private option
	to modify the default behaviour.
	* options.c (gfc_init_options): Initialize flag_module_private.
	(gfc_handle_option): Handle -fmodule-private.

	* gfortran.dg/module_private_1.f90: New test.

From-SVN: r127381
2007-08-12 20:19:59 +00:00
Francois-Xavier Coudert
5cda509805 re PR fortran/29600 ([F03] MINLOC and MAXLOC take an optional KIND argument)
PR fortran/29600

	* intrinsic.c (add_functions): Add KIND arguments to COUNT,
	IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
	and VERIFY.
	* iresolve.c (gfc_resolve_count): Add kind argument.
	(gfc_resolve_iachar): New function.
	(gfc_resolve_ichar): Add kind argument.
	(gfc_resolve_index_func): Likewise.
	(gfc_resolve_lbound): Likewise.
	(gfc_resolve_len): Likewise.
	(gfc_resolve_len_trim): Likewise.
	(gfc_resolve_scan): Likewise.
	(gfc_resolve_size): New function.
	(gfc_resolve_ubound): Add kind argument.
	(gfc_resolve_verify): Likewise.
	* trans-decl.c (gfc_get_extern_function_decl): Allow specific
	intrinsics to have 4 arguments.
	* check.c (gfc_check_count): Add kind argument.
	(gfc_check_ichar_iachar): Likewise.
	(gfc_check_index): Likewise.
	(gfc_check_lbound): Likewise.
	(gfc_check_len_lentrim): New function.
	(gfc_check_scan): Add kind argument.
	(gfc_check_size): Likewise.
	(gfc_check_ubound): Likewise.
	(gfc_check_verify): Likewise.
	* intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
	INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
	* simplify.c (get_kind): Whitespace fix.
	(int_expr_with_kind): New function.
	(gfc_simplify_iachar): Add kind argument.
	(gfc_simplify_iachar): Likewise.
	(gfc_simplify_ichar): Likewise.
	(gfc_simplify_index): Likewise.
	(simplify_bound_dim): Likewise.
	(simplify_bound): Likewise.
	(gfc_simplify_lbound): Likewise.
	(gfc_simplify_len): Likewise.
	(gfc_simplify_len_trim): Likewise.
	(gfc_simplify_scan): Likewise.
	(gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
	(gfc_simplify_size): Add kind argument.
	(gfc_simplify_ubound): Likewise.
	(gfc_simplify_verify): Likewise.
	* intrinsic.h: Update prototypes and add new ones.
	* trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
	gfc_conv_intrinsic_index_scan_verify.
	(gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
	(gfc_conv_intrinsic_function): Call
	gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
	SCAN and VERIFY intrinsics.

	* gfortran.dg/intrinsics_kind_argument_1.f90: New test.
	* gfortran.dg/pure_dummy_length_1.f90: Adapt to new error wording.

From-SVN: r127380
2007-08-12 19:57:01 +00:00
Zdenek Dvorak
9687668119 MAINTAINERS (Various Maintainers): Add myself as loop infrastructure maintainer.
* MAINTAINERS (Various Maintainers): Add myself as
	loop infrastructure maintainer.  Update my e-mail
	address.

From-SVN: r127379
2007-08-12 19:49:35 +00:00
Sa Liu
1c7f7c66f8 emit-rtl.c (try_split): Relink the insns with REG_LIBCALL note and with REG_RETVAL note after split.
2007-08-12  Sa Liu  <saliu@de.ibm.com>

       * emit-rtl.c (try_split): Relink the insns with REG_LIBCALL note
       and with REG_RETVAL note after split.

From-SVN: r127376
2007-08-12 18:08:43 +00:00
David Daney
5920daabce mips.c (mips_sched_reorder): Mark cycle parameter as ATTRIBUTE_UNUSED.
* config/mips/mips.c (mips_sched_reorder):  Mark cycle parameter
	as ATTRIBUTE_UNUSED.

From-SVN: r127371
2007-08-12 05:43:05 +00:00
David Edelsohn
ee7caeb3b8 rs6000.h (CC1_CPU_SPEC): Define as empty string if HAVE_LOCAL_CPU_DETECT not defined.
2007-08-11  David Edelsohn  <edelsohn@gnu.org>
            Segher Boessenkool  <segher@kernel.crashing.org>

        * config/rs6000/rs6000.h (CC1_CPU_SPEC): Define as empty string if
        HAVE_LOCAL_CPU_DETECT not defined.

Co-Authored-By: Segher Boessenkool <segher@kernel.crashing.org>

From-SVN: r127370
2007-08-11 22:46:54 -04:00
GCC Administrator
92c7299831 Daily bump.
From-SVN: r127368
2007-08-12 00:17:40 +00:00
Jan Hubicka
bd85fcee30 cgraphunit.c (record_cdtor_fn): Declare all cdtors always inlined.
* cgraphunit.c (record_cdtor_fn): Declare all cdtors always inlined.
	(cgraph_process_new_functions): Honor previous value of
	disregard_inline_limits.
	* ipa-inline.c (compute_inline_parameters): Likewise.

From-SVN: r127365
2007-08-11 23:14:24 +00:00
Francois-Xavier Coudert
2b840e5067 re PR fortran/31189 (Support backtracing for non-library errors)
PR fortran/31189

	* runtime/backtrace.c (show_backtrace): Skip _gfortrani_handler
	when displaying backtrace.
	* runtime/compile_options.c: Include <signal.h>.
	(handler): New function.
	(set_options): Set signal handlers for backtrace.
	* libgfortran.h (handler): Add prototype.

	* invoke.texi (-fbacktrace): Document the new behaviour.

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

From-SVN: r127364
2007-08-11 21:52:22 +00:00
Francois-Xavier Coudert
c9ff1de3ae re PR fortran/32937 (segfault with string and -fdefault-integer-8)
PR fortran/32937

	* trans-array.c (gfc_conv_expr_descriptor): Use
	gfc_conv_const_charlen to generate backend_decl of right type.
	* trans-expr.c (gfc_conv_expr_op): Use correct return type.
	(gfc_build_compare_string): Use int type instead of default
	integer kind for single character comparison.
	(gfc_conv_aliased_arg): Give backend_decl the right type.
	* trans-decl.c (gfc_build_intrinsic_function_decls): Make
	compare_string return an int.

	* gfortran.dg/char_length_6.f90: New test.

	* intrinsics/string_intrinsics.c (compare_string): Return an int.
	* libgfortran.h (compare_string): Likewise.

From-SVN: r127363
2007-08-11 21:31:35 +00:00
Ian Lance Taylor
4862826d55 alias.h (alias_set_type): Define new type.
./:	* alias.h (alias_set_type): Define new type.
	(ALIAS_SET_MEMORY_BARRIER): Use it.
	* rtl.h: Include alias.h.
	(struct mem_attrs): Use alias_set_type.
	* tree.h: Include alias.h
	(struct tree_type): Use alias_set_type.
	(struct tree_struct_field_tag): Likewise.
	(struct tree_decl_common): Likewise.
	* alias.c (struct alias_set_entry): Use alias_set_type.
	(get_alias_set_entry, alias_set_subset_of): Likewise.
	(alias_sets_conflict_p): Likewise.
	(alias_sets_must_conflict_p): Likewise.
	(objects_must_conflict_p): Likewise.
	(get_alias_set, new_alias_set): Likewise.
	(record_alias_subset, record_component_aliases): Likewise.
	(varargs_set, frame_set): Change to alias_set_type.
	(get_varargs_alias_set): Use alias_set_type.
	(get_frame_alias_set): Likewise.
	* builtins.c (setjmp_alias_set): Change to alias_set_type.
	* dse.c (struct store_info): Use alias_set_type.
	(struct read_info, struct clear_alias_mode_holder): Likewise.
	(clear_alias_set_lookup, canon_address): Likewise.
	(record_store, check_mem_read_rtx): Likewise.
	(dse_record_singleton_alias_set): Likewise.
	(dse_invalidate_singleton_alias_set): Likewise.
	* emit-rtl.c (get_mem_attrs): Likewise.
	(set_mem_attributes_minus_bitpos): Likewise.
	(set_mem_alias_set): Likewise.
	* expr.c (store_constructor_field, store_field): Likewise.
	* gimplify.c (struct gimplify_init_ctor_preeval_data): Likewise.
	* langhooks.c (lhd_get_alias_set): Likewise.
	* langhooks-def.h (lhd_get_alias_set): Likewise.
	* reload1.c (alter_reg): Likewise.
	* tree-flow.h (struct fieldoff): Likewise.
	* tree-ssa-alias.c (struct alias_map_d): Likewise.
	(may_alias_p, get_smt_for, create_sft): Likewise.
	* tree-ssa-alias-warnings.c (nonstandard_alias_types_p): Likewise.
	* tree-ssa-structalias.c (set_uids_in_ptset): Likewise.
	(merge_smts_into): Likewise.
	* varasm.c (const_alias_set): Likewise.
	* c-common.c (strict_aliasing_warning): Likewise.
	(c_common_get_alias_set): Likewise.
	* dse.h (dse_record_singleton_alias_set): Update declaration.
	(dse_invalidate_singleton_alias_set): Likewise.
	* emit-rtl.h (set_mem_alias_set): Likewise.
	* c-common.h (c_common_get_alias_set): Likewise.
	* print-rtl.c (print_rtx): Cast MEM_ALIAS_SET when printing it.
	* print-tree.c (print_node): Likewise.
	* config/alpha/alpha.c (alpha_sr_alias_set): Change to
	alias_set_type.
	(alpha_setup_incoming_varargs): Use alias_set_type.
	* config/i386/i386.c (setup_incoming_varargs_64): Use
	alias_set_type.
	(setup_incoming_varargs_ms_64): Likewise.
	(ix86_GOT_alias_set): Likewise.
	* config/mn10300/mn10300.c (mn10300_builtin_saveregs): Likewise.
	* config/rs6000/rs6000.c (setup_incoming_varargs): Likewise.
	(set): Change to alias_set_type.
	(get_TOC_alias_set): Use alias_set_type.
	* config/rs6000/rs6000-protos.h (get_TOC_alias_set): Update
	declaration.
	* config/sh/sh.c (sh_builtin_saveregs): Use alias_set_type.
	* config/sparc/sparc.c (sparc_sr_alias_set): Change to
	alias_set_type.
	(struct_value_alias_set): Likewise.
	* Makefile.in (GTFILES): Add $(srcdir)/alias.h.
ada/:
	* misc.c (gnat_get_alias_set): Change return type to
	alias_set_type.
cp/:
	* cp-objcp-common.c (cxx_get_alias_set): Change return type to
	alias_set_type.
	* cp/cp-tree.h (cxx_get_alias_set): Update declaration.
fortran:/
	* f95-lang.c (gfc_get_alias_set): Change return type to
	alias_set_type.

From-SVN: r127362
2007-08-11 17:21:56 +00:00
Richard Sandiford
a7f051fe0b vxworks-dummy.h (TARGET_VXWORKS): Define.
gcc/
	* config/vxworks-dummy.h (TARGET_VXWORKS): Define.
	* config/vxworks.h (TARGET_VXWORKS): Override.
	* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Don't define
	"mips" if TARGET_VXWORKS.

From-SVN: r127361
2007-08-11 16:52:47 +00:00
Richard Sandiford
3fb300196d calls.c (avoid_likely_spilled_reg): New function.
gcc/
	* calls.c (avoid_likely_spilled_reg): New function.
	(expand_call): Use it.

From-SVN: r127360
2007-08-11 16:51:07 +00:00
Kaveh R. Ghazi
4d8a9bfe24 decl.c, utils2.c: Fix whitespace in last change.
* decl.c, utils2.c: Fix whitespace in last change.

From-SVN: r127359
2007-08-11 16:38:51 +00:00
Kaveh R. Ghazi
3959576353 decl.c (compare_field_bitpos): Constify.
* decl.c (compare_field_bitpos): Constify.
	* utils2.c (compare_elmt_bitpos): Likewise.

From-SVN: r127358
2007-08-11 13:34:32 +00:00
Kaveh R. Ghazi
ea7c218e46 c-typeck.c (build_c_cast): Add OPT_Wcast_qual to warnings.
* c-typeck.c (build_c_cast): Add OPT_Wcast_qual to warnings.

From-SVN: r127357
2007-08-11 13:32:52 +00:00
GCC Administrator
01cda23277 Daily bump.
From-SVN: r127355
2007-08-11 00:17:21 +00:00
Francois-Xavier Coudert
c8fe94c7ea re PR fortran/31270 (print subscript value and array bounds when out-of-bounds error occurs)
PR fortran/31270

	* trans.c (gfc_trans_runtime_check): Reorder arguments and
	add extra variable arguments. Hand them to the library function.
	* trans.h (gfc_trans_runtime_check): Update prototype.
	* trans-array.c (gfc_trans_array_bound_check): Issue more
	detailled error messages.
	(gfc_conv_array_ref): Likewise.
	(gfc_conv_ss_startstride): Likewise.
	(gfc_trans_dummy_array_bias): Reorder arguments to
	gfc_trans_runtime_check.
	* trans-expr.c (gfc_conv_substring): Issue more detailled
	error messages.
	(gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
	* trans-stmt.c (gfc_trans_goto): Likewise.
	* trans-io.c (set_string): Reorder arguments to
	gfc_trans_runtime_check and issue a more detailled error message.
	* trans-decl.c (gfc_build_builtin_function_decls): Make
	runtime_error and runtime_error_at handle a variable number of
	arguments.
	* trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
	to gfc_trans_runtime_check.
	(gfc_conv_intrinsic_minmax): Likewise.
	(gfc_conv_intrinsic_repeat): Issue more detailled error messages.

	* runtime/error.c (runtime_error_at): Add a variable number of
	arguments.
	* libgfortran.h (runtime_error_at): Update prototype.

From-SVN: r127352
2007-08-10 22:12:04 +00:00
Adam Nemet
ac2610bf42 predicates.md (const_call_insn_operand): Invoke SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs.
* config/mips/predicates.md (const_call_insn_operand): Invoke
	SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs.

From-SVN: r127351
2007-08-10 22:11:43 +00:00
Diego Novillo
c749c2ee4a gcc.doxy: Rename from tree-ssa.doxy.
* gcc.doxy: Rename from tree-ssa.doxy.

From-SVN: r127350
2007-08-10 17:08:32 -04:00
Diego Novillo
cfa66dc16f tree-ssa.doxy: Update for doxygen 1.5.
* tree-ssa.doxy: Update for doxygen 1.5.
	Include all the files in the middle and back ends.

From-SVN: r127349
2007-08-10 16:02:33 -04:00
David Edelsohn
656ca3addf re PR target/33042 (Bootstrap failure on ppc64)
PR target/33042
        * config/rs6000/driver-rs6000.c: Include link.h.
        Use ElfW instead of wordsize-specif typedef.

From-SVN: r127348
2007-08-10 14:48:33 -04:00
Ollie Wild
19831e2b8b name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous type lookups.
gcc/cp/
	* name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
	type lookups.
	(ambiguous_decl): Construct tree of ambiguous types.  Remove extaneous
	function parameter.
	(unqualified_namespace_lookup): Fix ambiguous_decl call.
	(lookup_using_namespace): Fix ambiguous_decl call.
	(qualified_lookup_using_namespace): Fix ambiguous_decl call.

	gcc/testsuite/
	* g++.dg/lookup/using18.C: New test.

From-SVN: r127347
2007-08-10 18:12:12 +00:00
Kaveh R. Ghazi
68a57691dc system.h (CONST_CAST): New.
* system.h (CONST_CAST): New.
	* c-decl.c (c_make_fname_decl): Use it.
	* c-lex.c (cb_ident, lex_string): Likewise.
	* c-typeck.c (free_all_tagged_tu_seen_up_to): Likewise.
	* gcc.c (set_spec, read_specs, for_each_path, execute, do_spec_1,
	give_switch, set_multilib_dir): Likewise.
	* gengtype-parse.c (string_seq, typedef_name): Likewise.
	* passes.c (execute_one_pass): Likewise.
	* prefix.c (update_path): Likewise.
	* pretty-print.c (pp_base_destroy_prefix): Likewise.
	* tree.c (build_string): Likewise.

cp:
	* call.c (name_as_c_string): Use CONST_CAST.
	* decl.c (build_decl): Likewise.
	* parser.c (cp_parser_string_literal): Likewise.

fortran:
	* gfortranspec.c (lang_specific_driver): Use CONST_CAST.
	* options.c (gfc_post_options): Likewise.
	* parse.c (parse_omp_structured_block): Likewise.
	* st.c (gfc_free_statement): Likewise.

java:
	* jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
	* jcf.h (JCF_FINISH): Likewise.

From-SVN: r127344
2007-08-10 17:53:58 +00:00
Aldy Hernandez
df54b9ab94 tree-flow-inline.h (is_exec_stmt): Remove.
* tree-flow-inline.h (is_exec_stmt): Remove.
	(is_label_stmt): Remove.
	* tree-flow.h: Remove prototypes for is_exec_stmt, get_filename, and
	is_label_stmt.

From-SVN: r127343
2007-08-10 17:29:23 +00:00
Andreas Krebbel
acbe5496b3 lower-subreg.c (resolve_shift_zext): Don't adjust src_reg_num for wordmode operands.
2007-08-10  Andreas Krebbel  <krebbel1@de.ibm.com>

	* lower-subreg.c (resolve_shift_zext): Don't adjust
	src_reg_num for wordmode operands.

From-SVN: r127342
2007-08-10 17:16:57 +00:00
Sandra Loosemore
174bd8cad0 mips.c (TARGET_SCHED_INIT): Define.
2007-08-10  Sandra Loosemore  <sandra@codesourcery.com>
	    David Ung  <davidu@mips.com>

        gcc/
	* config/mips/mips.c (TARGET_SCHED_INIT): Define.
	(TARGET_SCHED_REORDER2): Define.
	(mips_maybe_swap_ready): New.
	(mips_last_74k_agen_insn): New.
	(mips_74k_agen_init): New.
	(mips_74k_agen_reorder): New function to group loads and stores
	in the ready queue.
	(mips_sched_init): New.  
	(mips_sched_reorder): Don't do initialization here.  Call
	mips_74k_agen_reorder.
	(mips_variable_issue): Call mips_74k_agen_init.

Co-Authored-By: David Ung <davidu@mips.com>

From-SVN: r127341
2007-08-10 12:35:49 -04:00