Commit Graph

89565 Commits

Author SHA1 Message Date
Jakub Jelinek
8518c095a8 re PR debug/37287 (ICE (segfault) with new debugging patch)
PR debug/37287
	* dwarf2out.c (gen_namespace_die): For DECL_EXTERNAL modules don't
	add source coords.

	* gfortran.dg/pr37287-1.f90: New test.
	* gfortran.dg/pr37287-2.F90: New test.

From-SVN: r139826
2008-08-31 13:23:04 +02:00
Jakub Jelinek
08ab58b30f dwarf2out.c (native_encode_initializer): Subtract min_index for non-range array index.
* dwarf2out.c (native_encode_initializer): Subtract min_index for
	non-range array index.  Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR.

From-SVN: r139825
2008-08-31 13:21:28 +02:00
Jan Hubicka
1f494b6d9f sparc.h (BRANCH_COST): Fix macro definition.
* sparc.h (BRANCH_COST): Fix macro definition.
	* avr.c (avr_operand_rtx_cost): Add speed argument.
	(avr_rtx_costs): Update calls of avr_operand_rtx_cost.

From-SVN: r139824
2008-08-31 11:18:41 +00:00
Richard Guenther
f5e85907ff tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched types instead of operands.
2008-08-31  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (verify_types_in_gimple_assign): Dump mismatched
	types instead of operands.  Re-instantiate verifying of
	binary expression operands.

From-SVN: r139823
2008-08-31 11:06:10 +00:00
Daniel Kraft
e157f73660 gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
2008-08-31  Daniel Kraft  <d@domob.eu>

	* gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
	(struct gfc_tbp_generic): New type.
	(struct gfc_typebound_proc): Removed `target' and added union with
	`specific' and `generic' members; new members `overridden',
	`subroutine', `function' and `is_generic'.
	(struct gfc_expr): New members `derived' and `name' in compcall union
	member and changed type of `tbp' to gfc_typebound_proc.
	(gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
	* match.h (gfc_typebound_default_access): New global.
	(gfc_match_generic): New method.
	* decl.c (gfc_match_generic): New method.
	(match_binding_attributes): New argument `generic' and handle it.
	(match_procedure_in_type): Mark matched binding as non-generic.
	* interface.c (gfc_compare_interfaces): Made public.
	(gfc_compare_actual_formal): Ditto.
	(check_interface_1), (compare_parameter): Use new public names.
	(gfc_procedure_use), (gfc_search_interface): Ditto.
	* match.c (match_typebound_call): Set base-symbol referenced.
	* module.c (binding_generic): New global array.
	(current_f2k_derived): New global.
	(mio_typebound_proc): Handle IO of GENERIC bindings.
	(mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
	* parse.c (decode_statement): Handle GENERIC statement.
	(gfc_ascii_statement): Ditto.
	(typebound_default_access), (set_typebound_default_access): Removed.
	(gfc_typebound_default_access): New global.
	(parse_derived_contains): New default-access implementation and handle
	GENERIC statements encountered.
	* primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
	structure and removed check for SUBROUTINE/FUNCTION from here.
	* resolve.c (extract_compcall_passed_object): New method.
	(update_compcall_arglist): Use it.
	(resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
	(resolve_typebound_generic_call): New method.
	(resolve_typebound_call): Check target is a SUBROUTINE and handle calls
	to GENERIC bindings.
	(resolve_compcall): Ditto (check for target being FUNCTION).
	(check_typebound_override): Handle GENERIC bindings.
	(check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
	(resolve_typebound_procedure): Handle GENERIC bindings and set new
	attributes subroutine, function and overridden in gfc_typebound_proc.
	(resolve_fl_derived): Ensure extended type is resolved before the
	extending one is.
	* st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
	* symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.

2008-08-31  Daniel Kraft  <d@domob.eu>

	* gfortran.dg/typebound_generic_1.f03: New test.
	* gfortran.dg/typebound_generic_2.f03: New test.
	* gfortran.dg/typebound_generic_3.f03: New test.

From-SVN: r139822
2008-08-31 12:00:30 +02:00
Jan Hubicka
f40751dd34 fwprop.c (should_replace_address): Add speed attribute.
* fwprop.c (should_replace_address): Add speed attribute.
	(PR_OPTIMIZE_FOR_SPEED): New flag.
	(propagate_rtx_1): Use it.
	(propagate_rtx): Set it.
	(try_fwprop_subst): Update call of rtx_costs.
	(forward_propagate_and_simplify): LIkewise.
	* hooks.c (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* hooks.h (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
	(prepare_cmp_insn): UPdate call of rtx_cost.
	* postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
	(reload_cse_simplify_operands): Update call of rtx_cost.
	(reload_cse_move2add): call of rtx_cost.
	* target.h (struct gcc_target): Update rtx_costs and address_costs.
	* rtlanal.c (rtx_cost): Add speed argument.
	(address_cost): Add speed argument
	(default_address_cost): Likewise.
	(insn_rtx_cost): Likewise.
	* cfgloopanal.c (seq_cost): Add speed argument.
	(target_reg_cost, target_spill_cost): Turn to array.
	(init_set_costs): Update for speed.
	(estimate_reg_pressure_cost): Add speed argument.
	* auto-inc-dec.c (attempt_change): Update call of rtx_cost.
	* dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
	(seq_cost): Add speed argument.
	(computation_cost): Add speed arugment.
	(add_cost, multiply_by_const, get_address_cost): add speed argument.
	(force_expr_to_var_cost): Update for profile info.
	(force_var_cost): Likewise.
	(split_address_cost): Likewise.
	(ptr_difference_cost): Likewise.
	(difference_cost): Likewise.
	(get_computation_cost_at): Likewise.
	(determine_iv_cost): Likewise.
	(ivopts_global_cost_for_size): Likewise.
	(rewrite_use_address): Likewise.
	(tree_ssa_iv_optimize_loop): Initialize speed field.
	* cse.c (optimize_this_for_speed_p): New static var.
	(notreg_cost): Update call of rtx_cost.
	(cse_extended_basic_block): set optimize_this_for_speed_p.
	* ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
	(noce_try_cmove_arith): Likewise.
	(noce_try_sign_mask): LIkewise.
	* expr.c (compress_float_constant): Update rtx_cost calls.
	* tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
	(addr_to_parts): Likewise.
	(create_mem_ref): Likewise.
	* dse.c (find_shift_sequence): Add speed argument.
	(replace_read): Update call.
	* calls.c (precompute_register_parameters): Update call of rtx_cost.
	* expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
	* neg_cost, shift_cost, shiftadd_cost,
	shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
	mul_highpart_cost): Increase dimension.
	(init_expmed): Initialize for both size and speed.
	(expand_shift): Use profile.
	(synth_mult): Use profile.
	(choose_mult_variant): Use profile.
	(expand_mult): Use profile.
	(expand_mult_highpart_optab): Use profile.
	(expand_mult_highpart): Use profile.
	(expand_smod_pow2): Use profile.
	(expand_divmod): Use profile.
	* simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
	* loop-invariant.c (create_new_invariant): Use profile.
	(gain_for_invariant): Add speed parameter.
	(best_gain_for_invariant): Likewise.
	(find_invariants_to_move): Likewise.
	(move_single_loop_invariants): Set it.
	* target-def.h (TARGET_RTX_COSTS): Use hook.
	* rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
	(optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
	* output.h (default_address_cost): Update prototype.
	* combine.c (optimize_this_for_speed_p): New static var.
	(combine_validate_cost): Update call of rtx_cost.
	(combine_instructions): Set optimize_this_for_speed_p.
	(expand_compound_operation): Update call of rtx_cost.
	(make_extraction):Update call of rtx_cost.
	(force_to_mode):Update call of rtx_cost.
	(distribute_and_simplify_rtx):Update call of rtx_cost.
	* cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
	(estimate_reg_pressure_cost): Update prototype.
	* tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
	* basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
	Remove.
	* config/alpha/alpha.c (alpha_rtx_costs): Update.
	(alpha_rtx_costs): Update.
	* config/frv/frv.c (frv_rtx_costs): Update.
	* config/s390/s390.c (s390_rtx_costs): Update.
	* config/m32c/m32c.c (m32c_memory_move_cost): Update.
	(m32c_rtx_costs): Update.
	* config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
	(spu_rtx_costs): Update.
	* config/sparc/sparc.c (sparc_rtx_costs): Update.
	* config/m32r/m32r.c (m32r_rtx_costs): Update.
	* config/i386/i386.c (:ix86_address_cost): Update.
	(ix86_rtx_costs): Update.
	* config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
	* config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
	* config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
	* config/crx/crx.c (crx_address_cost): Update.
	* config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
	* config/stormy16/stormy16.c
	(xstormy16_address_cost, xstormy16_rtx_costs): Update.
	* config/m68hc11/m68hc11.c
	(m68hc11_address_cost, m68hc11_rtx_costs): Update.
	* config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
	* config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update.
	* config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update
	* config/ia64/ia64.c (ia64_rtx_costs): Update.
	* config/m68k/m68k.c (m68k_rtx_costs): Update.
	* config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
	* config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
	* config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
	(mcore_rtx_costs): update.
	* config/score/score3.c (score3_rtx_costs): Update.
	* config/score/score7.c (score7_rtx_costs): Update.
	* config/score/score3.h (score3_rtx_costs):Update.
	* config/score/score7.h (score7_rtx_costs): Update.
	* config/score/score.c (score_rtx_costs): Update.
	* config/arm/arm.c (arm_address_cost): Update.
	(arm_rtx_costs_1): Update.
	(arm_rtx_costs_1): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_xscale_rtx_costs): Update.
	(arm_thumb_address_cost): Update.
	* config/pa/pa.c (hppa_address_cost): Update.
	* config/mips/mips.c (mips_rtx_costs): Update.
	* config/vax/vax.c (vax_address_cost): Update.
	* config/h8300/h8300.c (h8300_shift_costs): Update.
	(h8300_rtx_costs): Update.
	* config/v850/v850.c (TARGET_ADDRESS_COST): Update.
	(v850_rtx_costs): Update.
	* config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
	* config/bfin/bfin.c
	(bfin_address_cost): Update.
	(bfin_rtx_costs): Update.
	* stmt.c (lshift_cheap_p): Update.

From-SVN: r139821
2008-08-31 09:44:25 +00:00
Andrew Pinski
6aebac53f3 #define vector __attribute__((vector_size(16) )) struct struct1 { union { float a[3]...
#define vector __attribute__((vector_size(16) ))
struct struct1  {
  union { float a[3]; }    vmx;
  struct struct2   {
    struct2(const struct2& r) {}
  } w;
} __attribute__((aligned(16)));
struct struct3  {
  vector float vmx;
  operator const struct1& () const{
    return *reinterpret_cast<const struct1*>(this);
  }
};
struct3 func3( struct3 V1);
struct3 func2( void );
void func1( )  {
  struct1 vVec = func2() ;
  func3 ( (struct3&)vVec );
}

From-SVN: r139820
2008-08-30 19:40:13 -07:00
GCC Administrator
617c394a03 Daily bump.
From-SVN: r139817
2008-08-31 00:16:42 +00:00
Jerry DeLisle
0006def8b8 re PR fortran/36895 (Namelist writting to internal files: Control characters wrong?)
2008-08-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/36895
	* gfortran.dg/namelist_53.f90: New test.

From-SVN: r139814
2008-08-31 00:07:58 +00:00
Jerry DeLisle
8c8627c472 re PR fortran/36895 (Namelist writting to internal files: Control characters wrong?)
2008-08-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/36895
	* io/write.c (namelist_write_newline): New function to correctly mark
	next records in both external and internal units.
	(nml_write_obj): Use new function.
	(namelist_write: Use new function.

From-SVN: r139813
2008-08-31 00:04:33 +00:00
Michael Meissner
5779e7133d Change attribute((option(...))) to attribute((target(...))); Do not allocate tree nodes on x86 for builtins until we generate code for the ISA; Delete hot/cold functions changing optimization; Make C++ support target specific functions; Add #pragma GCC {push_options,pop_options,reset_options} instead of #pragma GCC {target,optimize} {push,reset,pop}
From-SVN: r139812
2008-08-30 23:50:40 +00:00
Jason Merrill
0257eee5bd re PR c++/37288 (ICE using auto as function return type or parameter)
PR c++/37288
        * pt.c (dependent_type_p): Don't abort on auto outside of a template.

From-SVN: r139811
2008-08-30 19:12:45 -04:00
Michael Meissner
a4cbe62dd9 Include basic-block.h in dojump.c to declare optimize_insn_for_speed.
From-SVN: r139810
2008-08-30 22:57:54 +00:00
Kaz Kojima
06b322fa45 re PR target/37270 (SH: spill failure for R0_REGS)
PR target/37270
	* config/sh/sh.h (LEGITIMIZE_RELOAD_ADDRESS): Generate
	the reload address with the index register for SFmode
	access with a displacement.

From-SVN: r139809
2008-08-30 22:23:20 +00:00
Joseph Myers
588a58df9a * fi.po: New.
From-SVN: r139807
2008-08-30 23:21:56 +01:00
Gerald Pfeifer
88a2581706 * MAINTAINERS: Consistently use tabs to separate columns.
From-SVN: r139806
2008-08-30 22:18:00 +00:00
Mark Mitchell
62ec9ed657 2.cc: Constrain iterations when testing on a simultor.
* testsuite/25_algorithms/nth_element/2.cc: Constrain iterations
	when testing on a simultor.

From-SVN: r139805
2008-08-30 17:31:22 +00:00
Jan Hubicka
3a4fd356e0 optabs.c (expand_abs_nojump): Update BRANCH_COST call.
* optabs.c (expand_abs_nojump): Update BRANCH_COST call.
	* fold-cost.c (LOGICAL_OP_NON_SHORT_CIRCUIT, fold_truthop): Likewise.
	* dojump.c (do_jump): Likewise.
	* ifcvt.c (MAX_CONDITIONAL_EXECUTE): Likewise.
	(note-if_info): Add BRANCH_COST.
	(noce_try_store_flag_constants, noce_try_addcc, noce_try_store_flag_mask,
	noce_try_cmove_arith, noce_try_cmove_arith, noce_try_cmove_arith,
	noce_find_if_block, find_if_case_1, find_if_case_2): Use compuated
	branch cost.
	* expr.h (BRANCH_COST): Update default.
	* predict.c (predictable_edge_p): New function.
	* expmed.c (expand_smod_pow2, expand_sdiv_pow2, emit_store_flag):
	Update BRANCH_COST call.
	* basic-block.h (predictable_edge_p): Declare.
	* config/alpha/alpha.h (BRANCH_COST): Update.
	* config/frv/frv.h (BRANCH_COST): Update.
	* config/s390/s390.h (BRANCH_COST): Update.
	* config/spu/spu.h (BRANCH_COST): Update.
	* config/sparc/sparc.h (BRANCH_COST): Update.
	* config/m32r/m32r.h (BRANCH_COST): Update.
	* config/i386/i386.h (BRANCH_COST): Update.
	* config/i386/i386.c (ix86_expand_int_movcc): Update use of BRANCH_COST.
	* config/sh/sh.h (BRANCH_COST): Update.
	* config/pdp11/pdp11.h (BRANCH_COST): Update.
	* config/avr/avr.h (BRANCH_COST): Update.
	* config/crx/crx.h (BRANCH_COST): Update.
	* config/xtensa/xtensa.h (BRANCH_COST): Update.
	* config/stormy16/stormy16.h (BRANCH_COST): Update.
	* config/m68hc11/m68hc11.h (BRANCH_COST): Update.
	* config/iq2000/iq2000.h (BRANCH_COST): Update.
	* config/ia64/ia64.h (BRANCH_COST): Update.
	* config/rs6000/rs6000.h (BRANCH_COST): Update.
	* config/arc/arc.h (BRANCH_COST): Update.
	* config/score/score.h (BRANCH_COST): Update.
	* config/arm/arm.h (BRANCH_COST): Update.
	* config/pa/pa.h (BRANCH_COST): Update.
	* config/mips/mips.h (BRANCH_COST): Update.
	* config/vax/vax.h (BRANCH_COST): Update.
	* config/h8300/h8300.h (BRANCH_COST): Update.
	* params.def (PARAM_PREDICTABLE_BRANCH_OUTCOME): New.
	* doc/invoke.texi (predictable-branch-cost-outcome): Document.
	* doc/tm.texi (BRANCH_COST): Update.

From-SVN: r139804
2008-08-30 14:19:01 +00:00
Samuel Tardieu
b1bdaf4061 re PR target/37283 (Cannot build crtbegin.o for ARM)
gcc/
	PR target/37283
	* config/arm/arm.c (arm_optimization_options): Set
	flag_section_anchors to 2 instead of 1 to distinguish it from
	-fsection-anchors given explicitely on the command line.

From-SVN: r139803
2008-08-30 13:44:22 +00:00
Richard Sandiford
a2a9208308 recog.c (split_insn): Consider attaching a REG_EQUAL note to the final insn of a split.
gcc/
	* recog.c (split_insn): Consider attaching a REG_EQUAL note to the
	final insn of a split.

From-SVN: r139802
2008-08-30 13:12:16 +00:00
Jan Hubicka
8bcf15f6ea parse.c (parse_interface): Silence uninitialized var warning.
* parse.c (parse_interface): Silence uninitialized var warning.

	* postreload-gcse.c (gate_handle_gcse2): Disable for functions
	optimized for speed.
	* final.c (compute_alignments): Use optimize_bb_for_size_p.
	* tree-call-cdce.c (gate_call_cdce): Use optimize_function_for_speed_p.
	* opts.c (flag_predictive_commoning_set, flag_unswitch_loops_set,
	flag_gcse_after_reload_set): New static vars.
	(common_handle_option): Enable those flags for profile-use.
	(decode_options): Remove optimize_size flags that are handled
	on higher granuality.
	* tree-vectorizer.c (vectorize_loops): Use
	optimize_loop_nest_for_speed_p.
	* tree-ssa-pre.c (do_pre): Use optimize_function_for_speed_p.
	* tree-predcom.c (tree_predictive_commoning): Use
	optimize_loop_for_speed_p.
	* varasm.c (assemble_start_function): Use optimize_function_for_speed_p.
	* bb-reorder.c (rest_of_handle_reorder_blocks): Likewise.
	* predict.c (optimize_loop_for_speed_p): Fix walk.

From-SVN: r139801
2008-08-30 10:38:55 +00:00
Jan Hubicka
76718c16d0 ipa-inline.c (cgraph_estimate_growth): Discover self recursive functions.
* ipa-inline.c (cgraph_estimate_growth): Discover self recursive
	functions.
	(cgraph_decide_inlining_of_small_function): Use edge->count to detect
	profile presence locally.

From-SVN: r139800
2008-08-30 09:46:19 +00:00
Thomas Quinot
21bacb7e15 Make-lang.in: Allow s-oscons.{o,ali} to be built even without a separate libada directory.
2008-08-30  Thomas Quinot  <quinot@adacore.com>

    gcc/ada/
	* gcc-interface/Make-lang.in: Allow s-oscons.{o,ali} to
	be built even without a separate libada directory.

From-SVN: r139799
2008-08-30 08:51:53 +00:00
Jason Merrill
86a09a9e99 Implement C++0x 'auto' semantics.
* decl.c (start_decl_1): Don't complain about auto being incomplete.
        (cp_finish_decl): Deduce auto.
        * init.c (build_new): Handle 'new auto'.
        * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
        message for auto than for normal template type parms.
        * pt.c (type_dependent_expression_p): Handle { }.
        (make_auto): New function.
        (listify_autos): New function.
        (do_auto_deduction): New function.
        (is_auto): New function.
        (type_uses_auto): New function.
        * cp-tree.h: Declare them.
        * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
        treat auto as a declspec.
        (cp_parser_simple_type_specifier): It's a type-specifier.

From-SVN: r139798
2008-08-30 01:14:54 -04:00
GCC Administrator
b3914aa38f Daily bump.
From-SVN: r139795
2008-08-30 00:16:33 +00:00
Joseph Myers
109e637b7b re PR bootstrap/37086 (GCC 3.4 miscompiles trunk (for cross compiling))
PR bootstrap/37086
	* tree-vrp.c (find_switch_asserts): Make idx volatile for GCC
	versions before 4.0.

From-SVN: r139792
2008-08-30 00:30:18 +01:00
Mark Mitchell
3852d2bef6 mangle.c (write_type): Add target-specific manglings for non-fundamental types to the substitution table.
* mangle.c (write_type): Add target-specific manglings for
	non-fundamental types to the substitution table.

	* g++.dg/abi/mangle-neon.C: Add substitution test.

From-SVN: r139791
2008-08-29 22:19:24 +00:00
Jan Hubicka
e711970537 tree-inline.c (insert_init_stmt): Insert sequence even when not in SSA form.
* tree-inline.c (insert_init_stmt): Insert sequence even when
	not in SSA form.

From-SVN: r139790
2008-08-29 21:58:54 +00:00
Jeff Law
6528281d6b mn10300.c (mn10300_secondary_reload_class): We need secondary reloads for AM33-2 if IN is a pseudo with an equivalent...
* mn10300.c (mn10300_secondary_reload_class): We need secondary
	reloads for AM33-2 if IN is a pseudo with an equivalent memory
	location and class is an FP register.

From-SVN: r139789
2008-08-29 15:35:55 -06:00
Jan Hubicka
041f300d6d see.c (see_merge_one_def_extension): Silence used uninitialized warning.
* see.c (see_merge_one_def_extension): Silence used uninitialized warning.
	* matrix-reorg.c (check_allocation_function): Likewise.
	* config/i386/driver-i386.c (detect_caches_amd): Likewise.
	
	* parse.c (parse_interface): Likewise.

From-SVN: r139788
2008-08-29 21:32:41 +00:00
Jakub Jelinek
bf09f0e0e9 re PR middle-end/37261 (Spurious (?) "integer overflow in expression" warnings)
PR c/37261
	* fold-const.c (fold_binary): In (X | C1) & C2 canonicalization
	compute new & and | in type rather than TREE_TYPE (arg0).

	* gcc.dg/pr37261.c: New test.

From-SVN: r139784
2008-08-29 20:59:13 +02:00
Jakub Jelinek
98c0cbd30a dwarf2out.c (fortran_common): Update comment.
* dwarf2out.c (fortran_common): Update comment.
	(gen_variable_die): Swap com_die and var_die variables in Fortran
	COMMON block handling code.

From-SVN: r139783
2008-08-29 20:54:53 +02:00
Jakub Jelinek
de870512b6 dwarf2out.c (descr_info_loc): Handle VAR_DECL.
* dwarf2out.c (descr_info_loc): Handle VAR_DECL.

	* trans.h (struct lang_type): Add span.
	(GFC_TYPE_ARRAY_SPAN): Define.
	* trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
	copy TREE_STATIC from decl to span instead of setting it
	unconditionally, set DECL_ARTIFICIAL, fix type of initializer
	and set GFC_TYPE_ARRAY_SPAN on decl's type.
	* trans-types.c (gfc_get_array_descr_info): If
	GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.

From-SVN: r139782
2008-08-29 20:53:33 +02:00
Jakub Jelinek
bd11e37d61 dwarf2out.c (gen_const_die): New function.
* dwarf2out.c (gen_const_die): New function.
	(size_of_die, value_format, output_die): Output larger
	dw_val_class_vec using DW_FORM_block2 or DW_FORM_block4.
	(native_encode_initializer): New function.
	(tree_add_const_value_attribute): Call it.
	(gen_decl_die, dwarf2out_decl): Handle CONST_DECLs if is_fortran ().

	* trans-decl.c (check_constant_initializer,
	gfc_emit_parameter_debug_info): New functions.
	(gfc_generate_module_vars, gfc_generate_function_code): Emit
	PARAMETERs and unreferenced variables with initializers into
	debug info.

From-SVN: r139781
2008-08-29 20:52:22 +02:00
Jakub Jelinek
9268ba9ad6 gfortran.h (gfc_use_list): Add where field.
* gfortran.h (gfc_use_list): Add where field.
	* module.c (use_locus): New static variable.
	(gfc_match_use): Set it.
	(gfc_use_module): Copy it to gfc_use_list's where field.
	* trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
	(gfc_trans_use_stmts): Set backend locus before calling the debug
	hook.  Allow non-VAR_DECLs to be created even for non-external
	module.  Don't emit anything so far for renames from different
	modules.

From-SVN: r139780
2008-08-29 20:50:30 +02:00
Jakub Jelinek
f51d8f1af2 dwarf2out.c (gen_formal_parameter_die, [...]): For DECL_BY_REFERENCE decls don't pass TREE_READONLY and TREE_THIS_VOLATILE to...
* dwarf2out.c (gen_formal_parameter_die, gen_variable_die): For
	DECL_BY_REFERENCE decls don't pass TREE_READONLY and
	TREE_THIS_VOLATILE to add_type_attribute.

From-SVN: r139779
2008-08-29 20:49:36 +02:00
Jakub Jelinek
b6b904bd61 dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG types.
* dwarf2out.c (add_subscript_info): Stop on Fortran TYPE_STRING_FLAG
	types.
	(gen_array_type_die): Emit DW_TAG_string_type for Fortran character
	types.

From-SVN: r139778
2008-08-29 20:48:30 +02:00
Jakub Jelinek
714495cdcf re PR fortran/24790 (arguments are displayed as reference or pointer to normal type in GDB)
PR fortran/24790
	* trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
	PARM_DECLs with pointer or reference type.

From-SVN: r139777
2008-08-29 20:47:19 +02:00
Jakub Jelinek
2599ed926b dwarf2out.c (loc_by_reference): New function.
* dwarf2out.c (loc_by_reference): New function.
	(add_location_or_const_value_attribute): Use it.

From-SVN: r139776
2008-08-29 20:46:32 +02:00
Jakub Jelinek
04e74e0210 re PR fortran/23057 (Fortran common blocks are not described with DW_TAG_common_block)
PR fortran/23057
	* dwarf2out.c (gen_variable_die): Represent Fortran COMMON vars
	as DW_TAG_variable children of DW_TAG_common_block rather than
	DW_TAG_member children.  Put DW_AT_external to individual
	DW_TAG_variable DIEs, not to DW_TAG_common_block.

	* gfortran.dg/debug/pr35154-dwarf2.f: Adjust for replacement
	of DW_TAG_member with DW_TAG_variable.

From-SVN: r139775
2008-08-29 20:45:25 +02:00
Jakub Jelinek
25c29c56e2 trans-decl.c (gfc_build_qualified_array): Build non-flat array type for debug info purposes.
* trans-decl.c (gfc_build_qualified_array): Build non-flat
	array type for debug info purposes.

	* dwarf2out.c (add_bound_info): If lookup_decl_die failed, try
	loc_descriptor_from_tree_1.

From-SVN: r139774
2008-08-29 20:43:57 +02:00
Jakub Jelinek
a64f5186dd re PR fortran/29635 (debug info of modules)
PR fortran/29635
	PR fortran/23057
	* debug.h (struct gcc_debug_hooks): Add NAME and CHILD
	arguments to imported_module_or_decl.
	(debug_nothing_tree_tree): Removed.
	(debug_nothing_tree_tree_tree_bool): New prototype.
	* debug.c (do_nothing_debug_hooks): Adjust.
	(debug_nothing_tree_tree): Removed.
	(debug_nothing_tree_tree_tree_bool): New function.
	* dwarf2out.c (is_symbol_die): Handle DW_TAG_module.
	(gen_variable_die): Put all common vars for the
	same COMMON block under one DW_TAG_common_block.
	(declare_in_namespace): Return new context_die, for Fortran
	return the module DIE instead of adding extra declarations into
	the namespace.
	(gen_type_die_with_usage): Adjust declare_in_namespace caller.
	(gen_namespace_die): If is_fortran (), generate DW_TAG_module
	instead of DW_TAG_namespace.  If DECL_EXTERNAL is set, add
	DW_AT_declaration.
	(dwarf2out_global_decl): Don't skip Fortran global vars.
	(gen_decl_die): Likewise.  Adjust declare_in_namespace callers.
	(dwarf2out_imported_module_or_decl): Add NAME and CHILD arguments.
	If NAME is non-NULL, add DW_AT_name.  If CHILD is non-NULL, put
	DW_TAG_imported_declaration as child of previous
	DW_TAG_imported_module.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Adjust.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.

	* name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
	Adjust debug_hooks->imported_module_or_decl callers.

	* f95-lang.c (gfc_init_ts): New function.
	(LANG_HOOKS_INIT_TS): Define.
	* gfortran.h (gfc_use_rename): New type, moved from module.c.
	(gfc_get_use_rename): New macro, moved from module.c.
	(gfc_use_list): New type.
	(gfc_get_use_list): New macro.
	(gfc_namespace): Add use_stmts field.
	(gfc_free_use_stmts): New prototype.
	* Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
	* module.c (gfc_use_rename, gfc_get_use_rename): Moved to
	gfortran.h.
	(gfc_use_module): Chain the USE statement info to
	ns->use_stmts.
	(gfc_free_use_stmts): New function.
	* symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
	* trans.h (struct module_htab_entry): New type.
	(gfc_find_module, gfc_module_add_decl): New functions.
	* trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
	the module, adjust DECL_CONTEXTs of module procedures and
	call gfc_module_add_decl for them.
	* trans-common.c (build_common_decl): Set DECL_IGNORED_P
	on the common variable.
	(create_common): Set DECL_IGNORED_P for use associated vars.
	* trans-decl.c: Include debug.h.
	(gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
	modules.
	(build_function_decl): Allow current_function_decl's context
	to be a NAMESPACE_DECL.
	(module_htab, cur_module): New variables.
	(module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
	module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
	functions.
	(gfc_create_module_variable): Adjust DECL_CONTEXTs of module
	variables and types and call gfc_module_add_decl for them.
	(gfc_generate_module_vars): Temporarily set cur_module.
	(gfc_trans_use_stmts): New function.
	(gfc_generate_function_code): Call it.
	(gfc_generate_block_data): Set DECL_IGNORED_P on decl.
	* trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
	and TYPE_CONTEXT of module derived types.

From-SVN: r139773
2008-08-29 20:41:19 +02:00
Jan Hubicka
ca30a5396a cgraph.c (cgraph_remove_node): Do not remove nested nodes.
* cgraph.c (cgraph_remove_node): Do not remove nested nodes.

	* cgraph.h (cgraph_maybe_hot_edge_p): Declare.
	* ipa-cp.c (n_cloning_candidates): New static variable.
	(ipcp_print_profile_data, ipcp_function_scale_print): Forward declare.
	(ipcp_print_all_lattices): Improve debug output.
	(ipcp_cloning_candidate_p): New function.
	(ipcp_initialize_node_lattices): Use it.
	(ipcp_init_stage): Do only analyzis here; prettier debug output.
	(ipcp_propagate_stage): Prettier debug output.
	(ipcp_iterate_stage): Initialize latices here; prettier debug output.
	(ipcp_print_all_structures): Remove.
	(ipcp_need_redirect_p): Test !n_cloning_candidates.
	(ipcp_insert_stage): Prettier debug output; call
	cgraph_remove_unreachable_nodes before propagating.
	(pass_ipa_cp): Schedule function removal pass.
	* ipa-inline.c (inline_indirect_intraprocedural_analysis): Better
	debug output.
	(cgraph_maybe_hot_edge_p): Move to ...
	* predict.c (cgraph_maybe_hot_edge_p) ... here.
	* opts.c (flag_ipa_cp_set, flag_ipa_cp_clone_set): New.
	(common_handle_option): Set them; enable ipa-cp when profiling.
	* ipa-prop.c (ipa_print_node_jump_functions): Prettier output.
	(ipa_print_all_jump_functions): Likewise.
	(ipa_print_all_tree_maps, ipa_print_node_param_flags): Remove.
	(ipa_print_node_params, ipa_print_all_params): New.
	* ipa-prop.h (ipa_print_all_tree_maps, ipa_print_node_param_flags,
	ipa_print_all_param_flags): Remove.
	(ipa_print_node_params, ipa_print_all_params): New.

From-SVN: r139772
2008-08-29 16:41:35 +00:00
Bob Wilson
a1f626ad3b xtensa.c (xtensa_secondary_reload_class): Revert change from 2008-04-03.
* config/xtensa/xtensa.c (xtensa_secondary_reload_class): Revert
	change from 2008-04-03.
	* config/xtensa/xtensa.h (IRA_COVER_CLASSES): Define.

From-SVN: r139771
2008-08-29 16:39:59 +00:00
Vladimir Makarov
d7f2c74e0c re PR rtl-optimization/37251 (ICE with ira: delete_allocno_from_bucket)
2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-opt/37251

	* ira-color.c (push_allocnos_to_stack): Truncate
	removed_splay_allocno_vec.

From-SVN: r139770
2008-08-29 16:18:11 +00:00
Vladimir Makarov
03dd10d874 re PR middle-end/37243 (IRA causes wrong code generation)
2008-08-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-opt/37243
	* ira-color (ira_fast_allocation): Don't assign hard registers to
	global allocnos.

From-SVN: r139769
2008-08-29 16:16:45 +00:00
Jan Hubicka
c16eb95fb6 re PR middle-end/37278 (Revision 139760 causes many failures)
PR middle-end/37278
	* predict.c (optimize_loop_nest_for_speed_p): Do not ICE
	for cold internal loops.

From-SVN: r139768
2008-08-29 14:57:20 +00:00
Laurent GUERBY
f62b28a93b Makefile.in (FLAGS_TO_PASS): renamed to LIBADA_FLAGS_TO_PASS to avoid conflicts.
2008-08-29  Laurent Guerby  <laurent@guerby.net>
	
	* Makefile.in (FLAGS_TO_PASS): renamed to LIBADA_FLAGS_TO_PASS to
	avoid conflicts. Factor more flags to pass.
	(libsubdir): New variable.
	(install-gnatlib): New target.

From-SVN: r139767
2008-08-29 13:44:25 +00:00
Jan Hubicka
b1d78dfca1 ipa-1.c: Fix template for better debug output.
* gcc.dg/ipa/ipa-1.c: Fix template for better debug output.
	* gcc.dg/ipa/ipa-2.c: Fix template for better debug output.
	* gcc.dg/ipa/ipa-3.c: Fix template for better debug output.
	* gcc.dg/ipa/ipa-4.c: Fix template for better debug output.
	* gcc.dg/ipa/ipa-5.c: Fix template for better debug output.
	* gcc.dg/ipa/ipa-7.c: Fix template for better debug output.

From-SVN: r139766
2008-08-29 12:55:54 +00:00
Richard Guenther
13c6bff447 tree-ssa-structalias.c (create_variable_info_for): Do not create fields for heap vars or vars with a noalias state.
2008-08-29  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-structalias.c (create_variable_info_for): Do not
	create fields for heap vars or vars with a noalias state.
	For NO_ALIAS_ANYTHING variables add a self-constraint, not one
	from ESCAPED.

        * gfortran.fortran-torture/compile/20080806-1.f90: New testcase.

From-SVN: r139765
2008-08-29 11:47:01 +00:00