Commit Graph

376 Commits

Author SHA1 Message Date
Jan Hubicka cff7525fb0 re PR debug/39267 (gdb testsuite regressions)
PR debug/39267
	* tree.h (TREE_PROTECTED): Fix comment.
	(BLOCK_HANDLER_BLOCK): Remove.
	(struct tree_block): Remove handler_block add body_block.
	(inlined_function_outer_scope_p): New.
	(is_body_block): Remove.
	* dbxout.c (dbxout_block): Remove BLOCK_HANDLER_BLOCK.
	* dwarf2out.c (is_inlined_entry_point): Remove.
	(add_high_low_attributes): Use inlined_function_outer_scope_p.
	(gen_block_die): Use is_inlined_entry_point check; remove body block code.
	* langhooks.h (struct lang_hooks): Remove no_bodu_blocks.
	* gimplify.c (gimplify_expr): Gimplify body blocks.
	* tree-ssa-live.c (remove_unused_scope_block_p): Allow removing wrapper block
	with multiple subblocks.
	(dump_scope_block): Prettier output; dump more flags and info.
	(dump_scope_blocks): New.
	(remove_unused_locals): Use dump_scope_blocks.
	* tree-flow.h (dump_scope_blocks): Declare.
	* tree-cfg.c (execute_build_cfg): Dump scope blocks.
	* stmt.c (is_body_block): Remove.
	* tree-inline.c (remap_block): Copy BODY_BLOCK info.
	* langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): Remove.

From-SVN: r144474
2009-02-27 19:49:42 +00:00
Jan Hubicka 61e043223d re PR tree-optimization/37709 (inlining causes explosion in debug info)
PR tree-optimization/37709                                              
	* tree.c (block_ultimate_origin): Move here from dwarf2out.             
	* tree.h (block_ultimate_origin): Declare.                              
	* dwarf2out.c (block_ultimate_origin): Move to tree.c                   
	* tree-ssa-live.c (remove_unused_scope_block_p):
	Eliminate blocks containig no instructions nor live variables nor
	nested blocks.
	(dump_scope_block): New function.
	(remove_unused_locals): Enable removal of dead blocks by default;
	enable dumping at TDF_DETAILS.

From-SVN: r144381
2009-02-23 13:10:53 +00:00
Eric Botcazou 116612b994 * dbxout.c (dbxout_parms): Fetch the inner REG inside a PARALLEL.
From-SVN: r140662
2008-09-25 11:52:47 +00: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
Douglas Gregor adf2edec3c c-common.c (do_switch_warnings): Look through the CONST_DECLs in the enumerators of an ENUMERAL_TYPE.
2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>

	* c-common.c (do_switch_warnings): Look through the CONST_DECLs in
	the enumerators of an ENUMERAL_TYPE.
	* dbxout.c (dbxout_type): Ditto.

2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>

	* typeck.c (type_after_usual_arithmetic_conversions): Don't do the
	usual arithmetic conversions on scoped enumeration types.
	(common_type): Ditto.
	(default_conversion): Don't perform integral promotions on scoped
	enumeration types. 
	(build_array_ref): Scoped enumeration types can't be used as
	subscripts.
	* decl.c (start_enum): If building a C++0x scoped enumeration,
	enter its scope. If provided with an underlying type, check that
	underlying type and set up the enumeration type accordingly.
	(finish_enum): Only compute an underlying type if the underlying
	type isn't already fixed, and only convert the enumerator values
	now if we've just computed the underlying type. Finish the scope
	of C++0x scoped enumerations.
	(build_enumerator): For enumerations with a fixed underlying type,
	check the enumerator values when the enumerator is defined.
	(lookup_enumerator): New.
	* call.c (standard_conversion): Don't allow assignment from
	integers to scoped enumeration types, even with -fpermissive.
	Don't convert from scoped enumerations to bool or any arithmetic
	types.
	(build_conditional_expr): Don't per the usual arithmetic
	conversions for scoped enumeration types.
	(convert_like_real): Check complain to see if we should
	produce warnings.
	* error.c (class_key_or_enum_as_string): Print scoped enums.
	* cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
	TYPE_LANG_FLAG_5.
	(INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
	(SCOPED_ENUM_P): New.
	(UNSCOPED_ENUM_P): New.
	(SET_SCOPED_ENUM_P): New.
	(ENUM_UNDERLYING_TYPE): New.
	* pt.c (lookup_template_class): Update the instantiation of enum
	types to deal with C++0x scoped enumerations and underlying
	types.
	* name-lookup.c (begin_scope): Deal with scoped enumeration
	scopes.
	(lookup_qualified_name): Deal with lookup into enumeration types.
	* name-lookup.h (enum scope_kind): Add sk_scoped_enum.
	* parser.c (cp_parser_class_or_namespace_name): Rename to...
	(cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
	parse a type-name that can be an enumeration type.
	(cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
	(cp_parser_elaborated_type_specifier): Parse the
	optional `struct' or `class' following enum (in C++0x).
	(cp_parser_enum_specifier): Parse C++0x scoped enumerations and
	enum-base clauses.

2008-08-26  Douglas Gregor  <doug.gregor@gmail.com>

	* g++.dg/cpp0x/scoped_enum_examples.C: New.
	* g++.dg/cpp0x/scoped_enum.C: New.
	* g++.dg/cpp0x/scoped_enum_98.C: New.
	* g++.dg/cpp0x/enum_base_warn.C: New.
	* g++.dg/cpp0x/enum_base.C: New.

From-SVN: r139611
2008-08-26 22:33:10 +00:00
Kaveh R. Ghazi f883e0a7dc alias.c (record_alias_subset, [...]): Fix -Wc++-compat and/or -Wcast-qual warnings.
* alias.c (record_alias_subset, init_alias_analysis): Fix
	-Wc++-compat and/or -Wcast-qual warnings.
	* attribs.c (lookup_attribute_spec): Likewise.
	* bb-reorder.c (find_traces, rotate_loop, find_traces_1_round,
	copy_bb, connect_traces,
	find_rarely_executed_basic_blocks_and_cr): Likewise.
	* bt-load.c (find_btr_def_group, add_btr_def, new_btr_user,
	note_btr_set, migrate_btr_defs): Likewise.
	* builtins.c (result_vector, expand_builtin_memcpy,
	expand_builtin_mempcpy_args, expand_builtin_strncpy,
	builtin_memset_read_str, expand_builtin_printf,
	fold_builtin_memchr, rewrite_call_expr, fold_builtin_printf):
	Likewise.
	* caller-save.c (mark_set_regs): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cgraph.c (cgraph_edge): Likewise.
	* combine.c (likely_spilled_retval_1): Likewise.
	* coverage.c (htab_counts_entry_hash, htab_counts_entry_eq,
	htab_counts_entry_del, get_coverage_counts): Likewise.
	* cselib.c (new_elt_list, new_elt_loc_list, entry_and_rtx_equal_p,
	new_cselib_val): Likewise.
	* dbgcnt.c (dbg_cnt_process_opt): Likewise.
	* dbxout.c (dbxout_init, dbxout_type, output_used_types_helper):
	Likewise.
	* df-core.c (df_compact_blocks): Likewise.
	* df-problems.c (df_grow_bb_info, df_chain_create): Likewise.
	* df-scan.c (df_grow_reg_info, df_ref_create,
	df_insn_create_insn_record, df_insn_rescan, df_notes_rescan,
	df_ref_compare, df_ref_create_structure, df_bb_refs_record,
	df_record_entry_block_defs, df_record_exit_block_uses,
	df_bb_verify): Likewise.
	* df.h (DF_REF_EXTRACT_WIDTH_CONST, DF_REF_EXTRACT_OFFSET_CONST,
	DF_REF_EXTRACT_MODE_CONST): New.
	* dominance.c (get_immediate_dominator, get_dominated_by,
	nearest_common_dominator, root_of_dom_tree,
	iterate_fix_dominators, first_dom_son, next_dom_son): Fix
	-Wc++-compat and/or -Wcast-qual warnings.
	* dse.c (clear_alias_set_lookup, get_group_info, gen_rtx_MEM,
	record_store, replace_read, check_mem_read_rtx, scan_insn,
	dse_step1, dse_record_singleton_alias_set): Likewise.
	* dwarf2asm.c (dw2_force_const_mem): Likewise.

From-SVN: r137137
2008-06-26 00:28:15 +00:00
Ralf Wildenhues fa10beec52 cgraph.c: Fix typos in comments.
gcc/
	* cgraph.c: Fix typos in comments.
	(cgraph_availability_names): Fix string typo.
	* fold-const.c: Fix typos in comments.
	(fold_binary): Fix typo in warning.
	* genautomata.c: Fix typos in comments.
	(check_presence_pattern_sets): Fix typo in local variable.
	(output_description): Fix typo in output.
	* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
	* hwint.h: Likewise.
	* matrix-reorg.c (check_allocation_function): Likewise.
	* omega.c (smooth_weird_equations): Likewise.
	* auto-inc-dec.c: Fix typos in comments.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* coverage.c: Likewise.
	* dbxout.c: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* gimplify.c: Likewise.
	* gthr-lynx.h: Likewise.
	* haifa-sched.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa.c: Likewise.
	* loop-doloop.c: Likewise.
	* mips-tfile.c: Likewise.
	* mkmap-flat.awk: Likewise.
	* mkmap-symver.awk: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* pretty-print.h: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* ra-conflict.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* regclass.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* rtl-error.c: Likewise.
	* rtlanal.c: Likewise.
	* scan.h: Likewise.
	* sched-rgn.c: Likewise.
	* see.c: Likewise.
	* stmt.c: Likewise.
	* target.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vn.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* unwind-dw2-fde.c: Likewise.
	* unwind.inc: Likewise.
	* value-prof.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r136425
2008-06-06 05:42:00 +00:00
Jan Hubicka 38173d38cc function.h (incomming_args): Break out of struct function.
* function.h (incomming_args): Break out of struct function.
	(function_subsections): Break out of struct function.
	(rtl_data): Add args, subsections fields. Break out outgoing_args_size,
	return_rtx and hard_reg_initial_vals from struct function.
	Kill inl_max_label_num.
	(current_function_pops_args, current_function_args_info,
	current_function_args_size, current_function_args_size,
	current_function_pretend_args_size,
	current_function_outgoing_args_size,
	current_function_internal_arg_pointer, current_function_return_rtx):
	Kill compatibility accestor macros.
	* builtins.c (expand_builtin_apply_args_1): Update.
	(expand_builtin_next_arg): Update.
	* df-scan.c (df_get_call_refs): Update.
	* dbxout.c (dbxout_function_end): Update.
	* dwarf2out.c (dwarf2out_switch_text_section): Update.
	(output_line_info): Update.
	(secname_for_decl): Update.
	(dwarf2out_var_location): Update.
	* function.c (free_after_compilation): Update.
	(assign_parm_find_stack_rtl): Update.
	(assign_parms): Update.
	(expand_dummy_function_end): Update.
	(expand_function_end): Update.
	* calls.c (mem_overlaps_already_clobbered_arg_p): Update.
	(expand_call): Update.
	(emit_library_call_value_1): Update.
	(store_one_arg): Update.
	* varasm.c (initialize_cold_section_name): Update.
	(unlikely_text_section): Update.
	(unlikely_text_section_p): Update.
	(assemble_start_function): Update.
	(assemble_end_function): Update.
	(default_section_type_flags): Update.
	(switch_to_section): Update.
	* integrate.c (set_decl_abstract_flags): Update.
	(get_hard_reg_initial_val): Update.
	(has_hard_reg_initial_val): Update.
	(allocate_initial_values): Update.
	* resource.c (init_resource_info): Update.
	* config/alpha/alpha.c (NUM_ARGS): Update.
	(direct_return): Update.
	(alpha_va_start): Update.
	(alpha_sa_size): Update.
	(alpha_initial_elimination_offset): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_expand_epilogue): Update.
	(unicosmk_initial_elimination_offset):
	* config/alpha/alpha.md (call expander): Update.
	* config/s390/s390.c (s390_register_info): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_initial_elimination_offset): Update.
	(s390_build_builtin_va_list): Update.
	(s390_va_start): Update.
	* config/spu/spu.c (direct_return): Update.
	(spu_expand_prologue): Update.
	(spu_initial_elimination_offset): Update.
	(spu_build_builtin_va_list): Update.
	(spu_va_start): Update.
	* config/sparc/sparc.c (sparc_init_modes): Update.
	(sparc_compute_frame_size): Update.
	(function_value): Update.
	* config/m32r/m32r.c (m32r_compute_frame_size): Update.
	* config/i386/i386.md (return expander): Update.
	* config/i386/i386.c (ix86_va_start): Update.
	(ix86_can_use_return_insn_p): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh_expand_prologue): Update.
	(sh_builtin_saveregs): Update.
	(sh_va_start): Update.
	(initial_elimination_offset): Update.
	(sh_allocate_initial_value): Update.
	(sh_function_ok_for_sibcall): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.md (return expander): Update.
	* config/avr/avr.c (frame_pointer_required_p): UPdate.
	* config/crx/crx.c (crx_compute_frame): UPdate.
	(crx_initial_elimination_offset): UPdate.
	* config/xtensa/xtensa.c (compute_frame_size): Update
	(xtensa_builtin_saveregs): Update.
	(xtensa_va_start): Update.
	(order_regs_for_local_alloc): Update.
	* config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update.
	(xstormy16_expand_builtin_va_start): Update.
	* config/fr30/fr30.c (fr30_compute_frame_size): Update.
	* config/m68hc11/m68hc11.md (return expanders): Update.
	* config/m68hc11/m68hc11.c (expand_prologue): Update.
	(expand_epilogue): Update.
	* config/cris/cris.c (cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	* config/iq2000/iq2000.c (iq2000_va_start): Update.
	(compute_frame_size): Update.
	* config/mt/mt.c (mt_compute_frame_size): Update.
	* config/mn10300/mn10300.c (expand_prologue): Update.
	(expand_epilogue): Update.
	(initial_offset): Update.
	(mn10300_builtin_saveregs):
	* config/mn10300/mn10300.md (return expander): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_expand_prologue): Update.
	* config/m68k/m68k.md (return expander): Update.
	* config/rs6000/rs6000.c (rs6000_va_start): Update.
	(rs6000_stack_info): Update.
	* config/mcore/mcore.c (layout_mcore_frame): Update.
	(mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_compute_frame_size): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(thumb_find_work_register): Update.
	(arm_compute_save_reg_mask): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_size_return_regs): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_exit): Update.
	(thumb_unexpanded_epilogue): Update.
	(thumb1_output_function_prologue): Update.
	* config/pa/pa.md (return expander): Update.
	* config/pa/pa.c (compute_frame_size): Update.
	(hppa_builtin_saveregs): Update.
	* config/mips/mips.c (mips_va_start): Update.
	(mips16_build_function_stub): Update.
	(mips_compute_frame_info): Update.
	(mips_restore_gp): Update.
	(mips_output_function_prologue): Update.
	(mips_expand_prologue): Update.
	* config/v850/v850.c (compute_frame_size): Update.
	(expand_prologue): * config/mmix/mmix.c (along): update.
	(mmix_initial_elimination_offset): update.
	(mmix_reorg): update.
	(mmix_use_simple_return): update.
	(mmix_expand_prologue): update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (bfin_initial_elimination_offset): Update.
	(emit_link_insn): Update.

From-SVN: r134087
2008-04-08 08:59:34 +00:00
Francois-Xavier Coudert 3135ce84cc gcc.c (default_compilers): Sync Fortran extensions list with that in fortran/lang-specs.h.
gcc/
	* gcc.c (default_compilers): Sync Fortran extensions list with
	that in fortran/lang-specs.h.
	* doc/invoke.texi: Likewise.
	* dbxout.c (get_lang_number): Use "GNU Fortran" in "GNU F95".
	* dwarf2out.c (gen_compile_unit_die): Likewise.

gcc/fortran/
	* f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".

From-SVN: r133960
2008-04-06 12:36:58 +00:00
George Helffrich 7151ffbe56 trans-common.c (create_common): Add decl to function chain to preserve identifier scope in debug output.
* fortran/trans-common.c (create_common):  Add decl to function
	chain to preserve identifier scope in debug output.

	* dbxout.c: Emit .stabs debug info for Fortran COMMON block
	variables as base symbol name + offset using N_BCOMM/N_ECOMM.
	(is_fortran, dbxout_common_name, dbxout_common_check): New functions.
	(dbxout_symbol_location): Transform N_LCSYM to N_GSYM for storage
	in common.
	(dbxout_syms): Check for COMMON-based symbol and wrap in
	N_BCOMM/N_ECOMM stab bracket, including as many symbols as possible
	in bracket for efficiency.

	* dwarf2out.c: Emit DWARF debug info for Fortran COMMON block
	using DW_TAG_common_block + member offset.
	(add_pubname_string): New function.
	(dw_expand_expr): New function to find block name and offset for
	COMMON var.
	(common_check): New function to check whether symbol in Fortran COMMON.
	(gen_variable_die): If COMMON, use DW_TAG_common_block.

	* testsuite/gcc.dg/debug/pr35154.c:  New test to check that non-Fortran
	use of common is unchanged.

	* testsuite/lib/gfortran-dg.exp:  New harness to compile Fortran progs
	with all combinations of debug options available on target.
	* testsuite/gfortran.dg/debug/debug.exp:  Ditto.
	* testsuite/gfortran.dg/debug/trivial.f:  Ditto.
	* testsuite/gfortran.dg/debug/pr35154-stabs.f:  New test case for
	.stabs functionality.
	* testsuite/gfortran.dg/debug/pr35154-dwarf2.f:  New test case for
	DWARF functionality.

From-SVN: r133801
2008-04-01 21:23:36 +00:00
James E Wilson fcb9237b9c re PR debug/31510 (FAIL: libgomp.fortran/threadprivate[23].f90 -O3 -g)
PR debug/31510
	* dbxout.c (dbxout_expand_expr, case VAR_DECL): Return NULL for
	emulated thread local variables.

From-SVN: r133274
2008-03-16 15:48:09 +00:00
Jakub Jelinek cc459ab40a re PR debug/33316 (ICE on valid variable-length automatic array in const struct)
PR debug/33316
	* dwarf2out.c (modified_type_die): Handle TYPE_DECL with NULL
	DECL_NAME.
	* dbxout.c (dbxout_type): Likewise.

	* gcc.dg/debug/pr33316.c: New test.

From-SVN: r128631
2007-09-20 23:27:39 +02:00
Olivier Hainque b420396fcf dbxout.c (dbxout_block): Move declaration within the first #if defined (DBX_DEBUGGING_INFO) block.
2007-08-31  Olivier Hainque  <hainque@adacore.com>

	* dbxout.c (dbxout_block): Move declaration within the first
	#if defined (DBX_DEBUGGING_INFO) block.  Rearrange another such
	block to include the definition, together with the associated
	helpers.

From-SVN: r127955
2007-08-31 07:02:43 +00:00
Kaveh R. Ghazi 9678086db1 alias.c (memory_modified_1, [...]): Constify.
* alias.c (memory_modified_1, memory_modified_in_insn_p):
	Constify.
	* basic-block.h (tree_predicted_by_p, rtl_predicted_by_p):
	Likewise.
	* bb-reorder.c (copy_bb_p): Likewise.
	* cfghooks.c (can_remove_branch_p, can_merge_blocks_p,
	predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
	block_ends_with_condjump_p): Likewise.
	* cfghooks.h (can_remove_branch_p, can_merge_blocks_p,
	predicted_by_p, can_duplicate_block_p, block_ends_with_call_p,
	block_ends_with_condjump_p): Likewise.
	* cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise.
	* cfgrtl.c (can_delete_note_p, can_delete_label_p,
	rtl_can_merge_blocks, cfg_layout_can_merge_blocks_p,
	rtl_block_ends_with_call_p, rtl_block_ends_with_condjump_p,
	need_fake_edge_p, rtl_can_remove_branch_p): Likewise.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Use
	debug_true_const_tree instad of debug_true_tree.
	* debug.c (do_nothing_debug_hooks): Likewise.
	* debug.h (ignore_block, debug_true_const_tree): Constify.
	* dwarf2out.c (stack_adjust_offset, clobbers_queued_reg_save,
	dwarf2out_ignore_block, is_pseudo_reg, is_tagged_type,
	decl_ultimate_origin, block_ultimate_origin, lookup_decl_loc,
	same_dw_val_p, add_ranges, is_subrange_type, type_is_enum,
	dbx_reg_number, is_based_loc, field_type,
	simple_type_align_in_bits, simple_decl_align_in_bits,
	simple_type_size_in_bits, field_byte_offset, insert_float,
	type_tag, member_declared_type, is_redundant_typedef,
	secname_for_decl, is_inlined_entry_point): Likewise.
	* emit-rtl.c (const_next_insn, const_previous_insn,
	const_next_nonnote_insn, const_prev_nonnote_insn,
	const_next_real_insn, const_prev_real_insn,
	const_next_active_insn, const_prev_active_insn, const_next_label,
	const_prev_label): Likewise.
	* except.h (lookup_stmt_eh_region_fn, lookup_stmt_eh_region):
	Likewise.
	* haifa-sched.c (may_trap_exp, haifa_classify_insn,
	find_set_reg_weight, no_real_insns_p, find_set_reg_weight,
	sched_insn_is_legitimate_for_speculation_p): Likewise.
	* jump.c (reversed_comparison_code_parts,
	reversed_comparison_code, reversed_comparison, condjump_label):
	Likewise.
	* predict.c (rtl_predicted_by_p, tree_predicted_by_p): Likewise.
	* reg-stack.c (stack_regs_mentioned_p, stack_regs_mentioned):
	Likewise.
	* rtl.h (const_previous_insn, const_next_insn,
	const_prev_nonnote_insn, const_next_nonnote_insn,
	const_prev_real_insn, const_next_real_insn,
	const_prev_active_insn, const_next_active_insn, const_prev_label,
	const_next_label, modified_between_p, modified_in_p,
	const_note_storeskeep_with_call_p, condjump_label,
	reversed_comparison, reversed_comparison_code,
	reversed_comparison_code_parts, memory_modified_in_insn_p,
	stack_regs_mentioned): Likewise.
	* rtlanal.c (modified_between_p, modified_in_p, const_note_stores,
	keep_with_call_p): Likewise.
	* sched-deps.c (deps_may_trap_p, sched_get_condition,
	conditions_mutex_p, sched_insns_conditions_mutex_psd_next_list,
	sd_lists_size, sd_lists_empty_p): Likewise.
	* sched-int.h (sched_insns_conditions_mutex_p,
	haifa_classify_insn, no_real_insns_p,
	sched_insn_is_legitimate_for_speculation_p, sd_next_list,
	sd_lists_size, sd_lists_empty_p): Likewise.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* tree-cfg.c (tree_can_merge_blocks_p, is_ctrl_altering_stmt,
	stmt_ends_bb_p, tree_can_remove_branch_p, tree_can_duplicate_bb_p,
	-tree_block_ends_with_call_p, tree_block_ends_with_condjump_p):
	Likewise.
	* tree-eh.c (lookup_stmt_eh_region_fn, lookup_stmt_eh_region,
	tree_can_throw_internal): Likewise.
	* tree-flow-inline.h (phi_nodes): Likewise.
	* tree-flow.h (phi_nodesstmt_ends_bb_p, is_ctrl_altering_stmt,
	tree_can_throw_internal, lookup_stmt_eh_region): Likewise.
	* tree-gimple.c (const_get_call_expr_in): Likewise.
	* tree-gimple.h (const_get_call_expr_in): Likewise.
	* tree.c (const_lookup_attribute, attribute_list_equal,
	attribute_list_contained): Likewise.
	* tree.h (attribute_list_equal, attribute_list_contained,
	const_lookup_attribute): Likewise.
	* vmsdbgout.c (vmsdbgout_ignore_block): Likewise.

From-SVN: r127824
2007-08-27 03:45:06 +00:00
Paul Brook c8aea42ce2 Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
2007-08-18  Paul Brook  <paul@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New.
	(CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it.
	* Makefile.in: Regenerate.
	* configure.ac (--with-debug-prefix-map): New.
	* configure: Regenerate.

config:
2007-08-18  Paul Brook  <paul@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* mt-gnu (CXXFLAGS_FOR_TARGET): Add
	$(DEBUG_PREFIX_CFLAGS_FOR_TARGET).

gcc:
2007-08-18  Paul Brook  <paul@codesourcery.com>
            Joseph Myers  <joseph@codesourcery.com>

	* common.opt (-fdebug-prefix-map=): New option.
	* opts.c: Include debug.h.
	(common_handle_option): Handle -fdebug-prefix-map.
	* final.c: Include ggc.h.
	(struct debug_prefix_map, debug_prefix_maps, add_debug_prefix_map,
	remap_debug_filename): New.
	* Makefile.in (final.o, opts.o): Update dependencies.
	* debug.h (remap_debug_filename, add_debug_prefix_map): Declare.
	* configure.ac: Check for assembler --debug-prefix-map support.
	* configure, config.in: Regenerate.
	* gcc.c (ASM_MAP): Define conditional on HAVE_AS_DEBUG_PREFIX_MAP.
	(ASM_DEBUG_SPEC): Include ASM_MAP.
	* doc/install.texi (--with-debug-prefix-map): Document.
	* doc/invoke.texi (-fdebug-prefix-map): Document.
	* dbxout.c (dbxout_init, dbxout_start_source_file,
	dbxout_source_file): Call remap_debug_filename.
	* dwarf2out.c (add_comp_dir_attribute, maybe_emit_file,
	dwarf2out_start_source_file, dwarf2out_finish): Call
	remap_debug_filename.
	(file_table_relative_p): Do not check d->emitted_number.
	* toplev.c (output_file_directive): Call remap_debug_filename.
	* vmsdbgout.c (write_srccorr): Call remap_debug_filename.
	* xcoffout.c (xcoffout_source_file): Call remap_debug_filename.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>

From-SVN: r127613
2007-08-18 16:15:39 +01:00
Chao-ying Fu 325217edf0 tree.def (FIXED_POINT_TYPE): New type.
* tree.def (FIXED_POINT_TYPE): New type.
	(FIXED_CST): New constant.
	(FIXED_CONVERT_EXPR): New expr.
	* doc/c-tree.texi (Types): Document FIXED_POINT_TYPE.
	(Expressions): Document FIXED_CST and FIXED_CONVERT_EXPR.
	* tree.h (struct tree_base): Add saturating_flag.
	Remove one bit of spare for saturating_flag.
	(NUMERICAL_TYPE_CHECK): Support FIXED_POINT_TYPE.
	(NON_SAT_FIXED_POINT_TYPE_P, SAT_FIXED_POINT_TYPE_P,
	FIXED_POINT_TYPE_P): Define.
	(TYPE_SATURATING): Define.
	(TREE_FIXED_CST_PTR, TREE_FIXED_CST): Define.
	(struct tree_fixed_cst): New.
	(TYPE_IBIT, TYPE_FBIT): Define.
	(tree_node): Add fixed_cst.
	(enum tree_index): Add new enumeration values of
	TI_SAT_SFRACT_TYPE, TI_SAT_FRACT_TYPE, TI_SAT_LFRACT_TYPE,
	TI_SAT_LLFRACT_TYPE, TI_SAT_USFRACT_TYPE, TI_SAT_UFRACT_TYPE,
	TI_SAT_ULFRACT_TYPE, TI_SAT_ULLFRACT_TYPE, TI_SFRACT_TYPE,
	TI_FRACT_TYPE, TI_LFRACT_TYPE, TI_LLFRACT_TYPE, TI_USFRACT_TYPE,
	TI_UFRACT_TYPE, TI_ULFRACT_TYPE, TI_ULLFRACT_TYPE,
	TI_SAT_SACCUM_TYPE, TI_SAT_ACCUM_TYPE, TI_SAT_LACCUM_TYPE,
	TI_SAT_LLACCUM_TYPE, TI_SAT_USACCUM_TYPE, TI_SAT_UACCUM_TYPE,
	TI_SAT_ULACCUM_TYPE, TI_SAT_ULLACCUM_TYPE, TI_SACCUM_TYPE,
	TI_ACCUM_TYPE, TI_LACCUM_TYPE, TI_LLACCUM_TYPE, TI_USACCUM_TYPE,
	TI_UACCUM_TYPE, TI_ULACCUM_TYPE, TI_ULLACCUM_TYPE,
	TI_QQ_TYPE, TI_HQ_TYPE,_TYPE, TI_SQ_TYPE, TI_DQ_TYPE, TI_TQ_TYPE,
	TI_UQQ_TYPE, TI_UHQ_TYPE, TI_USQ_TYPE, TI_UDQ_TYPE, TI_UTQ_TYPE,
	TI_SAT_QQ_TYPE, TI_SAT_HQ_TYPE, TI_SAT_SQ_TYPE, TI_SAT_DQ_TYPE,
	TI_SAT_TQ_TYPE, TI_SAT_UQQ_TYPE, TI_SAT_UHQ_TYPE, TI_SAT_USQ_TYPE,
	TI_SAT_UDQ_TYPE, TI_SAT_UTQ_TYPE, TI_HA_TYPE, TI_SA_TYPE, TI_DA_TYPE,
	TI_TA_TYPE, TI_UHA_TYPE, TI_USA_TYPE, TI_UDA_TYPE, TI_UTA_TYPE,
	TI_SAT_HA_TYPE, TI_SAT_SA_TYPE, TI_SAT_DA_TYPE, TI_SAT_TA_TYPE,
	TI_SAT_UHA_TYPE, TI_SAT_USA_TYPE, TI_SAT_UDA_TYPE, TI_SAT_UTA_TYPE.
	(sat_short_fract_type_node, sat_fract_type_node,
	sat_long_fract_type_node, sat_long_long_fract_type_node,
	sat_unsigned_short_fract_type_node, sat_unsigned_fract_type_node,
	sat_unsigned_long_fract_type_node,
	sat_unsigned_long_long_fract_type_node, short_fract_type_node,
	fract_type_node, long_fract_type_node, long_long_fract_type_node,
	unsigned_short_fract_type_node, unsigned_fract_type_node,
	unsigned_long_fract_type_node, unsigned_long_long_fract_type_node,
	sat_short_accum_type_node, sat_accum_type_node,
	sat_long_accum_type_node, sat_long_long_accum_type_node,
	sat_unsigned_short_accum_type_node, sat_unsigned_accum_type_node,
	sat_unsigned_long_accum_type_node,
	sat_unsigned_long_long_accum_type_node, short_accum_type_node,
	accum_type_node, long_accum_type_node, long_long_accum_type_node,
	unsigned_short_accum_type_node, unsigned_accum_type_node,
	unsigned_long_accum_type_node, unsigned_long_long_accum_type_node,
	qq_type_node, hq_type_node, sq_type_node, dq_type_node, tq_type_node,
	uqq_type_node, uhq_type_node, usq_type_node, udq_type_node,
	utq_type_node, sat_qq_type_node, sat_hq_type_node, sat_sq_type_node,
	sat_dq_type_node, sat_tq_type_node, sat_uqq_type_node,
	sat_uhq_type_node, sat_usq_type_node, sat_udq_type_node,
	sat_utq_type_node, ha_type_node, sa_type_node, da_type_node,
	ta_type_node, uha_type_node, usa_type_node, uda_type_node,
	uta_type_node, sat_ha_type_node, sat_sa_type_node, sat_da_type_node,
	sat_ta_type_node, sat_uha_type_node, sat_usa_type_node,
	sat_uda_type_node, sat_uta_type_node): New macro.
	(make_fract_type, make_accum_type): Declare.
	(make_signed_fract_type, make_unsigned_fract_type,
	make_sat_signed_fract_type, make_sat_unsigned_fract_type,
	make_signed_accum_type, make_unsigned_accum_type,
	make_sat_signed_accum_type, make_sat_unsigned_accum_type,
	make_or_reuse_signed_fract_type, make_or_reuse_unsigned_fract_type,
	make_or_reuse_sat_signed_fract_type,
	make_or_reuse_sat_unsigned_fract_type, make_or_reuse_signed_accum_type,
	make_or_reuse_unsigned_accum_type, make_or_reuse_sat_signed_accum_type,
	make_or_reuse_sat_unsigned_accum_type): New macro.
	(fixed_zerop): Declare.
	* defaults.h (SHORT_FRACT_TYPE_SIZE, FRACT_TYPE_SIZE,
	LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE,
	SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE,
	LONG_LONG_ACCUM_TYPE_SIZE): Define.
	* treestruct.def: Add TS_FIXED_CST.
	* Makefile.in (c-pretty-print.o): Add dependence on fixed-value.h.
	(tree.o): Likewise.
	(tree-dump.o): Likewise.
	(print-tree.o): Likewise.
	(tree-pretty-print.o): Likewise.
	(fold-const.o): Likewise.
	* tree-complex.c (some_nonzerop): Handle FIXED_CST.
	* tree-gimple.c (is_gimple_formal_tmp_rhs): Handle FIXED_CST.
	(is_gimple_min_invariant): Handle FIXED_CST.
	* stor-layout.c (int_mode_for_mode): Handle MODE_FRACT, MODE_UFRACT,
	MODE_ACCUM, MODE_UACCUM, MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT,
	MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(layout_type): Handle FIXED_POINT_TYPE.
	(make_fract_type, make_accum_type): New functions.
	* tree-browser.c (browse_tree): Handle FIXED_POINT_TYPE.
	* tree-dump.c (fixed-value.h): New include.
	(dump_fixed): New function.
	(dequeue_and_dump): Handle FIXED_POINT_TYPE and FIXED_CST.
	* tree-inline.c (remap_type_1): Handle FIXED_POINT_TYPE.
	(estimate_num_insns_1): Handle FIXED_CST and FIXED_CONVERT_EXPR.
	* tree-pretty-print.c (fixed-value.h): New include.
	(dump_generic_node): Handle FIXED_POINT_TYPE, FIXED_CST, and
	FIXED_CONVERT_EXPR.
	* tree-scalar-evolution.c (get_scalar_evolution): Handle FIXED_CST.
	* tree-ssa-loop-im.c (for_each_index): Handle FIXED_CST.
	* tree-ssa-pre.c (poolify_tree): Handle FIXED_CST.
	* tree-ssa-reassoc.c (break_up_subtract_bb): We can do reassociation
	for non-saturating fixed-point types.
	(reassociate_bb): Likewise.
	* emit-rtl.c (fixed-value.h): New include.
	(fconst0, fconst1): New array.
	(init_emit_once): Initialize fconst0 and fconst1 for fixed-point modes.
	* tree-vect-generic.c expand_vector_operation): Support
	MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, and
	MODE_VECTOR_UACCUM.
	(type_for_widest_vector_mode): Add one parameter for the 
	saturating flag.
	Check scalar FRACT, UFRACT, ACCUM, and UACCUM mode to select their
	vector mode.
	Pass the satp parameter to type_for_mode for fixed-point types.
	(expand_vector_operations_1): Pass the saturating flag to
	type_for_widest_vector_mode.
	Support MODE_VECTOR_FRACT, MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM,
	and MODE_VECTOR_UACCUM.
	* tree-vect-transform.c (vect_is_simple_cond): Support FIXED_CST.
	(vectorizable_condition): Likewise.
	* tree.c (fixed-value.h): New include.
	(tree_code_size): Support FIXED_CST.
	(build_fixed): New function.
	(build_one_cst): Support FIXED_POINT_TYPE for accum types.
	(fixed_zerop): New function.
	(tree_node_structure): Support FIXED_CST.
	(type_contains_placeholder_1): Support FIXED_POINT_TYPE.
	(build_type_attribute_qual_variant): Handle FIXED_POINT_TYPE.
	(type_hash_eq): Handle FIXED_POINT_TYPE.
	(simple_cst_equal): Support FIXED_CST.
	(iterative_hash_expr): Handle FIXED_CST.
	(get_unwidened): Make sure type is not FIXED_POINT_TYPE.
	(get_narrower): Likewise.
	(variably_modified_type_p): Handle FIXED_POINT_TYPE.
	(make_or_reuse_fract_type, make_or_reuse_accum_type): New functions.
	(build_common_tree_nodes_2): Use MAKE_FIXED_TYPE_NODE_FAMILY and
	MAKE_FIXED_MODE_NODE macros to initialize fixed-point type
	nodes.
	(build_vector_type_for_mode): Handle MODE_VECTOR_FRACT,
	MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
	(initializer_zerop): Support FIXED_CST.
	(walk_tree): Handle FIXED_CST and FIXED_POINT_TYPE.
	* dwarf2out.c (base_type_die): Use DW_ATE_signed_fixed or
	DW_ATE_unsigned_fixed to describe FIXED_POINT_TYPE.
	(is_base_type): Handle FIXED_POINT_TYPE.
	(add_type_attribute): Handle FIXED_POINT_TYPE.
	(gen_type_die_with_usage): Handle FIXED_POINT_TYPE.
	* print-tree.c (fixed-value.h): New include.
	(print_node_brief): Support FIXED_CST.
	(print_node): Support FIXED_POINT_TYPE and FIXED_CST.
	* c-pretty-print.c (fixed-value.h): New include.
	(pp_c_type_specifier): Handle FIXED_POINT_TYPE.  Need to pass
	TYPE_SATURATING to c_common_type_for_mode for fixed-point modes.
	(pp_c_direct_abstract_declarator): Handle FIXED_POINT_TYPE.
	Support fixed-point types for inner items in VECTOR_TYPE.
	(pp_c_direct_declarator): Likewise.
	(pp_c_declarator): Likewise.
	(pp_c_fixed_constant): New function.
	(pp_c_constant): Handle FIXED_CST.
	(pp_c_primary_expression): Likewise.
	(pp_c_expression): Likewise.
	* fold-const.c (fixed-value.h): New include.
	(negate_expr_p): Return true for FIXED_CST.
	(fold_negate_expr): Support FIXED_CST.
	(split_tree): Support FIXED_CST.
	(const_binop): Support FIXED_CST.
	(fold_convert_const_int_from_fixed): New function to convert from
	fixed to int.
	(fold_convert_const_real_from_fixed): New function to convert from
	fixed to real.
	(fold_convert_const_fixed_from_fixed): New function to convert from
	fixed to another fixed.
	(fold_convert_const_fixed_from_int): New function to convert from
	int to fixed.
	(fold_convert_const_fixed_from_real): New function to convert from
	real to fixed.
	(fold_convert_const): Support conversions from fixed to int, from
	fixed to real, from fixed to fixed, from int to fixed, and from real
	to fixed.
	(fold_convert): Support FIXED_CST and FIXED_POINT_TYPE.
	(operand_equal_p): Support FIXED_CST.
	(make_range): For fixed-point modes, we need to pass the
	saturating flag as the 2nd parameter.
	(tree_swap_operands_p): Handle FIXED_CST.
	(fold_plusminus_mult_expr): For fract modes, we cannot generate
	constant 1.
	(fold_unary): Support FIXED_CONVERT_EXPR.
	(fold_binary): Handle FIXED_CST.
	Make sure the type is not saturating, before associating operations.
	Ex: A + B + C, A * B * C, (A1 * C1) +/- (A2 * C2).
	(tree_expr_nonnegative_warnv_p): Handle FIXED_CST.
	(fold_negate_const): Support FIXED_CST.
	(fold_relational_const): Support FIXED_CST.
	* gimplify.c (omp_firstprivatize_type_sizes): Handle FIXED_POINT_TYPE.
	(gimplify_expr): Handle FIXED_CST.
	(gimplify_type_sizes): Handle FIXED_POINT_TYPE.
	* ipa-prop.c (ipa_callsite_compute_param): Support FIXED_CST.
	* ipa-type-escape.c (type_to_consider): Handle FIXED_POINT_TYPE.
	* doc/tm.texi (Type Layout): Document SHORT_FRACT_TYPE_SIZE,
	FRACT_TYPE_SIZE, LONG_FRACT_TYPE_SIZE, LONG_LONG_FRACT_TYPE_SIZE,
	SHORT_ACCUM_TYPE_SIZE, ACCUM_TYPE_SIZE, LONG_ACCUM_TYPE_SIZE,
	LONG_LONG_ACCUM_TYPE_SIZE.
	* dbxout.c (dbxout_type): Handle FIXED_POINT_TYPE.
	* c-aux-info.c (gen_type): Handle FIXED_POINT_TYPE.
	* tree-sra.c (is_sra_scalar_type): Support FIXED_POINT_TYPE.
	* expmed.c (extract_bit_field): Support MODE_FRACT, MODE_UFRACT,
	MODE_ACCUM, and MODE_UACCUM.
	* tree-vectorizer.c (vect_is_simple_reduction): Check for saturating
	fixed-point types to disable reduction.
	* explow.c (promote_mode): Support FIXED_POINT_TYPE.

From-SVN: r127306
2007-08-08 22:29:12 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Daniel Jacobowitz 88c4be5e48 dbxout.c (output_types_sort): Add a comment.
* dbxout.c (output_types_sort): Add a comment.
	(output_used_types): Free the VEC.

From-SVN: r115762
2006-07-26 17:38:37 +00:00
Daniel Jacobowitz 2daec0f085 dbxout.c (output_used_types_helper): Push queued types on a VEC.
* dbxout.c (output_used_types_helper): Push queued types
	on a VEC.
	(output_types_sort): New.
	(output_used_types): Collect used types on a VEC and sort them
	before emission.

From-SVN: r115735
2006-07-25 12:31:33 +00:00
Daniel Jacobowitz f629051ee6 re PR debug/27473 (g++.dg/other/unused1.C and gcc.dg/20060410.c fail on powerpc-darwin)
PR debug/27473
	* dbxout.c (output_used_types_helper, output_used_types): New.
	(dbxout_symbol): Call output_used_types.

From-SVN: r115704
2006-07-24 02:59:36 +00:00
Carlos O'Donell e098f3a586 dbxout.c (dbxout_function_end): Do not increment scope_labelno.
2006-07-17  Carlos O'Donell  <carlos@codesourcery.com>

	* dbxout.c (dbxout_function_end): Do not increment scope_labelno.
	(dbxout_begin_prologue): Increment scope_labelno.

From-SVN: r115544
2006-07-18 04:16:02 +00:00
Carlos O'Donell 03471b3fcd dbxout.c (dbxout_begin_prologue): Emit LFBB label at function start.
gcc/

2006-07-14  Carlos O'Donell  <carlos@codesoucery.com>


	* dbxout.c (dbxout_begin_prologue): Emit LFBB label at function start.
	(dbxout_function_end): Use local label LFBB. Remove hook DBX_OUTPUT_NFUN.
	(dbxout_source_line): Use local label LFBB.
	(dbxout_block): Likewise.
	(dbx_output_lbrac): Remove hook DBX_OUTPUT_LBRAC.
	(dbx_output_rbrac): Remove hook DBX_OUTPUT_RBRAC.
	* config/rs6000/linux64.h: Remove DBX_OUTPUT_LBRAC, DBX_OUTPUT_RBRAC,
	and DBX_OUTPUT_NFUN.

From-SVN: r115444
2006-07-14 15:54:23 +00:00
Roger Sayle 71d5938381 tree.def (CHAR_TYPE): Remove.
* tree.def (CHAR_TYPE): Remove.
	* dbxout.c (dbxout_type): Delete dead handling of CHAR_TYPE.
	* dwarf2out.c (base_type_die, is_base_type): Likewise.
	(gen_type_die) <ARRAY_TYPE>: Remove handling of CHAR_TYPE arrays.
	(gen_string_type_die): Delete unreachable function.

	* tree-pretty-print.c (dump_generic_node): Don't handle CHAR_TYPE.
	* tree.c (build_int_cst_wide, type_contains_placeholder_1,
	type_hash_eq, variably_modified_type_p, walk_type_fields): Likewise.
	* tree.h (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Likewise.
	* builtins.c (type_to_class): Likewise.
	* fold-const.c (fold_convert, build_range_check,
	merge_ranges): Likewise.
	* expr.c (count_type_elements): Likewise.
	* c-pretty-print.c (pp_c_type_specifier): Likewise.
	* stor-layout.c (layout_type): Likewise.
	* ipa-type-escape.c (type_to_consider): Likewise.
	* gimplify.c (omp_firstprivatize_type_sizes,
	gimplify_type_sizes): Likewise.
	* explow.c (promote_mode): Likewise.
	* tree-sra.c (is_sra_scalar_type): Likewise.
	* varasm.c (output_constant): Likewise.
	* tree-inline.c (remap_type_1): Likewise.
	* convert.c (convert_to_pointer, convert_to_real,
	convert_to_integer, convert_to_complex): Likewise.

From-SVN: r110775
2006-02-08 23:57:21 +00:00
Marcin Dalecki 5ed6ace578 tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31  Marcin Dalecki  <martin@dalecki.de>

	* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
	* regrename.c: Ditto.
	* tree-ssa-loop-im.c: Ditto.
	* tree-dump.c: Ditto.
	* tree-complex.c: Ditto.
	* genrecog.c: Ditto.
	* tree-ssa-threadupdate.c: Ditto.
	* tracer.c: Ditto.
	* java/class.c: Ditto.
	* java/jcf-parse.c: Ditto.
	* java/resource.c: Ditto.
	* java/except.c: Ditto.
	* java/jvspec.c: Ditto.
	* java/jcf-write.c: Ditto.
	* java/jcf-path.c: Ditto.
	* java/gjavah.c: Ditto.
	* java/zextract.c: Ditto.
	* java/jcf-io.c: Ditto.
	* java/jcf.h: Ditto.
	* java/buffer.c: Ditto.
	* java/lang.c: Ditto.
	* java/parse-scan.y: Ditto.
	* java/lex.c: Ditto.
	* java/lex.h: Ditto.
	* cfgloopmanip.c: Ditto.
	* postreload-gcse.c: Ditto.
	* tree-ssa-loop-manip.c: Ditto.
	* postreload.c: Ditto.
	* tree-ssa-loop-ch.c: Ditto.
	* loop.c: Ditto.
	* ipa-cp.c: Ditto.
	* cppspec.c: Ditto.
	* diagnostic.c: Ditto.
	* final.c: Ditto.
	* genoutput.c: Ditto.
	* gcc.c: Ditto.
	* cfghooks.c: Ditto.
	* cfgloopanal.c: Ditto.
	* objc/objc-act.c: Ditto.
	* gcov.c: Ditto.
	* genextract.c: Ditto.
	* genautomata.c: Ditto.
	* pretty-print.c: Ditto.
	* genemit.c: Ditto.
	* cgraphunit.c: Ditto.
	* flow.c: Ditto.
	* df-scan.c: Ditto.
	* haifa-sched.c: Ditto.
	* dominance.c: Ditto.
	* dbxout.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* df-core.c: Ditto.
	* mode-switching.c: Ditto.
	* modulo-sched.c: Ditto.
	* graph.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* cse.c: Ditto.
	* fix-header.c: Ditto.
	* web.c: Ditto.
	* tree-stdarg.c: Ditto.
	* ipa-utils.c: Ditto.
	* loop-init.c: Ditto.
	* ipa-inline.c: Ditto.
	* cfganal.c: Ditto.
	* global.c: Ditto.
	* alloc-pool.c: Ditto.
	* dwarf2out.c: Ditto.
	* opts.c: Ditto.
	* genattrtab.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* predict.c: Ditto.
	* timevar.c: Ditto.
	* lcm.c: Ditto.
	* fortran/gfortranspec.c: Ditto.
	* regmove.c: Ditto.
	* local-alloc.c: Ditto.
	* langhooks.c: Ditto.
	* function.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* gcse.c: Ditto.
	* ipa-type-escape.c: Ditto.
	* alias.c: Ditto.
	* tree-if-conv.c: Ditto.
	* profile.c: Ditto.
	* ipa.c: Ditto.
	* tree-data-ref.c: Ditto.
	* loop-unroll.c: Ditto.
	* treelang/treetree.c: Ditto.
	* calls.c: Ditto.
	* bt-load.c: Ditto.
	* ggc-common.c: Ditto.
	* except.c: Ditto.
	* coverage.c: Ditto.
	* cselib.c: Ditto.
	* tree-cfgcleanup.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* cfgcleanup.c: Ditto.
	* loop-invariant.c: Ditto.
	* loop-iv.c: Ditto.
	* ipa-prop.c: Ditto.
	* print-tree.c: Ditto.
	* conflict.c: Ditto.
	* ggc-page.c: Ditto.
	* sched-deps.c: Ditto.
	* regclass.c: Ditto.
	* tree-object-size.c: Ditto.
	* combine.c: Ditto.
	* bb-reorder.c: Ditto.
	* resource.c: Ditto.
	* var-tracking.c: Ditto.
	* cfgloop.c: Ditto.
	* df-problems.c: Ditto.
	* reg-stack.c: Ditto.
	* tlink.c: Ditto.
	* gccspec.c: Ditto.
	* sched-rgn.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/darwin.c: Ditto.
	* config/arm/arm.c: Ditto.
	* cfgrtl.c: Ditto.
	* collect2.c: Ditto.
	* reload1.c: Ditto.

From-SVN: r110446
2006-01-31 20:56:55 +01:00
Richard Sandiford d6b5193bfc alpha.c (alpha_start_function): Use switch_to_section.
* config/alpha/alpha.c (alpha_start_function): Use switch_to_section.
	(alpha_elf_select_rtx_section): Return the selected section rather
	than emitting assembly code.
	(alpha_write_linkage): Emit a ".link" directive directly and then
	set in_section to NULL.
	(vms_asm_out_constructor): Use switch_to_section.
	(vms_asm_out_destructor): Likewise.
	(unicosmk_output_common): Set in_section to NULL instead of calling
	the dummy common_section function.
	(unicosmk_text_section): Delete in favor of...
	(unicosmk_output_text_section_asm_op): ...this new function.
	(unicosmk_data_section): Delete in favor of...
	(unicosmk_output_data_section_asm_op): ...this new function.
	(unicosmk_init_sections): New function.
	(unicosmk_output_deferred_case_vectors): Use switch_to_section.
	(unicosmk_output_ssib): Set in_section to NULL instead of calling
	the dummy ssib_section function.
	(unicosmk_section_buf): Delete.
	* config/alpha/alpha-protos.h (unicosmk_text_section): Delete.
	(unicosmk_data_section): Delete.
	* config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, sbss_section, sdata_section)
	(SECTION_FUNCTION_TEMPLATE): Delete.
	* config/alpha/unicosmk.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP)
	(READONLY_DATA_SECTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(common_section, COMMON_SECTION, ssib_section, SSIB_SECTION): Delete.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/alpha/vms.h (LINK_SECTION_ASM_OP, LITERALS_SECTION_ASM_OP)
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(link_section, literals_section): Delete.
	(ASM_OUTPUT_DEF): Emit the ".literal" directive directly and then
	set in_section to NULL.

	* config/arm/aof.h (TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP): Delete.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, ZERO_INIT_SECTION): Delete.
	(COMMON_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_COMMON): Set in_section to NULL rather than calling
	the dummy common_section function.
	* config/arm/aout.h (ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/arm/arm.c (get_jump_table_size): Use pointer comparison
	between readonly_data_section and text_section to check whether
	read-only data is being put in the text section.
	(arm_output_function_epilogue): Use switch_to_section.
	(arm_elf_asm_constructor): Likewise.
	(thumb_call_via_reg): Replace call to in_text_section with
	a comparison between in_section and text_section.
	(arm_file_end): Use switch_to_section.
	(aof_text_section): Delete in favor of...
	(aof_output_text_section_asm_op): ...this new function.
	(aof_data_section): Delete in favor of...
	(aof_output_data_section_asm_op): ...this new function.
	(aof_asm_init_sections): New function.
	(zero_init_section): Moved from config/arm/aof.h.
	(aof_dump_imports, aof_file_start): Use switch_to_section.
	* config/arm/arm.h (thumb_call_via_label): Update comment.
	* config/arm/arm-protos.h (aof_text_section, aof_data_section): Delete.
	(common_section): Delete.
	* config/arm/pe.h (ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION)
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro.
	* config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_BSS):
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use get_named_section and
	switch_to_section.

	* config/avr/avr.c (progmem_section): New variable.
	(avr_output_progmem_section_asm_op): New function.
	(avr_asm_init_sections): New function.
	(avr_output_addr_vec_elt): Use switch_to_section.
	* config/avr/avr.h (progmem_section): Declare.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/avr/avr-protos.h (progmem_section): Delete.

	* config/bfin/bfin.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/c4x/c4x.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(INIT_SECTION_FUNCTION, FINI_SECTION_FUNCTION): Delete.

	* config/darwin-sections.def: New file.
	* config/darwin.c: Define all sections in darwin-sections.def.
	(output_objc_section_asm_op, darwin_init_sections): New functions.
	(machopic_output_indirection): Use switch_to_section.
	(machopic_select_section): Return the selected section rather than
	emitting assembly code.  Replace the static function table with
	inline conditional expressions.  Update the tests of last_text_section
	and move them into the FUNCTION_DECL block.
	(machopic_select_rtx_section): Return the selected section rather than
	emitting assembly code.
	(machopic_asm_out_constructor, machopic_asm_out_destructor)
	(darwin_file_end): Use switch_to_section.
	* config/darwin.h: Use darwin-sections.def to declare sections.
	(INIT_SECTION_ASM_OP): Remove empty definition.
	(HAS_INIT_SECTION): Define this instead.
	(SECTION_FUNCTION, EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.
	(TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/darwin-protos.h (darwin_init_sections): Declare.
	(machopic_picsymbol_stub_section, machopic_picsymbol_stub1_section)
	(machopic_symbol_stub_section, machopic_symbol_stub1_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(constructor_section, destructor_section, mod_init_section): Delete.
	(mod_term_section): Delete.
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	(machopic_select_section): Return a section.
	(machopic_select_rtx_section): Likewise.
	(text_coal_section, text_unlikely_section, text_unlikely_coal_section)
	(const_section, const_coal_section, const_data_section): Delete.
	(const_data_coal_section, data_coal_section, cstring_section): Delete.
	(literal4_section, literal8_section, constructor_section): Delete.
	(mod_init_section, mod_term_section, destructor_section): Delete.
	(objc_class_section, objc_meta_class_section, objc_category_section)
	(objc_class_vars_section, objc_instance_vars_section): Delete.
	(objc_cls_meth_section, objc_inst_meth_section): Delete.
	(objc_cat_cls_meth_section, objc_cat_inst_meth_section): Delete.
	(objc_selector_refs_section, objc_selector_fixup_section): Delete.
	(objc_symbols_section, objc_module_info_section): Delete.
	(objc_image_info_section, objc_protocol_section): Delete.
	(objc_string_object_section, objc_constant_string_object_section)
	(objc_class_names_section, objc_meth_var_names_section): Delete.
	(objc_meth_var_types_section, objc_cls_refs_section): Delete.
	(machopic_lazy_symbol_ptr_section, machopic_nl_symbol_ptr_section)
	(machopic_symbol_stub_section, machopic_picsymbol_stub_section)
	(darwin_exception_section, darwin_eh_frame_section): Delete.
	* config/t-darwin (darwin.o): Depend on config/darwin-sections.def.

	* config/frv/frv.c (frv_asm_out_constructor): Use switch_to_section.
	(frv_asm_out_destructor): Likewise.
	* config/frv/frv.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, FIXUP_SECTION_FUNCTION): Delete.
	(ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use switch_to_section and
	get_named_section.
	(ASM_OUTPUT_CASE_LABEL): Use switch_to_section.
	* config/frv/frv-protos.h (fixup_section, sdata_section, sbss_section)
	(data_section): Delete.

	* config/i386/cygming.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(DRECTVE_SECTION_FUNCTION): Delete.
	(drectve_section): Redefine as a macro that sets in_section after
	emitting the directive.
	(SWITCH_TO_SECTION_FUNCTION): Delete.
	* config/i386/darwin.h (ASM_OUTPUT_ALIGN): Replace call to
	in_text_section with comparison between in_section and text_section.
	* config/i386/i386.c (x86_64_elf_select_section): Return the section
	rather than emitting assembly code.  Use get_named_section.
	(x86_output_aligned_bss, ix86_file_end): Use switch_to_section and
	get_named_section.
	(machopic_output_stub): Use switch_to_section.
	* config/i386/nwld.c (nwld_named_section_asm_out_constructor)
	(nwld_named_section_asm_out_destructor): Use get_section and
	switch_to_section.

	* config/ia64/ia64.c (ia64_select_rtx_section): Return the section
	rather than emitting assembly code.
	(ia64_rwreloc_select_section): Likewise.
	(ia64_rwreloc_select_rtx_section): Likewise.
	* config/ia64/ia64-protos.h (sdata_section, sbss_section): Delete.
	* config/ia64/sysv4.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use
	switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SDATA_SECTION_FUNCTION, SBSS_SECTION_FUNCTION): Delete.

	* config/iq2000/iq2000.c (iq2000_select_rtx_section): Return the
	section rather than emitting assembly code.
	(iq2000_select_section): Likewise.
	* config/iq2000/iq2000.h (rdata_section, sdata_section): Delete.
	(sbss_section): Delete.

	* config/m32r/m32r.h (ASM_OUTPUT_ALIGNED_BSS): Use switch_to_section
	and get_named_section.
	* config/m32r/m32r-protos.h (sbss_section, sdata_section): Delete.

	* config/mcore/mcore-elf.h (EXPORTS_SECTION_ASM_OP): Delete.
	(SUBTARGET_EXTRA_SECTIONS, SUBTARGET_EXTRA_SECTION_FUNCTIONS): Delete.
	(EXPORT_SECTION_FUNCTION, SUBTARGET_SWITCH_SECTIONS): Delete.
	(MCORE_EXPORT_NAME): Emit the exports directive directly, then set
	in_section to NULL.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	* config/mcore/mcore.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(SWITCH_SECTION_FUNCTION): Delete.
	* config/mcore/mcore-pe.h (SUBTARGET_SWITCH_SECTIONS): Delete.
	(DRECTVE_SECTION_ASM_OP, SUBTARGET_EXTRA_SECTIONS): Delete.
	(SUBTARGET_EXTRA_SECTION_FUNCTIONS, DRECTVE_SECTION_FUNCTION): Delete.
	(MCORE_EXPORT_NAME): Emit ".section .drectve" directly, then set
	in_section to NULL.
	(ASM_DECLARE_OBJECT_NAME): Update the type of save_section.  Use the
	global switch_to_section function instead of the old port-local one.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.

	* config/mips/mips.c (mips_file_start): Update comment.
	(mips_output_aligned_bss): Use switch_to_section and get_named_section.
	(mips_output_aligned_decl_common): Use switch_to_section.
	(mips_select_rtx_section): Return the section rather than emitting
	assembly code.  Use get_named_section.
	(mips_function_rodata_section: Likewise get_section.
	(build_mips16_function_stub): Use switch_to_section.
	* config/mips/mips.h (ASM_OUTPUT_IDENT): Use switch_to_section.
	(SDATA_SECTION_ASM_OP): Delete.
	* config/mips/vxworks.h (EXTRA_SECTIONS): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.

	* config/mmix/mmix.c (mmix_file_start, mmix_file_end)
	(mmix_asm_output_aligned_local): Use switch_to_section.

	* config/pa/pa.c (som_readonly_data_section, som_one_only_data_section)
	(som_one_only_readonly_data_section): New variables.
	(pa_output_function_epilogue): Set in_section to NULL instead of
	calling forget_section.
	(output_deferred_plabels): Use select_section.
	(pa_asm_output_mi_thunk): Likewise.  Set in_section to NULL instead
	of calling forget_section.
	(pa_asm_output_aligned_bss, pa_asm_output_aligned_common)
	(pa_asm_output_aligned_local): Use select_section.
	(som_text_section_asm_op): Delete in favor of...
	(som_output_text_section_asm_op): ...this new function.
	(pa_som_asm_init_sections): New function.
	(pa_select_section): Return the section rather than emitting
	assembly code.
	* config/pa/pa.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(SOM_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_READONLY_DATA_SECTION_FUNCTION): Delete.
	(SOM_ONE_ONLY_DATA_SECTION_FUNCTION, FORGET_SECTION_FUNCTION): Delete.
	* config/pa/pa-protos.h (som_text_section_asm_op): Delete.
	(som_readonly_data_section, som_one_only_readonly_data_section)
	(som_one_only_data_section, forget_section): Delete.
	* config/pa/som.h (TEXT_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/rs6000/rs6000.c (read_only_data_section): New variable.
	(private_data_section, read_only_private_data_section): New variables.
	(sdata2_section, toc_section): New variables.
	(rs6000_file_start): Use switch_to_section.
	(rs6000_assemble_integer): Use comparisons against in_section
	instead of calling in_toc_section and in_text_section.  Use
	unlikely_text_section_p.
	(rs6000_elf_output_toc_section_asm_op): New function, derived
	from the old rs6000/sysv4.h toc_section function.
	(rs6000_elf_asm_init_sections): New function.
	(rs6000_elf_select_rtx_section, rs6000_elf_select_section): Return
	the section rather than emitting assembly code.
	(machopic_output_stub): Use switch_to_section.
	(toc_section): Delete dummy function.
	(rs6000_elf_asm_out_constructor, rs6000_elf_asm_out_destructor): Use
	switch_to_section and get_section.
	(rs6000_xcoff_output_readonly_section_asm_op): New function.
	(rs6000_xcoff_output_readwrite_section_asm_op): New function.
	(rs6000_xcoff_output_toc_section_asm_op): New function, derived from
	the old rs6000/xcoff.h toc_section function.
	(rs6000_xcoff_asm_init_sections): New function.
	(rs6000_xcoff_select_section, rs6000_xcoff_select_rtx_section): Return
	the section rather than emitting assembly code.
	(rs6000_xcoff_file_start): Use switch_to_section.
	(rs6000_xcoff_file_end): Likewise.
	* config/rs6000/rs6000-protos.h (toc_section, sdata_section): Delete.
	(sdata2_section, sbss_section, private_data_section): Delete.
	(read_only_data_section, read_only_private_data_section): Delete.
	* config/rs6000/sysv4.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(TOC_SECTION_FUNCTION, SDATA_SECTION_FUNCTION, SDATA2_SECTION_FUNCTION)
	(SBSS_SECTION_FUNCTION, INIT_SECTION_FUNCTION): Delete.
	(FINI_SECTION_FUNCTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_OUTPUT_ALIGNED_LOCAL): Use switch_to_section.
	* config/rs6000/xcoff.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(READ_ONLY_DATA_SECTION_FUNCTION, PRIVATE_DATA_SECTION_FUNCTION)
	(READ_ONLY_PRIVATE_DATA_SECTION_FUNCTION, TOC_SECTION_FUNCTION)
	(READONLY_DATA_SECTION): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	(ASM_DECLARE_FUNCTION_NAME): Use switch_to_section.  Set in_section
	to NULL rather than no_section.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/sh/sh.c (sh_file_start): Use switch_to_section.

	* config/sparc/sparc.c (emit_pic_helper): Use switch_to_section.
	(sparc_output_deferred_case_vectors): Likewise.  Remove argument
	from call to current_function_section.

	* config/stormy16/stormy16.c: Include ggc.h and gt-storm16.h.
	(bss100_section): New variable.
	(xstormy16_asm_output_aligned_common): Use switch_to_section.
	(xstormy16_asm_init_sections): New function.
	(xstormy16_asm_out_destructor, xstormy16_asm_out_constructor): Use
	switch_to_section and get_section.
	(xstormy16_output_addr_vec): Use switch_to_section.  Remove argument
	from calls to current_function_section.
	* config/stormy16/stormy16.h (EXTRA_SECTIONS): Delete.
	(XSTORMY16_SECTION_FUNCTION, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/stormy16/stormy16-protos.h (bss100_section): Delete.

	* config/svr3.h (ASM_OUTPUT_LOCAL): Use switch_to_section.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, INIT_SECTION_FUNCTION)
	(FINI_SECTION_FUNCTION): Delete.

	* config/v850/v850.c: Include gt-v850.h.
	(rosdata_section, rozdata_section, tdata_section, zdata_section)
	(zbss_section): New variables.
	(v850_output_aligned_bss): Use switch_to_section.
	(v850_asm_init_sections): New function.
	(v850_select_section): Return the section rather than emitting
	assembly code.
	* config/v850/v850.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS)
	(ZDATA_SECTION_ASM_OP, ZBSS_SECTION_ASM_OP, TDATA_SECTION_ASM_OP)
	(ROSDATA_SECTION_ASM_OP, ROZDATA_SECTION_ASM_OP): Delete.
	(TARGET_ASM_INIT_SECTIONS): Define.
	* config/v850/v850-protos.h (sdata_section, rosdata_section): Delete.
	(sbss_section, tdata_section, zdata_section, rozdata_section): Delete.
	(zbss_section): Delete.

	* config/vax/vaxv.h (ASM_OUTPUT_LOCAL): Use switch_to_section.

	* config/vx-common.h (vxworks_exception_section): Delete.
	(TARGET_ASM_EXCEPTION_SECTION): Delete.

	* config/xtensa/xtensa.c (xtensa_select_rtx_section): Return the
	section rather than emitting assembly code.
	* config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Use
	switch_to_section.

	* Makefile.in (GTFILES): Add $(srcdir)/output.h.
	* coretypes.h (section): New union and typedef.
	* dbxout.c (FORCE_TEXT): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dbxout_function_end, dbxout_init, dbxout_source_file, dbxout_finish)
	(dbxout_symbol_location): Use switch_to_section.
	* dwarf2out.c (named_section_eh_frame_section): Delete, moving
	most of the code into...
	(default_eh_frame_section): ...here.  Return a section.
	(collect2_eh_frame_section): Delete, moving most of the code into..
	(switch_to_eh_frame_section): ...this new function.
	(debug_info_section, debug_abbrev_section, debug_aranges_section)
	(debug_macinfo_section, debug_line_section, debug_loc_section)
	(debug_pubnames_section, debug_str_section, debug_ranges_section): New
	variables.
	(output_call_frame_info): Call switch_to_eh_frame_section instead of
	eh_frame_section.  Use switch_to_section and get_section.
	(dwarf2out_begin_prologue): Use switch_to_section.
	(AT_string_form): Check the flags in debug_str_section instead of
	DEBUG_STR_SECTION_FLAGS.
	(output_comp_unit): Use switch_to_section, get_section, and
	debug_info_section.
	(output_line_info, secname_for_decl): Use unlikely_text_section_p.
	(dwarf2out_begin_block): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_var_location): Use unlikely_text_section_p.
	(dwarf2out_source_line): Use switch_to_section.  Remove argument
	from call to current_function_section.
	(dwarf2out_start_source_file, dwarf2out_end_source_file)
	(dwarf2out_define, dwarf2out_undef: Use switch_to_section and
	debug_macinfo_section.
	(dwarf2out_init): Initialize the new section variables.  Use them
	instead of calls to named_section_flags.  Use switch_to_section.
	(output_indirect_string): Use switch_to_section and debug_str_section.
	(dwarf2out_finish): Use switch_to_section and the new section
	variables.
	* except.c (default_exception_section): Return the section instead
	of emitting assembly code.
	(output_function_exception_table): Use the global exception_section
	variable instead of the target hook.  Use switch_to_section.  Remove
	argument from call to current_function_section.
	* final.c (HAVE_READONLY_DATA_SECTION): Delete.
	(shorten_branches): Use pointer comparisons to detect whether the
	text section is the same as readonly_data_section.
	(profile_function): Use switch_to_section.  Remove argument from
	call to current_function_section.
	(final_scan_insn): Likewise.  Update use of last_text_section.
	* gengtype.c (open_base_files): Add an include of output.h.
	* output.h (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section, sdata_section): Turn into section pointers.
	(in_text_section, in_unlikely_text_section, exports_section)
	(drectve_section, named_section, mergeable_string_section)
	(last_text_section_name): Delete.
	(default_exception_section, default_eh_frame_section): Return sections.
	(SECTION_DECLARED, SECTION_NAMED): New macros.
	(SECTION_MACH_DEP): Bump value.
	(section_common, named_section, unnamed_section): New structures.
	(unnamed_section_callback): New typedef.
	(section): New union.
	(sbss_section, exception_section, eh_frame_section): New variables.
	(in_section, last_text_section): Turn into section pointers.
	(get_unnamed_section, get_section, get_named_section): New functions.
	(mergeable_constant_section, function_section): Return a section.
	(unlikely_text_section): Likewise.
	(current_function_section): Likewise.  Remove the decl argument.
	(unlikely_text_section_p, switch_to_section): New functions.
	(output_section_asm_op): New function.
	(set_named_section_flags, named_section_flags, named_section_real)
	(named_section_first_declaration): Delete.
	(default_select_section, default_elf_select_section): Return a section.
	(default_elf_select_section_1, default_function_rodata_section)
	(default_no_function_rodata_section, default_select_rtx_section)
	(default_elf_select_rtx_section): Likewise.
	* rtl.h (in_data_section): Delete.
	* sdbout.c (sdbout_one_type): Use switch_to_section.
	* system.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Poison.
	(READONLY_DATA_SECTION, TARGET_ASM_EXCEPTION_SECTION): Poison.
	(TARGET_ASM_EH_FRAME_SECTION): Poison.
	* target-def.h (TARGET_ASM_INIT_SECTIONS): New macro.
	(TARGET_ASM_EXCEPTION_SECTION, TARGET_ASM_EH_FRAME_SECTION): Delete.
	(TARGET_ASM_OUT): Update after above changes.
	* target.h (init_sections): New hook.
	(exception_section, eh_frame_section): Delete.
	(select_section, select_rtx_section, function_rodata_section): Return
	a section rather than emitting assembly code.
	* varasm.c (text_section, data_section, readonly_data_section)
	(ctors_section, dtors_section, bss_section, init_section)
	(fini_section): Turn into section pointers.
	(sdata_section, sbss_section, exception_section): New variables.
	(eh_frame_section): New variable.
	(in_section): Make global and turn into a section pointer.
	(last_text_section): Turn into a section pointer.
	(unnamed_sections): New variable.
	(in_named_name, last_text_section_name): Delete.
	(EXTRA_SECTION_FUNCTIONS): Delete.
	(in_named_entry): Delete.
	(section_htab): New variable, replacing...
	(in_named_htab): ...this deleted variable.
	(section_entry_eq, section_entry_hash): New functions, based on...
	(in_named_entry_eq, in_named_entry_hash): ...these deleted functions.
	(get_unnamed_section, get_section): New functions.
	(unlikely_text_section): Return a section instead of emitting
	assembly code.
	(in_text_section, in_unlikely_text_section, in_data_section): Delete.
	(get_named_section_flags, named_section_first_declaration): Delete.
	(unlikely_text_section_p): New function.
	(named_section_real, named_section): Delete.
	(get_named_section): New function.
	(asm_output_bss, asm_output_aligned_bss): Use switch_to_section.
	(function_section): Return a section rather than emitting
	assembly code.
	(current_function_section): Likewise.  Remove argument.  Use
	last_text_section if nonnull, otherwise use function_section.
	(default_function_rodata_section): Return a section rather than
	emitting assembly code.  Use get_section.
	(default_no_function_rodata_section): Return a section rather than
	emitting assembly code.
	(variable_section): Use switch_to_section and get_named_section.
	(mergeable_string_section): Return a section rather than emitting
	assembly code.  Use get_section.  Make static.  Don't take special
	countermeasures for empty strings.
	(mergeable_constant_section): Return a section rather than emitting
	assembly code.  Use get_section.
	(default_named_section_asm_out_destructor): Use switch_to_section
	and get_section.
	(default_dtor_section_asm_out_destructor): Use switch_to_section.
	(default_named_section_asm_out_constructor): Use switch_to_section
	and get_section.
	(default_ctor_section_asm_out_constructor): Use switch_to_section.
	(assemble_start_function): Likewise.  Set last_text_section to
	NULL rather than no_section.  Change the type of save_section.
	(assemble_zeros, assemble_variable): Use the section flags to detect
	whether or not a section is text.
	(assemble_static_space): Use switch_to_section.
	(assemble_trampoline_template): Likewise.
	(output_constant_def_contents): Use switch_to_section and
	get_named_section.
	(output_constant_pool_1): Use switch_to_section.  Use the section
	flags to see whether sections contain mergeable data.
	(init_varasm_once): Initialize section_htab instead of in_named_htab.
	Initialize new section variables.  Call TARGET_ASM_INIT_SECTIONS.
	(default_elf_asm_named_section): Use SECTION_DECLARED to detect
	whether a section has already been declared.
	(default_select_section, default_elf_select_section): Return a
	section rather than emitting assembly code.
	(default_elf_select_section_1): Likewise.  Use bss_section for
	SECCAT_BSS if nonnull.  Use get_named_section.
	(default_select_rtx_section): Return a section rather than
	emitting assembly code.
	(default_elf_select_rtx_section): Likewise.  Use get_named_section.
	(file_end_indicate_exec_stack): Use switch_to_section and get_section.
	(output_section_asm_op, switch_to_section): New functions.
	* vmsdbgout.c (vmsdbgout_finish): Use switch_to_section and
	get_named_section.

	* doc/tm.texi: Expand the introduction to the sections documentation.
	(TRAMPOLINE_SECTION): Document new interface.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(READONLY_DATA_SECTION): Delete.
	(SDATA_SECTION_ASM_OP): Document new macro.
	(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Delete.
	(TARGET_ASM_INIT_SECTIONS): Document new hook.
	(TARGET_ASM_SELECT_SECTION, TARGET_ASM_FUNCTION_RODATA_SECTION)
	(TARGET_ASM_SELECT_RTX_SECTION): Adjust for new interface.
	(TARGET_EXCEPTION_SECTION, TARGET_EH_FRAME_SECTION): Delete.

gcc/java/
	* class.c (build_utf8_ref, emit_register_classes): Use
	switch_to_section and get_section.

From-SVN: r108152
2005-12-07 07:53:14 +00:00
Devang Patel d6b27b56a2 re PR debug/23205 ([C++/unit-at-a-time] stabs debug info omitted for global const variables)
PR Debug/23205
       * dbxout.c (dbxout_symbol): Check DECL_RTL_SET_P, after
       handling constants. Check NAMESPACE_DECL context for constants.

       * g++.dg/other/PR23205.C: New.

From-SVN: r105028
2005-10-05 17:47:21 -07:00
Richard Henderson 4e0e2698b0 re PR debug/23806 (-gstabs with VLAs does not work)
PR debug/23806
        * dbxout.c (dbxout_expand_expr): New.
        (dbxout_symbol): Use it.

From-SVN: r104129
2005-09-10 14:10:42 -07:00
Richard Henderson 9bfa80fb88 dbxout.c: Include expr.h.
* dbxout.c: Include expr.h.
        (dbxout_global_decl): Don't suppress for DECL_RTL unset.
        (dbxout_symbol): Handle DECL_VALUE_EXPR.
        * Makefile.in (dbxout.o): Add EXPR_H.
cp/
        * cp-tree.def (ALIAS_DECL): Remove.
        * cp-lang.c (cp_init_ts): Remove support for it.
        * error.c (dump_decl): Likewise.
        * name-lookup.c (pushdecl): Likewise.
        * semantics.c (finish_id_expression): Likewise.
        * decl2.c (build_anon_union_vars): Use a VAR_DECL with
        DECL_VALUE_EXPR instead.

From-SVN: r104106
2005-09-09 14:00:49 -07:00
Devang Patel f37d7c6065 * dbxout.c (dbxout_type): Check Objective-C++ lang.
From-SVN: r102181
2005-07-19 17:24:49 -07:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Gabriel Dos Reis 7973fd2aed libiberty.h (XOBFINISH): New.
libiberty/
2005-06-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        * libiberty.h (XOBFINISH): New.

gcc/
2005-06-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>

        * c-lex.c (lex_string): Use XOBFINISH.
        * collect2.c (extract_string, dump_file): Likewise.
        * dbxout.c (dbxout_finish_complex_stabs): Likewise.
        * gcc.c (init_spec, build_search_list, convert_filename,
        set_collect_gcc_options, do_spec_2, do_spec_1, main):
        * Likewise.
        * genpreds.c (write_predicate_subfunction): Likewise.
        * genflags.c (main): Likewise.
        * read-rtl.c (mode_attr_index, apply_macro_to_string,
        join_c_conditions, read_quoted_string, read_braced_string,
        read_rtx_1): Likewise.
        * stringpool.c (ggc_alloc_string): Likewise.
        * tlink.c (obstack_fgets, recompile_files): Likewise.

From-SVN: r100678
2005-06-06 21:14:31 +00:00
Ziemowit Laski 6e95543072 Yet more Objective-C++...
* c-common.h (objc_finish_try_stmt): Add.
        (objc_build_synchronized): Add.
        (objc_generate_write_barrier): Add.
        * stub-objc.c (objc_build_synchronized): Add return value.
        (objc_finish_try_stmt): Likewise.
        (objc_generate_write_barrier): Add.

        * c-common.h (objc_rewrite_function_call): Add.
        * c-typeck.c (build_function_call): Allow objc to rewrite
        FUNCTION_DECLs.
        (build_modify_expr): Allow objc to generate write barriers.
        * c.opt (Wassign-intercept): Add.
        (Wstrict-selector-match): Add.
        (fobjc-call-cxx-cdtors): Add.
        (fobjc-direct-dispatch): Add.
        (fobjc-gc): Add.
        * dbxout.c (get_lang_number): Add Objective-C++ support.
        * doc/invoke.texi (-fobjc-call-cxx-cdtors): Likewise.
        (-Wstrict-selector-match): Likewise.
        (-fobjc-direct-dispatch): Likewise.
        (-Wassign-intercept): Likewise.
        (Overall Options): Likewise.
        * gengtype.c (get_output_file_with_visibility): Likewise.
        * stub-objc.c (objc_rewrite_function_call): Add.
        * config/darwin.h (ASM_OUTPUT_LABELREF): Improved quoting support.

        * c-common.c (flag_objc_exceptions): Remove.
        (flag_objc_sjlj_exceptions): Remove.
        * c-decl.c (objc_mark_locals_volatile): Don't change decls
        that are already ok.
        * c-opts.c (c_common_handle_option, case
        OPT_fobjc_exceptions): Remove.
        (case OPT_fobjc_sjlj_exceptions): Remove
        * c.opt (fobjc-call-cxx-cdtors): Have opt create the flag.
        (fobjc-exceptions): Likewise.
        (fobjc-sjlj-exceptions): Likewise.
        * config/rs6000/darwin.h (OFFS_MSGSEND_FAST): Add.
        (OFFS_ASSIGNIVAR_FAST): Add.

From-SVN: r99858
2005-05-17 20:11:44 +00:00
Devang Patel abdafc8ef4 dbxout.c (have_used_extensions): Remove.
* dbxout.c (have_used_extensions): Remove.
      (dbxout_type_fileds, dbxout_type, dbxout_symbol): Remove use of
      have_used_extensions.

From-SVN: r98958
2005-04-28 17:27:44 -07:00
Caroline Tice c7466deed4 Correct fixes for various hot/cold partitioning concerns.
2005-04-27  Caroline Tice  <ctice@apple.com>

        * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
        Remove targetm.have_named_sections test.
        (fix_edges_for_rarely_executed_code): Likewise.
        (insert_section_boundary_note): Likewise.
        (reorder_basic_blocks): Check partitioning flag before calling
        verify_hot_cold_block_grouping.
        * dbxout.c (dbxout_function_end): Get hot/cold section labels from
        the function struct rather than global variables.
        * dwarf2out.c (COLD_TEXT_SECTION_LABEL): New macro.
        (COLD_END_LABEL): Likewise
        (cold_text_section_label): New static global variable.
        (cold_end_label): Likewise.
        (dwarf2out_switch_text_section): Get hot/cold section labels from
        the function struct rather than global variables; test to make sure
        cfun is defined.
        (output_aranges): Use cold_text_section_label and cold_end_label;
        check partitioning flag before putting out delta.
        (output_ranges): Remove incorrect code attempting to use
        hot/cold labels.
        (output_line_info): Get cold section label from function struct; test
        to make sure cfun is defined.
        (add_location_or_const_value_attribute): Likewise.
        (dwarf2out_var_location): Likewise.
        (dwarf2out_init): Generate cold_text_section_label and cold_end_label;
        write out cold_text_section_label if partition flag is set.
        (dwarf2out_finish): Write out cold_end_label if partition flag is set;
        * function.h (struct function): Add new fields to point to hot/cold
        section labels: hot_section_label, cold_section_label,
        hot_section_end_label and cold_section_end_label; also add new field
        for cold text section name, unlikely_text_section_name.
        * opts.c (decode_options): Turn off partitioning flag if
        !targetm.have_named_sections.
        * output.h (hot_section_label): Remove.
        (hot_section_end_label): Remove.
        (cold_section_end_label): Remove.
        (unlikely_section_label): Remove.
        (unlikely_text_section_name): Remove.
        * passes.c (rest_of_handle_final):  Remove extra blank line.
        * varasm.c (unlikely_section_label): Remove.
        (hot_section_label): Remove.
        (hot_section_end_label): Remove.
        (cold_section_end_label): Remove.
        (unlikely_text_section_name):  Remove.
        (initialize_cold_section_name): Modify to call
        targetm.strip_name_encoding; to store cold section name in current
        function struct, if it exists; and to only use the decl_section_name
        if flag_named_sections is true.
        (unlikely_text_section): Modify to get section name out of current
        function struct, if there is one; otherwise build it from
        UNLIKELY_EXECUTED_TEXT_SECTION_NAME.
        (in_unlikely_text_section): Likewise.
        (named_section): Modify to get/put cold section name in current function
        struct, if there is one.
        (function_section):  Change 'bool unlikely' to 'int reloc'; check
        targetm.have_named_sections before calling named_section.
        (current_function_section): Likewise.
        (assemble_start_function): Modify to get/put unlikely_text_section_name
        in current function struct; modify to get hot/cold section labels
        from function struct; initialize labels using
        ASM_GENERATE_INTERNAL_LABEL;
        test partitioning flag before writing out hot section label.
        (assemble_end_function): Test partitioning flag before writing out
        hot/cold section labels.
        (default_section_type_flags_1):  Get cold text section name from
        function struct if there is one; Set flags correctly for
        cold text section if there is not a current function struct.

From-SVN: r98885
2005-04-27 14:35:20 -07:00
Devang Patel b9f8dfba42 * dbxout.c (dbxout_type): Check use_gnu_debug_info_extensions.
From-SVN: r98836
2005-04-27 08:36:19 -07:00
Devang Patel 1f4ea3f2fa dbxout.c (dbxout_type): Emit attribute vector.
* dbxout.c (dbxout_type): Emit attribute vector.
        * gcc.dg/stabs-attrib-vect-darwin.c: New test.

From-SVN: r98737
2005-04-25 13:26:00 -07:00
Nathan Sidwell d4e6fecb8f vec.h: Update API to separate allocation mechanism from type.
* vec.h: Update API to separate allocation mechanism from type.
	(VEC_safe_grow): New.
	* vec.c (calculate_allocation): New.
	(vec_gc_o_reserve, vec_heap_o_reserve): Adjust.
	(vec_gc_free, vec_heap_free): Remove.
	* gengtype-lex.l (DEF_VEC_): Process mult-argument macros.  Adjust.
	(VEC): Likewise.
	(mangle_macro_name): New.
	(struct macro_def): New.
	(struct macro): Add multiple argument values.
	(macro_expans_end): New.
	(push_macro_expansion):  Chain on new macro. Process multiple
	args, create follow on expansion. Return follow on argument.
	(macro_input): Deal with multiple arguments.

	* tree.h: Define VEC(tree,heap) and VEC(tree,gc).
	(struct tree_binfo): Adjust.
	* basic-block.h: Define VEC(edge,gc).
	(struct edge_def): Adjust.
	(struct basic_block_def, struct edge_iterator): Likewise.
	(ei_container, ei_start_1, ei_last_1): Likewise.
	* cfg.c (connect_src, connect_dest): Likewise.
	* cfgrtl.c (force_nonfallthru_and_redirect)
	* dbxout.c (dbxout_type)
	* dwarf2out.c (gen_member_die)
	* lambda-code.c: Define VEC(int,gc), VEC(lambda_loop,gc).
	(gcc_tree_to_linear_expression): Adjust.
	(gcc_loop_to_lambda_loop, gcc_loopnest_to_lambda_loopnest,
	lbv_to_gcc_expression, lle_to_gcc_expression,
	lambda_loopnest_to_gcc_loopnest, can_convert_to_perfect_nest,
	perfect_nestify): Likewise.
	* lambda.h (gcc_loopnest_to_lambda_loopnest,
	lambda_loopnest_to_gcc_loopnest): Adjust prototypes.
	* profile.c (instrument_values): Adjust.
	* tree-cfg.c (modified_noreturn_calls): Adjust.
	(remove_fallthru_edge): Likewise.
	* tree-dump.c (dequeue_and_dump): Adjust.
	* tree-flow-inline.h (mark_stmt_modified): Adjust.
	* tree-flow.h (modified_noreturn_calls): Adjust.
	(tree_on_heap): Remove. (yay!)
	(register_new_def): Adjust.
	* tree-into-ssa.c: Define VEC(int,heap).
	(block_defs_stack): Adjust.
	(find_idf, insert_phi_nodes, register_new_def,
	rewrite_initialize_block, rewrite_finalize_block,
	register_new_update_single, rewrite_update_init_block,
	rewrite_update_fini_block, rewrite_blocks,
	ssa_rewrite_finalize_block, ssa_register_new_def,
	ssa_rewrite_initialize_block, rewrite_ssa_into_ssa): Likewise.
	* tree-loop-linear.c (linear_transform_loops): Adjust.
	* tree-ssa-alias.c: Define VEC(fieldoff_t,heap).
	(push_fields_onto_fieldstack, create_overlap_variables_for): Adjust.
	* tree-ssa-dom.c (avail_exprs_stack, block_defs_stack,
	stmts_to_rescan, const_and_copies_stack, nonzero_vars_stack,
	vrp_variables_stack): Adjust declarations.
	(tree_ssa_dominator_optimize): Adjust.
	(dom_opt_initialize_block, remove_local_expressions_from_table,
	restore_nonzero_vars_to_original_value,
	restore_vars_to_original_value,
	restore_currdefs_to_original_value, dom_opt_finalize_block,
	record_var_is_nonzero, record_cond, record_const_or_copy_1,
	optimize_stmt, update_rhs_and_lookup_avail_expr,
	lookup_avail_expr, record_range): Likewise.
	* tree-ssa-pre.c: Define VEC(basic_block,heap).
	(compute_antic_aux): Adjust.
	(inserted_exprs, create_expression_by_pieces,
	insert_into_preds_of_block, eliminate, mark_operand_necessary,
	remove_dead_inserted_code, fini_pre): Likewise.
	* tree-ssa-propagate.c (interesting_ssa_edges): Adjust.
	(varying_ssa_edges, add_ssa_edge, process_ssa_edge_worklist.
	ssa_prop_init): Likewise.
	* tree-ssa.c: Define VEC(bitmap,heap).
	(verify_name_tags): Adjust.
	* value-prof.c (rtl_divmod_values_to_profile): Adjust.
	(insn_prefetch_values_to_profile, rtl_find_values_to_profile,
	tree_divmod_values_to_profile, tree_find_values_to_profile,
	value_profile_transformations): Likewise.
	* value-prof.h: Define VEC(histogram_value,heap).
	* varasm.c: Remove alias_pair pointer typedef, define
	VEC(alias_pair,gc).
	(finish_aliases_1, finish_aliases_2, assemble_alias): Adjust.

	* config/pa/pa.c (typedef extern_symbol): Typedef the structure,
	not a pointer to it.  Create an object vector.
	(extern_symbols): Turn into an object vector.
	(pa_hpux_asm_output_external, pa_hpux_file_end): Adjust.

	* cp/cp-tree.h: Adjust for new VEC API.
	Define VEC(tree_pair_s,gc).
	(struct save_scope): Adjust.
	(struct lang_type_class): Adjust.
	(unemitted_tinfo_decls): Adjust.
	* cp/class.c (add_method, resort_type_method_vec,
	finish_struct_methods, struct find_final_overrider_data,
	dfs_find_final_overrider_pre, find_final_overrider,
	get_vcall_index, warn_hidden, walk_subobject_offsets,
	check_methods, fixup_inline_methods, end_of_class,
	warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
	add_vcall_offset): Adjust.
	* cp/decl.c (xref_basetypes, finish_method): Adjust.
	* cp/decl2.c (check_classfn): Adjust.
	* cp/init.c (sort_mem_initializers, push_base_cleanups): Adjust.
	* cp/method.c (do_build_copy_constructor): Adjust.
	* cp/name-lookup.c (new_class_binding, store_binding,
	store_bindings, store_class_bindings): Adjust.
	* cp/name-lookup.h: Define VEC(cxx_saved_binding,gc),
	VEC(cp_class_binding,gc).
	(struct cp_binding_level): Adjust.
	* cp/parser.c: Define VEC(cp_token_position,heap).
	(struct cp_lexer): Adjust.
	(cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
	cp_lexer_save_tokens): Adjust.
	* cp/pt.c (retrieve_specialization,
	check_explicit_specialization): Adjust.
	* cp/rtti.c (unemitted_tinfo_decls): Adjust.
	(init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
	get_pseudo_ti_desc): Adjust.
	* cp/search.c (dfs_access_in_type, lookup_conversion_operator,
	lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
	dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
	* cp/semantics.c: Define VEC(deferred_access,gc).
	(push_deferring_access_checks): Adjust.
	* cp/typeck2.c (abstract_virtuals_error): Adjust.

From-SVN: r98498
2005-04-21 09:18:28 +00:00
Andrew Haley b8621d81e8 re PR debug/21022 ([4.0 only] ICE while compiling GdkFontMetrics.class with stabs debugging)
2005-04-19  Andrew Haley  <aph@redhat.com>

        PR java/21022
        * dbxout.c (dbxout_type_fields): Check DECL_IGNORED_P before
        looking at a field's bitpos.

From-SVN: r98412
2005-04-19 15:42:13 +00:00
Caroline Tice c3c822d506 Revert patch from April 9.
From-SVN: r98039
2005-04-12 13:39:09 -07:00
Caroline Tice e5e625da47 Fix problems with labels with hot/cold partitioning.
From-SVN: r97928
2005-04-09 13:41:49 -07:00
Kazu Hirata aabcd30904 cgraphunit.c, [...]: Fix comment typos.
* cgraphunit.c, dbxout.c, flow.c, gcse.c, gimplify.c,
	lambda-code.c, loop.c, machmode.def, mips-tfile.c,
	modulo-sched.c, passes.c, postreload-gcse.c, tree-eh.c,
	tree-ssa-ccp.c, varasm.c, config/frv/frv.c, config/frv/frv.h,
	config/frv/frv.md, config/i386/i386.c, config/i386/i386.h,
	config/i386/i386.md, config/rs6000/predicates.md,
	config/rs6000/rs6000.c, config/s390/fixdfdi.h,
	config/s390/s390.c, config/stormy16/stormy16.c,
	config/stormy16/stormy16.md, config/vax/vax.md: Fix comment
	typos.

From-SVN: r97362
2005-04-01 03:42:55 +00:00
Caroline Tice 87c8b4bed3 Fix problems with hot/cold partitioning optimization.
From-SVN: r97322
2005-03-31 06:59:59 -08:00
Tom Tromey 5662a50dd8 tree.def (FILE_TYPE): Removed.
gcc:
	* tree.def (FILE_TYPE): Removed.
	* typeclass.h (enum type_class): Removed file_type_class.
	* dwarf2out.c (is_base_type): Updated.
	(gen_type_die): Likewise.
	* dbxout.c (dbxout_type): Updated.
	* builtins.c (type_to_class): Updated.
	* tree.c (type_contains_placeholder_1): Updated.
	* config/sparc/sparc.c (sparc_type_code): Updated.
	* config/ia64/ia64.c (hfa_element_mode): Updated.
	* expr.c (count_type_elements): Updated.
	* stor-layout.c (layout_type): Updated.
	* tree-inline.c (remap_type): Updated.
	* tree-pretty-print.c (dump_generic_node): Updated.
gcc/java:
	* decl.c (gnat_substitute_in_type): Don't handle FILE_TYPE.

From-SVN: r97282
2005-03-30 21:34:41 +00:00
Daniel Berlin 9e9945c5b2 c-opts.c (c_common_parse_file): Only start/end main source file if debug hooks says the writer wants it.
2005-03-22  Daniel Berlin  <dberlin@dberlin.org>

	* c-opts.c (c_common_parse_file): Only start/end main source file
	if debug hooks says the writer wants it.
	* dbxout.c (dbx_debug_hooks): Add start_end_main_source_file
	member.
	(xcoff_debug_hooks): Ditto.
	* debug.c (do_nothing_hooks): Ditto.
	* debug.h (gcc_debug_hooks): Ditto.
	* dwarf2out.c (dwarf2_debug_hooks): Ditto.
	* sdbout.c (sdb_debug_hooks): Ditto.
	* vmsdbgout.c (vmsdbg_debug_hooks): Ditto.

From-SVN: r96902
2005-03-22 23:18:43 +00:00
Ulrich Weigand 4a22dcdd52 * dbxout.c (dbxout_function_end): Emit Lscope label always.
From-SVN: r95326
2005-02-21 10:06:20 +00:00
Richard Henderson 847d0c0888 re PR debug/19521 (omitted stab for gcov initialization function)
PR debug/19521
        * dbxout.c (dbxout_function_end): Take decl parameter; update callers.
        Do nothing if debug info suppressed for this function.
        (dbxout_begin_function): Early exit if debug info suppressed for
        this function.

Co-Authored-By: Stuart Hastings <stuart@apple.com>

From-SVN: r95112
2005-02-16 11:01:29 -08:00
Eric Botcazou b950a32e34 re PR debug/19327 (gcc.c-torture/execute/921215-1.c compilation -O3 -g)
PR debug/19327
	* dbxout.c (dbxout_symbol) <FUNCTION_DECL>: Skip inline instance
	of nested functions.

From-SVN: r94709
2005-02-07 19:32:59 +00:00
Kazu Hirata f93089d26f c-common.def, [...]: Update copyright.
* c-common.def, c-dump.c, c-gimplify.c, c-objc-common.c,
	cfgexpand.c, dbxout.c, function.h, opts.c, tree-flow-inline.h,
	tree-ssa-operands.h, tree-ssa-threadupdate.c, tree-tailcall.c,
	config/avr/avr.md, config/cris/aout.h, config/cris/cris.h,
	config/mips/iris6.h, config/sh/sh.c: Update copyright.

From-SVN: r94328
2005-01-27 18:22:35 +00:00
Ulrich Weigand 9ff93eb01c dbxout.c (dbxout_symbol_location): Resolve constant pool references even for variables with NULL DECL_INITIAL.
ChangeLog:
	* dbxout.c (dbxout_symbol_location): Resolve constant pool references
	even for variables with NULL DECL_INITIAL.

testsuite/ChangeLog:
	* gcc.dg/20041216-1.c: New test.

From-SVN: r94303
2005-01-27 01:49:01 +00:00
Nathan Sidwell 08f2586c92 tree.def (SET_TYPE): Remove.
* tree.def (SET_TYPE): Remove.
	(CONSTRUCTOR): Update description.
	* builtins.c (type_to_class) Remove SET_TYPE case.
	* dbxout.c (dbxout_type): Likewise.
	* dwarf2out.c (is_base_type): Likewise.
	(gen_set_type_die): Remove.
	(gen_type_die): Remove SET_TYPE case.
	* expr.c (count_type_elements): Likewise.
	(mostly_zeroes_p): Likewise.
	(store_constructor): Likewise.
	* print_tree.c (print_node): Likewise.
	* stor-layout.c (layout_type): Likewise.
	* tree-browser.c (browse_tree): Likewise.
	* tree-inline.c (remap_type): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree.c (type_contains_plaeholder_1, type_hash_eq,
	variably_modified_type_p, initializer_zerop): Likewise.
	* tree.h (SET_OR_ARRAY_CHECK): Remove.
	(AGGREGATE_TYPE_P): Remove SET_TYPE check.
	(TYPE_DOMAIN): Use ARRAY_TYPE_CHECK.
	* typeclass.h (enum type_class): Remove set_type_class.
	* varasm.c (const_hash_1): Remove SET_TYPE case.
	(compare_constant, copy_constant, output_constant): Likewise.
	* config/i386/i386.c (classify_argument): Likewise.
	* config/ia64/ia64.c (hfa_element_mode): Likewise.
	* config/sparc/sparc.c (sparc_type_code): Likewise.

	* ada/decl.c (gnat_substitute_in_type): Remove SET_TYPE case.

From-SVN: r91931
2004-12-09 10:54:50 +00:00