summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
Commit message (Collapse)AuthorAgeFilesLines
* 2009-06-05 Richard Guenther <rguenther@suse.de>rguenth2009-06-051-1/+1
| | | | | | | | | PR bootstrap/40350 * dwarf2out.c (dwarf2out_begin_function): Mark discriminator as possibly unused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148206 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (deferred_asm_name): New.aoliva2009-06-051-3/+64
| | | | | | | | | | | | (add_name_and_src_coords_attributes): Defer creation of DW_AT_MIPS_linkage_name attribute if DECL_ASSEMBLER_NAME was not computed yet. (move_linkage_attr): New. (dwarf2out_finish): Revisit deferrals and emit attributes at the right place. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148199 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct basic_block_def): Add discriminator field.ccoutant2009-06-041-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbxout.c (dbxout_source_line): Add new parameter. Change all callers. * debug.c (do_nothing_debug_hooks): Add additional entry. (debug_nothing_int_charstar_int): New function. * debug.h (struct gcc_debug_hooks): Add parameter to source_line hook. (debug_nothing_int_charstar_int): New declaration. * dwarf2out.c (dwarf2out_source_line): Add new parameter. Write discriminator value in .loc directive. * final.c (last_discriminator): New variable. (discriminator): New variable. (final_start_function): Initialize above variables, pass current discriminator to debug hook. (notice_source_line): Check for discriminator change. * gimple-pretty-print.c (dump_bb_header): Print discriminator value. * sdbout.c (sdbout_source_line): New parameter. * tree-cfg.c (struct locus_discrim_map): New structure type. (discriminator_per_locus): New hash table. (build_gimple_cfg): Allocate and free discriminator hash table. (make_edges): Call assign_discriminator. (locus_map_hash): New function. (locus_map_eq): New function. (next_discriminator_for_locus): New function. (same_line_p): New function. (assign_discriminator): New function. (make_cond_expr_edges): Call assign_discriminator. (make_gimple_switch_edges): Likewise. (first_non_label_stmt): New function. * vmsdbgout.c (vmsdbgout_source_line): Add new parameter. Change all callers. * xcoffout.c (xcoffout_source_line): Add new parameter. * configure.ac (gcc_cv_as_discriminator): New configury check for gas support for discriminator. * configure: Regenerate. * config.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148191 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (output_cfi_directive): Pass 1 instead ofjakub2009-06-031-8/+8
| | | | | | | 0 to second argument of DWARF2_FRAME_REG_OUT macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148137 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (dwarf2out_cfi_label): Add FORCE argument, if true,jakub2009-06-011-11/+60
| | | | | | | | | | | | | | | | | | force output of the label even for dwarf2out_do_cfi_asm. (add_fde_cfi): If -g2 and above and cfi might change CFA, force creation of CFI label and chain DW_CFA_set_loc jumping to it for convert_cfa_to_fb_loc_list. Adjust other dwarf2out_cfi_label caller. (dwarf2out_stack_adjust, dwarf2out_frame_debug, dwarf2out_begin_epilogue, dwarf2out_frame_debug_restore_state): Adjust dwarf2out_cfi_label callers. * tree.h (dwarf2out_cfi_label): Adjust prototype. * config/arm/arm.c (thumb_pushpop, thumb1_output_function_prologue): Adjust dwarf2out_cfi_label callers. * config/vax/vax.c (vax_output_function_prologue): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148066 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgcleanup.c (try_crossjump_to_edge): Only skip pastrth2009-05-301-27/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE_INSN_BASIC_BLOCK. * cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks. Duplicate NOTE_INSN_EPILOGUE_BEG notes. * cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG to be deleted. * dwarf2out.c (struct cfa_loc): Change indirect field to bitfield, add in_use field. (add_cfi): Disable check redefining cfa away from drap. (lookup_cfa_1): Add remember argument; handle remember/restore. (lookup_cfa): Pass remember argument. (cfa_remember): New. (compute_barrier_args_size_1): Remove sibcall check. (dwarf2out_frame_debug_def_cfa): New. (dwarf2out_frame_debug_adjust_cfa): New. (dwarf2out_frame_debug_cfa_offset): New. (dwarf2out_frame_debug_cfa_register): New. (dwarf2out_frame_debug_cfa_restore): New. (dwarf2out_frame_debug): Handle REG_CFA_* notes. (dwarf2out_begin_epilogue): New. (dwarf2out_frame_debug_restore_state): New. (dw_cfi_oprnd1_desc): Handle DW_CFA_remember_state, DW_CFA_restore_state. (output_cfi_directive): Likewise. (convert_cfa_to_fb_loc_list): Likewise. (dw_cfi_oprnd1_desc): Handle DW_CFA_restore. * dwarf2out.h: Update. * emit-rtl.c (try_split): Don't split RTX_FRAME_RELATED_P. (copy_insn_1): Early out for null. * final.c (final_scan_insn): Call dwarf2out_begin_epilogue and dwarf2out_frame_debug_restore_state. * function.c (prologue, epilogue, sibcall_epilogue): Remove. (prologue_insn_hash, epilogue_insn_hash): New. (free_after_compilation): Adjust freeing accordingly. (record_insns): Create hash table if needed; push insns into hash instead of array. (maybe_copy_epilogue_insn): New. (contains): Search hash table instead of array. (sibcall_epilogue_contains): Remove. (thread_prologue_and_epilogue_insns): Split eh_return insns and mark them as epilogues. (reposition_prologue_and_epilogue_notes): Rewrite epilogue scanning in terms of basic blocks. * insn-notes.def (CFA_RESTORE_STATE): New. * jump.c (returnjump_p_1): Accept EH_RETURN. (eh_returnjump_p_1, eh_returnjump_p): New. * reg-notes.def (CFA_DEF_CFA, CFA_ADJUST_CFA, CFA_OFFSET, CFA_REGISTER, CFA_RESTORE): New. * rtl.def (EH_RETURN): New. * rtl.h (eh_returnjump_p, maybe_copy_epilogue_insn): Declare. * config/bfin/bfin.md (UNSPEC_VOLATILE_EH_RETURN): Remove. (eh_return_internal): Use eh_return rtx; split w/ epilogue. * config/i386/i386.c (gen_push): Update cfa state. (pro_epilogue_adjust_stack): Add set_cfa argument. When true, add a CFA_ADJUST_CFA note. (ix86_dwarf_handle_frame_unspec): Remove. (ix86_expand_prologue): Update cfa state. (ix86_emit_restore_reg_using_pop): New. (ix86_emit_restore_regs_using_pop): New. (ix86_emit_leave): New. (ix86_emit_restore_regs_using_mov): Add CFA_RESTORE notes. (ix86_expand_epilogue): Add notes for unwinding the epilogue. * config/i386/i386.h (struct machine_cfa_state): New. (ix86_cfa_state): New. * config/i386/i386.md (UNSPEC_EH_RETURN): Remove. (eh_return_internal): Merge from eh_return_<mode>, use eh_return rtx, split w/ epilogue. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147995 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix for PR debug/40109dodji2009-05-181-0/+6
| | | | | | | | | | | | | | | gcc/ChangeLog: PR debug/40109 * dwarf2out.c (gen_type_die_with_usage): Generate the DIE as a child of the containing namespace's DIE. gcc/testsuite/ChangeLog: PR debug/40109 * g++.dg/debug/dwarf2/nested-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147674 138bc75d-0d04-0410-961f-82ee72b054a4
* * dbxout.c (dbxout_range_type): Add LOW and HIGH parameters. Use themebotcazou2009-05-151-68/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for bounds. (print_int_cst_bounds_in_octal_p): Likewise. (dbxout_type): Adjust calls to above functions. Be prepared to deal with subtypes. * dwarf2out.c (base_type_die): Likewise. (is_subrange_type): Delete. (subrange_type_die): Add LOW and HIGH parameters. Use them for bounds. (modified_type_die): Call subrange_type_for_debug_p on subtypes. * fold-const.c (fold_truth_not_expr) <CONVERT_EXPR>: Do not strip it if the destination type is boolean. (build_range_check): Do not special-case subtypes. (fold_sign_changed_comparison): Likewise. (fold_unary): Likewise. * langhooks-def.h (LANG_HOOKS_GET_SUBRANGE_BOUNDS): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add LANG_HOOKS_GET_SUBRANGE_BOUNDS. * langhooks.h (lang_hooks_for_types): Add get_subrange_bounds. * tree.c (subrange_type_for_debug_p): New predicate based on the former is_subrange_type. * tree.h (subrange_type_for_debug_p): Declare. * tree-chrec.c (avoid_arithmetics_in_type_p): Delete. (convert_affine_scev): Remove call to above function. (chrec_convert_aggressive): Likewise. * tree-ssa.c (useless_type_conversion_p_1): Do not specifically return false for conversions involving subtypes. * tree-vrp.c (vrp_val_max): Do not special-case subtypes. (vrp_val_min): Likewise. (needs_overflow_infinity): Likewise. (extract_range_from_unary_expr): Likewise. ada/ * gcc-interface/ada-tree.h (TYPE_GCC_MIN_VALUE, TYPE_GCC_MAX_VALUE): New macros. (TYPE_RM_VALUES): Likewise. (TYPE_RM_SIZE): Rewrite in terms of TYPE_RM_VALUES. (SET_TYPE_RM_SIZE): New macro. (TYPE_RM_MIN_VALUE, TYPE_RM_MAX_VALUE): Likewise. (SET_TYPE_RM_SIZE, SET_TYPE_RM_MAX_VALUE): Likewise. (TYPE_MIN_VALUE, TYPE_MAX_VALUE): Redefine. * gcc-interface/gigi.h (create_range_type): Declare. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type> Use SET_TYPE_RM_MAX_VALUE to set the upper bound on the UMT type. <E_Signed_Integer_Subtype>: Build a regular integer type first and then set the RM bounds. Use SET_TYPE_RM_SIZE to set the RM size. <E_Floating_Point_Subtype>: Build a regular floating-point type first and then set the RM bounds. <E_Array_Type>: Use create_range_type instead of build_range_type. <E_Array_Subtype>: Build a regular integer type first and then set the RM bounds for the extra subtype. <E_String_Literal_Subtype>: Use create_range_type instead of build_range_type. <all>: Set the RM bounds for enumeration types and the GCC bounds for floating-point types. (set_rm_size): Use SET_TYPE_RM_SIZE to set the RM size. (make_type_from_size) <INTEGER_TYPE>: Use SET_TYPE_RM_{MIN,MAX}_VALUE to set the bounds. Use SET_TYPE_RM_SIZE to set the RM size. (substitute_in_type) <INTEGER_TYPE>: Deal with GCC bounds for domain types and with RM bounds for subtypes. * gcc-interface/misc.c (LANG_HOOKS_GET_SUBRANGE_BOUNDS): Define. (gnat_print_type) <REAL_TYPE>: New case. <ENUMERAL_TYPE>: Fall through to above case. (gnat_get_subrange_bounds): New function. * gcc-interface/trans.c (add_decl_expr): Mark the trees rooted as TYPE_RM_MIN_VALUE and TYPE_RM_MAX_VALUE, if any. * gcc-interface/utils.c (gnat_init_decl_processing): Use precision 8 for booleans. Adjust and use SET_TYPE_RM_SIZE to set the RM size. (create_range_type): New function. (create_param_decl): Build a regular integer type first and then set the RM bounds for the extra subtype. (unchecked_convert): Remove kludge for 'Valid. * gcc-interface/utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Convert the index to sizetype instead of TYPE_DOMAIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147563 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (new_reg_loc_descr): Don't ever create DW_OP_regX.jakub2009-05-061-12/+36
| | | | | | | | | | (one_reg_loc_descriptor): Create DW_OP_regX here instead of calling new_reg_loc_descr. (loc_by_reference): If loc is DW_OP_regX, change it into DW_OP_bregX 0 instead of appending DW_OP_deref*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147187 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h: Remove DECL_BY_REFERENCE from private_flag comment.jakub2009-05-051-12/+5
| | | | | | | | | | | | | | | | (struct tree_base): Adjust spacing for 8 bit boundaries. (struct tree_decl_common): Add decl_by_reference_flag bit. (DECL_BY_REFERENCE): Adjust. * print-tree.c (print_node): For VAR_DECL, PARM_DECL or RESULT_DECL, print DECL_BY_REFERENCE bit. * dbxout.c (DECL_ACCESSIBILITY_CHAR): Revert last change. * dwarf2out.c (loc_by_reference, gen_decl_die): Check DECL_BY_REFERENCE for all VAR_DECLs, not just non-static ones. (gen_variable_die): Likewise. Check TREE_PRIVATE/TREE_PROTECTED unconditionally. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147135 138bc75d-0d04-0410-961f-82ee72b054a4
* ./:ian2009-04-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * collect2.c (is_ctor_dtor): Change type of ret field in struct names to symkind. * dce.c (run_fast_df_dce): Change type of old_flags to int. * df-core.c (df_set_flags): Change return type to int. Change type of old_flags to int. (df_clear_flags): Likewise. * df-scan.c (df_def_record_1): Change 0 to VOIDmode. (df_get_conditional_uses): Likewise. * df.h (df_set_flags, df_clear_flags): Update declarations. * dwarf2out.c (struct indirect_string_node): Change type of form field to enum dwarf_form. (AT_string_form): Change return type to enum dwarf_form. * fixed-value.c (fixed_compare): Add cast to enum type. * fwprop.c (update_df): Change 0 to VOIDmode. * gensupport.c: Change 0 to UNKNOWN. * gimple.h (gimple_cond_code): Add cast to enum type. * haifa-sched.c (reemit_notes): Add cast to enum type. * hooks.c (hook_int_void_no_regs): Remove function. * hooks.h (hook_int_void_no_regs): Remove declaration. * optabs.c (expand_widen_pattern_expr): Change 0 to VOIDmode. * predict.c (combine_predictions_for_insn): Add casts to enum type. * real.c (real_arithmetic): Add cast to enum type. (real_compare): Likewise. * target.h (struct gcc_target): Change return type of branch_target_register_class to enum reg_class. * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define as default_branch_target_register_class. * targhooks.c (default_branch_target_register_class): New function. * targhooks.h (default_branch_target_register_class): Declare. * tree-data-ref.c (print_direction_vector): Add cast to enum type. * tree-vect-data-refs.c (vect_supportable_dr_alignment): Remove cast to int. * tree-vect-loop.c (vect_create_epilog_for_reduction): Change 0 to ERROR_MARK. * tree-vect-slp.c (vect_build_slp_tree): Change 0 to vect_uninitialized_def. Change 0 to ERROR_MARK. * tree-vect-stmts.c (supportable_widening_operation): Don't initialize icode1 and icode2. * tree-vectorizer.h (enum vect_def_type): Add vect_uninitialized_def. * config/sol2-c.c (cmn_err_length_specs): Change 0 to FMT_LEN_none and to STD_C89. (cmn_err_flag_specs): Change 0 to STD_C89. (cmn_err_char_table): Likewise. * config/arm/arm.c (get_arm_condition_code): Change type of code to enum arm_cond_code. (IWMMXT_BUILTIN): Change 0 to UNKNOWN. (IWMMXT_BUILTIN2): Likewise. (neon_builtin_type_bits): Don't define typedef. (neon_builtin_datum): Change type of bits field to int. (arm_expand_neon_args): Add cast to enum type. * config/ia64/ia64.c (tls_symbolic_operand_type): Change 0 to TLS_MODEL_NONE. * config/i386/i386.c (bdesc_multi_arg): Change 0 to UNKNOWN. Add casts to enum type. * config/mips/mips.c (LOONGSON_BUILTIN_ALIAS): Change 0 to MIPS_FP_COND_f. * config/mips/mips.md (jal_macro): Return enum constant. (single_insn): Likewise. * config/rs6000/rs6000.c (bdesc_altivec_preds): Change 0 to CODE_FOR_nothing. * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add casts to enum type. * config/s390/s390.c (s390_tune_flags): Change type to int. (s390_arch_flags): Likewise. (s390_handle_arch_option): Change flags field of struct pta to int. * config/s390/s390.h (s390_tune_flags): Update declaration. (s390_arch_flags): Likewise. * config/sh/sh.c (prepare_move_operands): Compare tls_symbolic_operand result with enum constant. (sh_reorg): Change PUT_MODE to PUT_REG_NOTE_KIND. (sh_expand_prologue): Add cast to enum type. (sh_expand_epilogue): Likewise. (tls_symbolic_operand): Change return type to enum tls_model. (fpscr_set_from_mem): Add cast to enum type. (legitimize_pic_address): Compare tls_symbolic_operand result with enum constant. (sh_target_reg_class): Change return type to enum reg_class. * config/sh/sh.h (OVERRIDE_OPTIONS): Change CPU_xxx to PROCESSOR_xxx. * config/sh/sh-protos.h (tls_symbolic_operand): Update declaration. * config/sparc/sparc.c (sparc_override_options): Add cast to enum type. * config/sparc/sparc.md (empty_delay_slot): Return enum constant. (pic, calls_alloca, calls_eh_return, leaf_function): Likewise. (delayed_branch, tls_call_delay): Likewise. (eligible_for_sibcall_delay): Likewise. (eligible_for_return_delay): Likewise. * config/spu/spu.c (expand_builtin_args): Add cast to enum type. (spu_expand_builtin_1): Likewise. * c-typeck.c (convert_for_assignment): Issue -Wc++-compat warnings for all types of conversions. (output_init_element): Issue -Wc++-compat warning if needed when initializing a bitfield with enum type. * c-parser.c (c_parser_expression): Set original_type to original_type of right hand operand of comman operator. cp/: * semantics.c (finish_omp_clauses): Change type of c_kind to enum omp_clause_code. fortran/: * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum type. * trans-io.c (st_parameter_field): Add casts to enum type. java/: * builtins.c (java_builtins): Add casts to enum type. * verify-impl.c (check_class_constant): Add cast to enum type. (check_constant, check_wide_constant): Likewise. objc/: * objc-act.c (objc_gimplify_expr): Add casts to enum type. testsuite/: * gcc.dg/Wcxx-compat-5.c: New testcase. * gcc.dg/Wcxx-compat-6.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146855 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (loc_descr_plus_const): New function.jakub2009-04-261-45/+51
| | | | | | | | | (build_cfa_aligned_loc, tls_mem_loc_descriptor, mem_loc_descriptor, loc_descriptor_from_tree_1, descr_info_loc, gen_variable_die): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146809 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (DECL_BY_REFERENCE): Note that it is also valid forjakub2009-04-261-5/+16
| | | | | | | | | | | | | | | | | | | !TREE_STATIC VAR_DECLs. * dwarf2out.c (loc_by_reference, gen_decl_die): Handle DECL_BY_REFERENCE on !TREE_STATIC VAR_DECLs. (gen_variable_die): Likewise. Don't look at TREE_PRIVATE if DECL_BY_REFERENCE is valid. * dbxout.c (DECL_ACCESSIBILITY_CHAR): Don't look at TREE_PRIVATE for PARM_DECLs, RESULT_DECLs or !TREE_STATIC VAR_DECLs. * tree-nested.c (get_nonlocal_debug_decl, get_local_debug_decl): Copy DECL_BY_REFERENCE. (struct nesting_copy_body_data): New type. (nesting_copy_decl): New function. (finalize_nesting_tree_1): Remap types of debug_var_chain variables, if they have variable length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146808 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/:ian2009-04-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. (record_dead_and_set_regs): Likewise. * df.h (struct df_mw_hardreg): Change flags field to int. (struct df_base_ref): Likewise. (struct df): Change changeable_flags field to int. * df-scan.c (df_defs_record): Change clobber_flags to int. * dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum constants rather than #define macros. (enum dwarf_attribute, enum dwarf_location_atom): Likewise. (enum dwarf_type, enum dwarf_endianity_encoding): Likewise. (enum dwarf_calling_convention): Likewise. (enum dwarf_line_number_x_ops): Likewise. (enum dwarf_call_frame_info): Likewise. (enum dwarf_source_language): Likewise. * dwarf2out.c (int_loc_descriptor): Add cast to enum type. (add_calling_convention_attribute): Likewise. * fold-const.c (fold_undefer_overflow_warnings): Add cast to enum type. (combine_comparisons): Change compcode to int. Add cast to enum type. * genrecog.c (maybe_both_true_2): Change c to int. (write_switch): Likewise. Add cast to enum type. * gimplify.c (gimplify_omp_for): Handle return values from gimplify_expr using MIN rather than bitwise or. (gimplify_expr): Add cast to enum type. * ipa-prop.c (update_jump_functions_after_inlining): Change IPA_BOTTOM to IPA_JF_UNKNOWN. * ira.c (setup_class_subset_and_memory_move_costs): Change mode to int. Add casts to enum type. (setup_cover_and_important_classes): Change cl to int. Add casts to enum type. (setup_class_translate): Change cl and mode to int. (ira_init_once): Change mode to int. (free_register_move_costs): Likewise. (setup_prohibited_mode_move_regs): Add casts to enum type. * langhooks.c (add_builtin_function_common): Rework assertion that value fits bitfield. * mcf.c (add_fixup_edge): Change type parameter to edge_type. * omega.c (omega_do_elimination): Avoid math on enum types. * optabs.c (expand_vec_shift_expr): Remove casts to int. * opts.c (set_debug_level): Change 2 to enum constant. Use new int local to handle integral_argment value. * regmove.c (try_auto_increment): Change PUT_MODE to PUT_REG_NOTE_KIND. * reload.c (push_secondary_reload): Add casts to enum type. (secondary_reload_class, find_valid_class): Likewise. * reload1.c (emit_input_reload_insns): Likewise. * rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise. * sel-sched.c (init_hard_regs_data): Change cur_mode to int. * sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum constant. * tree.c (build_common_builtin_nodes): Add casts to enum type. * tree-complex.c (complex_lattice_t): Typedef to int rather than enum type. (expand_complex_libcall): Add casts to enum type. * tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant. * tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code with ERROR_MARK, not NUM_TREE_CODES. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Don't initialize epiloc_reduc_code. When not using it, set it to ERROR_MARK rather than NUM_TREE_CODES. * tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to enum machine_mode. * tree-vect-stmts.c (new_stmt_vec_info): Change 0 to vect_unused_in_loop. Change 0 to loop_vect. * tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum type. * var-tracking.c (get_init_value): Change return type to enum var_init_status. * vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T. * config/arm/arm.c (fp_model_for_fpu): Change to array to enum arm_fp_model. (arm_override_options): Add casts to enum type. (arm_emit_tls_decoration): Likewise. * config/i386/i386.c (ix86_function_specific_restore): Add casts to enum type. * config/i386/i386-c.c (ix86_pragma_target_parse): Likewise. * config/ia64/ia64.c (ia64_expand_compare): Change magic to int. * config/rs6000/rs6000.c (rs6000_override_options): Add casts to enum type. * config/s390/s390.c (code_for_builtin_64): Change to array of enum insn_code. (code_for_builtin_31): Likewise. (s390_expand_builtin): Change code_for_builtin to enum insn_code const *. * config/sparc/sparc.c (sparc_override_options): Change value field in struct code_model to enum cmodel. In initializer change 0 to NULL and add cast to enum type. * c-typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. Issue a -Wc++-compat warning using lhs_origtype if necessary. (convert_for_assignment): Issue -Wc++-compat warnings about invalid conversions to enum type on assignment. * c-common.h (build_modify_expr): Update declaration. gcc/cp/: * call.c (build_temp): Change 0 to enum constant. * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum type. * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type. * decl2.c (constrain_visibility): Likewise. * parser.c (cp_lexer_get_preprocessor_token): Likewise. (cp_parser_flags): Typedef to int rather than enum type. (cp_parser_expression_stack_entry): Change prec field to enum cp_parser_prec. * typeck.c (build_modify_expr): Add lhs_origtype parameter. Change all callers. gcc/fortran/: * gfortran.h (enum gfc_symbol_type): New named enum type, broken out of struct gfc_symbol. (struct gfc_symbol): Use enum gfc_symbol_type. (enum gfc_array_ref_dimen_type): New named enum type, broken out of struct gfc_array_ref). (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type. (mod_pointee_as): Update declaration. * decl.c (add_global_entry): Change type to enum gfc_symbol_type. (gfc_mod_pointee_as): Change return type to "match". * module.c (mio_array_ref): Add cast to enum type. (mio_symbol): Likewise. * resolve.c (resolve_global_procedure): Change type to enum gfc_symbol_type. * trans-io.c (gfc_build_st_parameter): Change type to unsigned int. gcc/java/: * jcf-parse.c (handle_constant): Add cast to enum type. gcc/objc/: * objc-act.c (get_super_receiver): Update calls to build_modify_expr to pass new argument. gcc/testsuite/: * gcc.dg/Wcxx-compat-4.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146735 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-21 Taras Glek <tglek@mozilla.com>dnovillo2009-04-221-46/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/hashtab.h: Update GTY annotations to new syntax * include/splay-tree.h: Likewise gcc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * alias.c: Update GTY annotations to new syntax * basic-block.h: Likewise * bitmap.h: Likewise * c-common.h: Likewise * c-decl.c: Likewise * c-parser.c: Likewise * c-pragma.c: Likewise * c-tree.h: Likewise * cfgloop.h: Likewise * cgraph.h: Likewise * config/alpha/alpha.c: Likewise * config/arm/arm.h: Likewise * config/avr/avr.h: Likewise * config/bfin/bfin.c: Likewise * config/cris/cris.c: Likewise * config/darwin.c: Likewise * config/frv/frv.c: Likewise * config/i386/i386.c: Likewise * config/i386/i386.h: Likewise * config/i386/winnt.c: Likewise * config/ia64/ia64.h: Likewise * config/iq2000/iq2000.c: Likewise * config/mips/mips.c: Likewise * config/mmix/mmix.h: Likewise * config/pa/pa.c: Likewise * config/pa/pa.h: Likewise * config/rs6000/rs6000.c: Likewise * config/s390/s390.c: Likewise * config/sparc/sparc.c: Likewise * config/xtensa/xtensa.c: Likewise * cselib.h: Likewise * dbxout.c: Likewise * dwarf2out.c: Likewise * except.c: Likewise * except.h: Likewise * fixed-value.h: Likewise * function.c: Likewise * function.h: Likewise * gimple.h: Likewise * integrate.c: Likewise * optabs.c: Likewise * output.h: Likewise * real.h: Likewise * rtl.h: Likewise * stringpool.c: Likewise * tree-data-ref.c: Likewise * tree-flow.h: Likewise * tree-scalar-evolution.c: Likewise * tree-ssa-address.c: Likewise * tree-ssa-alias.h: Likewise * tree-ssa-operands.h: Likewise * tree.c: Likewise * tree.h: Likewise * varasm.c: Likewise * varray.h: Likewise * vec.h: Likewise * coretypes.h: Do not define GTY macro if it is already defined * doc/gty.texi: Update GTY documentation to new syntax * gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs * gengtype-parse.c: Likewise gcc/ada/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * gcc-interface/ada-tree.h: Update GTY annotations to new syntax * gcc-interface/trans.c: Likewise * gcc-interface/utils.c: Likewise gcc/cp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * cp-tree.h: Update GTY annotations to new syntax * decl.c: Likewise * mangle.c: Likewise * name-lookup.c: Likewise * name-lookup.h: Likewise * parser.c: Likewise * pt.c: Likewise * rtti.c: Likewise * semantics.c: Likewise * typeck2.c: Likewise gcc/fortran/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * f95-lang.c: Update GTY annotations to new syntax * trans-intrinsic.c: Likewise * trans-io.c: Likewise * trans.h: Likewise gcc/java/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * builtins.c: Update GTY annotations to new syntax * decl.c: Likewise * java-tree.h: Likewise * jcf.h: Likewise * lang.c: Likewise gcc/objc/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * objc-act.c: Update GTY annotations to new syntax * objc-act.h: Likewise libcpp/ChangeLog 2009-04-21 Taras Glek <tglek@mozilla.com> * include/cpp-id-data.h: Update GTY annotations to new syntax * include/cpplib.h: Likewise * include/line-map.h: Likewise * include/symtab.h: Likewise git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146607 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/:ian2009-04-201-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix enum conversions which are invalid in C++: * auto-inc-dec.c (attempt_change): Change 0 to SET in function call. * calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function call. * cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call. * dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type. * dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function call. (dbxout_parms): Likewise. * df-core.c (df_set_flags): Change changeable_flags parameter to int. (df_clear_flags): Likewise. * df-problems.c (df_rd_bb_local_compute_process_def): Change top_flag parameter to int. (df_chain_create_bb_process_use): Likewise. (df_chain_add_problem): Change chain_flags parameter to unsigned int. Remove cast. * df-scan.c (df_ref_create): Change ref_flags parameter to int. (df_ref_create_structure, df_def_record_1): Likewise. (df_defs_record, df_uses_record, df_get_call_refs): Likewise. (df_notes_rescan): Change 0 to VOIDmode in function call. (df_get_call_refs, df_insn_refs_collect): Likewise. (df_bb_regs_collect): Likewise. (df_entry_block_defs_collect): Likewise. (df_exit_block_uses_collect): Likewise. * df.h: Update declarations. * double-int.c (double_int_divmod): Add cast to enum type. * dse.c (replace_inc_dec): Reverse parameters to gen_int_mode. * dwarf2out.c (new_reg_loc_descr): Add casts to enum type. (based_loc_descr): Likewise. (loc_descriptor_from_tree_1): Change first_op and second_op to enum dwarf_location_atom. Add cast to enum type. * expmed.c (init_expmed): Change 0 to SET in function call. * expr.c (init_expr_target): Change 0 to VOIDmode in function call. (expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call. (do_store_flag): Likewise. * fixed-value.h (struct fixed_value): Change mode to enum machine_mode. * function.c (assign_parms): Change 0 to VOIDmode in function call. * genautomata.c (insert_automaton_decl): Change 1 to INSERT in function call. (insert_insn_decl, insert_decl, insert_state): Likewise. (automata_list_finish): Likewise. * genrecog.c (process_define_predicate): Add cast to enum type. * gensupport.c (init_predicate_table): Add cast to enum type. * gimple.c (gimple_build_return): Change 0 to ERROR_MARK in function call. (gimple_build_call_1, gimple_build_label): Likewise. (gimple_build_goto, gimple_build_asm_1): Likewise. (gimple_build_switch_1, gimple_build_cdt): Likewise. * gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function call. (enum fallback): Rename from enum fallback_t. (fallback_t): Typedef as int. * gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to GSI_SAME_STMT in function call. * ira.c (setup_class_subset_and_memory_move_costs): Add casts to enum type. (setup_reg_class_relations): Likewise. (setup_reg_class_nregs): Change cl to int. Add casts to enum type. (setup_prohibited_class_mode_regs): Add cast to enum type. (setup_prohibited_mode_move_regs): Likewise. * ira-costs.c (record_reg_classes): Change rclass to enum reg_class. (record_address_regs): Change i to enum reg_class. * lists.c (alloc_EXPR_LIST): Add cast to enum type. * machmode.h (GET_MODE_CLASS): Cast value to enum mode_class. (GET_MODE_WIDER_MODE): Cast value to enum machine_mode. (GET_MODE_2XWIDER_MODE): Likewise. (GET_CLASS_NARROWEST_MODE): Likewise. * omp-low.c (expand_omp_for): Add cast to enum type. * optabs.c (debug_optab_libfuncs): Add casts to enum type. * opts.c (enable_warning_as_error): Change kind to diagostic_t. * postreload.c (reload_cse_simplify_operands): Change rclass local to enum reg_class. * predict.c (combine_predictions_for_insn): Change best_predictor and predictor to enum br_predictor. (combine_predictions_for_bb): Likewise. (build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to use SET_PREDICT_EXPR_OUTCOME. * real.c (real_arithmetic): Change icode to code in function call. * reginfo.c (init_move_cost): Add casts to enum type. (init_reg_sets_1, init_fake_stack_mems): Likewise. * regmove.c (regclass_compatible_p): Change class0 and class1 to enum reg_class. * reload.c (find_valid_class): Add casts to enum type. (push_reload): Change 0 to NO_REGS in function call. (find_reloads): Change this_alternative to array of enum reg_class. Remove some now-unnecessary casts. (make_memloc): Change 0 to VOIDmode in function call. * reload1.c (reload): Change 0 to VOIDmode in function call. (eliminate_regs_1, elimination_effects): Likewise. (eliminate_regs_in_insn): Likewise. (emit_input_reload_insns): Add cast to enum type. (delete_output_reload): Change 0 to VOIDmode in function call. * reorg.c (insn_sets_resource_p): Convert include_delayed_effects to enum type in function call. * tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type. (SET_PREDICT_EXPR_OUTCOME): Define. * tree-dump.c (get_dump_file_info): Change phase parameter to int. (get_dump_file_name, dump_begin, dump_enabled_p): Likewise. (dump_initialized_p, dump_flag_name, dump_end): Likewise. (dump_function): Likewise. * tree-dump.h: Update declarations. * tree-pass.h: Update declarations. * varasm.c (assemble_integer): Change mclass to enum mode_class. * config/arm/arm.c (thumb_legitimize_reload_address): Add cast to enum type. (arm_rtx_costs_1): Correct parenthesization. (arm_rtx_costs): Add casts to enum type. (adjacent_mem_locations): Reverse arguments to const_ok_for_op. (vfp_emit_fstmd): Use add_rg_note. (emit_multi_reg_push, emit_sfm): Likewise. (thumb_set_frame_pointer): Likewise. (arm_expand_prologue): Likewise. (arm_regno_class): Change return type to enum reg_class. (thumb1_expand_prologue): Use add_reg_note. * config/arm/arm-protos.h (arm_regno_class): Update declaration. * config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL in function call. * config/arm/gentune.sh: Add cast to enum type. * config/arm/arm-tune.md: Rebuild. * config/i386/i386.c (ix86_expand_prologue): Use add_reg_note. (ix86_split_fp_branch, predict_jump): Likewise. (ix86_expand_multi_arg_builtin): Change sub_code from enum insn_code to enum rtx_code. (ix86_builtin_vectorized_function): Add cast to enum type. * config/i386/i386.md (truncdfsf2): Change slot to enum ix86_stack_slot. (truncxf<mode>2, isinf<mode>2): Likewise. * config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to enum type. * config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note. (spill_restore_mem, do_spill, ia64_expand_prologue): Likewise. (insert_bundle_state): Change 1 to INSERT in function call. (ia64_add_bundle_selector_before): Likewise. * config/ia64/ia64.md (cpu attr): Add cast to enum type. (save_stack_nonlocal): Change 0 to LCT_NORMAL in function call. (restore_stack_nonlocal): Likewise. * config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/mips/mips.c (mips_binary_cost): Change 0 to SET in function call. (mips_rtx_costs): Likewise. (mips_override_options): Add casts to enum type. * config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in function call. * config/pa/pa.c (legitimize_pic_address): Use add_reg_note. (store_reg, set_reg_plus_d): Likewise. (hppa_expand_prologue, hppa_profile_hook): Likewise. * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add cast to enum type. (altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in function call. (emit_unlikely_jump): Use add_reg_note. (rs6000_emit_allocate_stack): Likewise. (rs6000_frame_related, rs6000_emit_prologue): Likewise. (output_toc): Change 1 to INSERT in function call. (output_profile_hook): Change 0 to LCT_NORMAL in function call. (rs6000_initialize_trampoline): Likewise. (rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in function call. * config/s390/s390.c (s390_rtx_costs): Add cast to enum type. (s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call. (s390_expand_setmem, s390_expand_cmpmem): Likewise. (save_gprs): Use add_reg_note. (s390_emit_prologue): Likewise. (s390_expand_builtin): Change 0 to EXPAND_NORMAL in function call. * config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note. (sparc_fold_builtin): Add cast to enum type. * config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to enum insn_code. (spu_expand_prologue): Use add_reg_note. (expand_builtin_args): Change 0 to EXPAND_NORMAL in function call. * c-parser.c (c_parser_attributes): Change VEC back to tree list. (c_parser_postfix_expression_after_primary): Get VEC for list of arguments. Get original types of arguments. Call build_function_call_vec. (cached_expr_list_1, cached_expr_list_2): New static variables. (c_parser_expr_list): Change return type to VEC *. Add p_orig_types parameter. Change all callers. (c_parser_release_expr): New static function. (c_parser_vec_to_tree_list): New static function. * c-typeck.c (build_function_call): Rewrite to build a VEC and call build_function_call_vec. (build_function_call_vec): New function, based on old build_function_call. (convert_arguments): Remove nargs and argarray parameters. Change values to a VEC. Add origtypes parameter. (build_modify_expr): Add rhs_origtype parameter. Change all callers. (convert_for_assignment): Add origtype parameter. Change all callers. If warn_cxx_compat, check for conversion to an enum type when calling a function. (store_init_value): Add origtype parameter. Change all callers. (digest_init): Likewise. (struct init_node): Add origtype field. (add_pending_init): Add origtype parameter. Change all callers. (output_init_element): Likewise. (output_pending_init_elements): Pass origtype from init_node to output_init_element. (process_init_elemnt): Pass origtype from c_expr to output_init_element. (c_finish_return): Add origtype parameter. Change all callers. * c-common.c (sync_resolve_size): Change params to VEC *. Change caller. (sync_resolve_params): Likewise. (sync_resolve_return): Change params to first_param. Change caller. (resolve_overloaded_builtins): Change params to VEC *. Change callers. Save first parameter around call to build_function_call_vec. * c-decl.c (finish_decl): Add origtype parameter. Change all callers. Call build_function_call_vec rather than build_function_call for cleanup. * c-tree.h: Update declarations. * c-common.h: Update declarations. * stub-objc.c (objc_rewrite_function_call): Change parameter from params to first_param. * target.h (struct gcc_target): Change resolve_overloaded_builtin params parameter from tree to void *. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change arglist parameter to have type void *, and to be a pointer to a VEC. * config/rs6000/rs6000-protos.h (altivec_resolve_overloaded_builtin): Update declaration. * config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change fnargs parameter to have type void *, and to be a pointer to a VEC. Call build_function_call_vec instead of build_function_call. * config/spu/spu-protos.h (spu_expand_builtin): Update declaration. gcc/cp/: * typeck.c (build_function_call_vec): New function. (cp_build_function_call): Only pass first parameter to objc_rewrite_function_call. (build_modify_expr): Add rhs_origtype parameter. Change all callers. * decl.c (finish_decl): Add origtype parameter. Change all callers. * semantics.c (finish_call_expr): Pass VEC to resolve_overloaded_builtin. gcc/objc: * objc-act.c (objc_rewrite_function_call): Change parameter from params to first_param. Change all callers. gcc/testsuite: * gcc.dg/Wcxx-compat-3.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146451 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (field_byte_offset): Use the type size as the field sizeebotcazou2009-04-171-5/+6
| | | | | | | if the latter is not constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146291 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-04-15 Catherine Moore <clm@codesourcery.com>clm2009-04-151-5/+41
| | | | | | | | | | | | | | | | | | * debug.h (set_name): Declare. * dwarf2out.c (dwarf2out_set_name): Declare. (dwarf2_debug_hooks): Add set_name. (find_AT_string): New. (add_AT_string): Call find_AT_string. (dwarf2out_set_name): New. * cp/decl.c (grokdeclarator): Call set_name. * vmsdbgout.c (vmsdbg_debug_hooks): Add set_name_debug_nothing. * debug.c (do_nothing_debug_hooks): Likewise. * dbxout.c (dbx_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146137 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (class_scope_p): New static inline.jakub2009-04-081-6/+21
| | | | | | | | | | | (class_or_namespace_scope_p): Use it. (gen_variable_die): Use DW_TAG_member tag for static data member declarations instead of DW_TAG_variable. * g++.dg/debug/dwarf2/static-data-member1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145770 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (dwarf2out_begin_prologue): Use crtl->nothrowhubicka2009-03-281-1/+1
| | | | | | | | | | * tree-eh.c (stmt_could_throw_p): Remove check for WEAK decls. * function.h (rtl_data): Add nothrow flag. * except.c (set_nothrow_function_flags): Use crtl->nothrow; set DECL_NOTHROW for AVAILABLE functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145202 138bc75d-0d04-0410-961f-82ee72b054a4
* * cgraph.c (dump_cgraph_node): Add replace output flag by process.hubicka2009-03-281-1/+1
| | | | | | | | | | | | | | | * cgraph.h (cgraph_node): Likewise. * cgraphunit.c (cgraph_process_new_functions): Set process flag. (cgraph_reset_node): Use process flag. (cgraph_mark_functions_to_output): Likewise. (cgraph_expand_function): Likewise. (cgraph_expand_all_functions): Likewise. (cgraph_output_in_order): Likewise. * dwarf2out.c (reference_to_unused): Likewise. * passes.c do_per_function_toporder): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145178 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/37959jakub2009-03-271-0/+7
| | | | | | | | | | | | | | | | | | | * dwarf2out.c (dwarf_attr_name): Handle DW_AT_explicit attribute. (gen_subprogram_die): When a function is explicit, generate the DW_AT_explicit attribute. * langhooks.h (struct lang_hooks_for_decls): Add function_decl_explicit_p langhook. * langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define. (LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P. * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define. (cp_function_decl_explicit_p): New prototype. * cp-objcp-common.c (cp_function_decl_explicit_p): New function. * g++.dg/debug/dwarf2/explicit-constructor.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145128 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39524jakub2009-03-231-0/+8
| | | | | | | | | | * dwarf2out.c (gen_variable_die): Avoid adding duplicate declaration nodes. * g++.dg/debug/dwarf2/imported-decl-1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145018 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-03-23 Richard Guenther <rguenther@suse.de>rguenth2009-03-231-1/+1
| | | | | | | | | | | | * cgraph.h (struct cgraph_node): Reorder fields for 64-bit hosts. * tree.h (struct tree_type): Likewise. * reload.h (struct insn_chain): Likewise. * dwarf2out.c (struct dw_loc_descr_struct): Likewise. * function.h (struct function): Likewise. * tree-ssa-structalias.c (struct equiv_class_label): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145009 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/37890jakub2009-03-201-9/+12
| | | | | | | | | * dwarf2out.c (gen_namespace_die): Add context_die argument and use it for block local namespace aliases. (gen_decl_die): Pass context_die to gen_namespace_die. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144978 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Allowjakub2009-03-171-20/+10
| | | | | | | | | | | | | non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL. * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs instead of calling imported_module_or_decl debug hook if building_stmt_tree (). * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand is a NAMESPACE_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144912 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39471jakub2009-03-171-5/+7
| | | | | | | | | | | | | | | | | * dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit DW_TAG_imported_module even if decl is IMPORTED_DECL with NAMESPACE_DECL in its DECL_INITIAL. * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME on IMPORTED_DECL. * g++.dg/debug/dwarf2/imported-module-2.C: Expect DW_TAG_imported_module, not just any DW_TAG_imported prefixed tag. * g++.dg/debug/dwarf2/imported-module-3.C: Likewise. * g++.dg/debug/dwarf2/imported-module-4.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144911 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39412jakub2009-03-171-88/+8
| | | | | | | | | | | | | * dwarf2out.c (gen_inlined_enumeration_type_die, gen_inlined_structure_type_die, gen_inlined_union_type_die, gen_tagged_type_instantiation_die): Removed. (gen_decl_die): For TYPE_DECL_IS_STUB with non-NULL decl_origin do nothing. * gcc.dg/debug/pr39412.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144909 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39372jakub2009-03-061-5/+18
| | | | | | | | | | | | | | * dwarf2out.c (add_abstract_origin_attribute): Return origin_die. (gen_variable_die): Emit DW_AT_location on abstract static variable's DIE, don't emit it if abstract origin already has it. * tree-cfg.c (remove_useless_stmts_bind): GIMPLE_BINDs with any BLOCK_NONLOCALIZED_VARS in its gimple_bind_block aren't useless. * g++.dg/debug/dwarf2/static-local-var-in-ctor.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144682 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39387jakub2009-03-061-1/+4
| | | | | | | | * dwarf2out.c (dwarf2out_imported_module_or_decl_1): For IMPORTED_DECL take locus from its DECL_SOURCE_LOCATION instead of input_location. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144666 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39267hubicka2009-03-011-103/+136
| | | | | | | | | | | | | | | | | | | | | | | * tree.h (BLOCK_NONLOCALIZED_VARS, BLOCK_NUM_NONLOCALIZED_VARS, BLOCK_NONLOCALIZED_VAR): New macros. (tree_block): Add nonlocalized_vars. * dwarf2out.c (gen_formal_parameter_die, gen_variable_die, gen_decl_die): Add origin argument; allow generation of die with origin at hand only. (gen_member_die, gen_type_die_with_usage, force_decl_die, declare_in_namespace, gen_namescpace_die, dwarf2out_decl): Update use of gen_*. (gen_block_die): Fix checking for unused blocks. (process_scope_var): Break out from .... ; work with origins only. (decls_for_scope) ... here; process nonlocalized list. (dwarf2out_ignore_block): Look for nonlocalized vars. * tree-ssa-live.c (remove_unused_scope_block_p): Look for nonlocalized vars. (dump_scope_block): Dump them. * tree-inline.c (remap_decls): Handle nonlocalized vars. (remap_block): Likewise. (can_be_nonlocal): New predicate. (copy_bind_expr, copy_gimple_bind): Update use of remap_block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144529 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39267hubicka2009-02-281-11/+36
| | | | | | | | | | | | | | | | * cgraph.h (varpool_output_debug_info): Remove. * cgraphunit.c (varpool_output_debug_info): Remove. * dwarf2out.c (deferred_locations_struct): New struct (deferred_locations): New type. (deferred_locations_list): New static var. (deffer_location): New function. (gen_variable_die): Use it. (decls_for_scope): Output info on local static vars. (dwarf2out_finish): Process deferred locations. * varpool.c (varpool_output_debug_info): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144496 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/39267hubicka2009-02-271-72/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144474 138bc75d-0d04-0410-961f-82ee72b054a4
* 2009-02-24 Richard Guenther <rguenther@suse.de>rguenth2009-02-241-0/+3
| | | | | | | | PR debug/39285 * dwarf2out.c (gen_enumeration_type_die): Handle CONST_DECLs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144407 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/37709 hubicka2009-02-231-46/+0
| | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144381 138bc75d-0d04-0410-961f-82ee72b054a4
* Update Copyright years for files modified in 2008 and/or 2009.jakub2009-02-201-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144324 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (dwarf2out_finish): Force output of comp_unit_diejakub2009-02-121-1/+3
| | | | | | | for -g3. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144121 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/ChangeLog:aoliva2008-12-101-2/+6
| | | | | | | | | | | | | | PR target/37033 * dwarf2out.c (saved_do_cfi_asm): New. (dwarf2out_do_frame): Take it into account. (dwarf2out_d_cfi_asm): Likewise. Set it when appropriate. libcpp/ChangeLog: PR target/37033 * pch.c (cpp_valid_state): Improve message for poisoned symbols. Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142652 138bc75d-0d04-0410-961f-82ee72b054a4
* PR rtl-optimization/36998jakub2008-11-201-14/+54
| | | | | | | | | | | | | | * dwarf2out.c (stack_adjust_offset): Add cur_args_size and cur_offset arguments. Handle sp = reg and (set (foo) (mem (pre_inc (reg sp)))). (compute_barrier_args_size_1, dwarf2out_frame_debug_expr): Adjust stack_adjust_offset callers. (dwarf2out_stack_adjust): Likewise. Handle insns in annulled branches properly. (compute_barrier_args_size): Handle insns in annulled branches properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142060 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/27017jakub2008-11-131-8/+63
| | | | | | | | | | | | | | * dwarf2out.c (prune_unused_types_walk_local_classes): New function. (prune_unused_types_walk): Call it for non-perennial local classes. Set die_mark to 2 if recursing on children. If die_mark is 1 on entry, just set it to 2 and recurse on children, don't walk attributes again. * g++.dg/debug/dwarf2/localclass1.C: New test. * g++.dg/debug/dwarf2/localclass2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141829 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-10-10 H.J. Lu <hongjiu.lu@intel.com>hjl2008-10-101-0/+10
| | | | | | | | | PR debug/37002 * dwarf2out.c (mem_loc_descriptor): Use DRAP for vDRAP which has been optimized out. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141049 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/37738jakub2008-10-071-4/+63
| | | | | | | | | | | | | | | * dwarf2out.c (common_block_die_table): New variable. (common_block_die_table_hash, common_block_die_table_eq): New functions. (gen_variable_die): Look up a DW_TAG_common_block die for a particular COMMON block in the current scope rather than globally. Optimize DW_OP_addr SYMBOL_REF DW_OP_plus_uconst off into DW_OP_addr SYMBOL_REF+off. * gfortran.dg/debug/pr37738.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140944 138bc75d-0d04-0410-961f-82ee72b054a4
* 2008-09-30 Dodji Seketeli <dodji@redhat.com>dodji2008-10-051-38/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ChangeLog: PR c++/37410 * dwarf2out.c (dwarf2out_imported_module_or_decl): Split this function in two, making it call a new and reusable dwarf2out_imported_module_or_decl() that takes the containing BLOCK of the declaration in argument. (dwarf2out_imported_module_or_decl_real): New function. (decls_for_scope, gen_decl_die, dwarf2out_decl): Take IMPORTED_DECL in account. * tree.def: Added IMPORTED_DECL node type. * tree.h: Added accessors for IMPORTED_DECL nodes. * tree.c (init_ttree): Initialise IMPORTED_DECL node type. gcc/cp/ChangeLog: PR c++/37410 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT make sure an IMPORTED_DECL node is added to the BLOCK_VARS list of the innermost containing BLOCK. gcc/testsuite/ChangeLog: PR c++/37410 * g++.dg/debug/dwarf2/imported-module.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140895 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (constant_size): Use HOST_WIDE_INT in parameter type.ebotcazou2008-09-291-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140769 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/37275jakub2008-09-261-5/+67
| | | | | | | | | | | | | | | | * dwarf2out.c (tls_mem_loc_descriptor): New function. (mem_loc_descriptor): Use it for MEM. For PLUS fail if second mem_loc_descriptor failed. Accept UNSPEC. (loc_descriptor): Use tls_mem_loc_descriptor for MEM. For PARALLEL fail if one of the loc_descriptor calls for pieces failed. (loc_descriptor_from_tree_1): Handle even DECL_EXTERNAL __thread vars, as long as they bind locally. For COMPONENT_REF, ARRAY_REF etc. fail if loc_descriptor_from_tree_1 on offset failed. * gcc.target/i386/pr37275.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140712 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/37441ro2008-09-171-0/+3
| | | | | | | | * dwarf2out.c (dwarf2out_do_cfi_asm) [MIPS_DEBUGGING_INFO]: Return false. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140417 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (tree_add_const_value_attribute): Only handlejakub2008-09-021-1/+5
| | | | | | | VAR_DECL and CONST_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139911 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/37287jakub2008-08-311-2/+6
| | | | | | | | | | | * dwarf2out.c (gen_namespace_die): For DECL_EXTERNAL modules don't add source coords. * gfortran.dg/pr37287-1.f90: New test. * gfortran.dg/pr37287-2.F90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139826 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (native_encode_initializer): Subtract min_index forjakub2008-08-311-1/+4
| | | | | | | non-range array index. Handle VIEW_CONVERT_EXPR and NON_LVALUE_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139825 138bc75d-0d04-0410-961f-82ee72b054a4
* * dwarf2out.c (fortran_common): Update comment.jakub2008-08-291-25/+25
| | | | | | | | (gen_variable_die): Swap com_die and var_die variables in Fortran COMMON block handling code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139783 138bc75d-0d04-0410-961f-82ee72b054a4