This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/36245] [4.4 Regression] internal compiler error: in build2_stat, at tree.c:3116



------- Comment #14 from dnovillo at gcc dot gnu dot org  2008-06-11 15:39 -------
Subject: Bug 36245

Author: dnovillo
Date: Wed Jun 11 15:39:09 2008
New Revision: 136672

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136672
Log:
2008-06-11  Diego Novillo  <dnovillo@google.com>

        Merge from lto-streamer sub-branch:

        2008-06-09  Bill Maddox  <maddox@google.com>

                * lto-tags.h: Add new tags LTO_local_type_ref
                and LTO_global_type_ref.  Split LTO_type_decl
                and LTO_field_decl into LTO_type_decl0, LTO_type_decl1,
                LTO_field_decl0, and LTO_field_decl1.
                * lto-tree-tags.h: Set names and tree code mappings for
                the new tags.
                * lto-function-out.c: Tidy comments and formatting.
                (output_record_start): Add forward declaration.
                (type_function_context): New function.
                (field_decl_is_local, type_decl_is_local): New functions.
                (output_type_ref_1): Write "local" (e.g., variably-modified)
                types to local_decls stream.
                (output_type_ref): Use "type_ref" as debug token to avoid
                confusing clash with use of "type" elsewhere.
                (output_local_decl_ref):  Update comment.
                (output_expr_operand): Cases for FIELD_DECL and TYPE_DECL
                now write "local" declarations to local_decls stream.
                (output_local_var):  Rename to output_local_var_decl.
                (output_local_var_decl): Remove code to set slot in
                local_decls_index, now handled by output_local_decl.
                (output_local_tree): New function.
                (output_local_field_decl, output_local_type_decl,
                output_local_type): New functions.
                (output_local_decl): New function.
                (output_field_decl): Use new tag LTO_field_decl1, to
                distinguish from "local" fields.
                (output_type_decl): Use new tag LTO_type_decl1, to
                distinguish from "local" fields.
                * lto-function-in.c: Tidy comments and formatting.
                (input_local_tree, input_local_var_decl,
input_local_field_decl,
                input_local_type_decl, input_local_type):  Add
                forward declarations.
                (input_type_ref_1): Distinguish references to global or local
                declaration streams.
                (input_type_ref):  Use "type_ref" as debug token to avoid
                confusing clash with use of "type" elsewhere.
                (input_expr_operand):  Cases for FIELD_DECL and TYPE_DECL
                now read "local" declarations from local_decls stream.
                (input_local_tree): New function.
                (input_local_var): Rename to input_local_var_decl.
                (input_local_var_decl): Input record tag is now an argument.
                (input_local_field_decl, input_local_type_decl,
                input_local_type): New functions.
                (input_local_decl): New function.
                (input_local_vars): Call input_local_decl instead
                of input_local_var.
                (lto_static_init_local): Don't call
                add_referenced_var on non-vars.
                * lto-section-out.c (lto_hash_decl_slot_node,
                lto_eq_decl_slot_node): Use object pointer, not
                UID, as hash key.

        2008-06-04  Rafael Espindola  <espindola@google.com>

                * lto-function-out.c (output_tree): call error
                with the TREE_CODE name.

        2008-06-04  Ollie Wild  <aaw@google.com>

                * dwarf2out.c (dwarf2_called_from_lto_p): Remove.
                (current_fde): New function.
                (add_fde_cfi): Call current_fde.
                (lookup_cfa): Call curent_fde.
                (dwarf2out_end_epilogue): Call current_fde.
                (dwarf2out_switch_text_section: Call current_fde.
                (lto_void_type_die): Remove.
                (dwarf_attr_name): Declare static.  Remove
                flag_generate_lto check.

                (assign_symbol_name): Remove.
                (assign_symbol_names): Expand call to assign_symbol_name.
                (base_type_die): Replace
                DW_ATE_GNU_complex_unsigned and
                DW_ATE_GNU_complex_signed encodings with
                DW_ATE_lo_user.  Remove byte_size computation.
                Remove extra precision information.
                (may_reference_to_unused): Rename reference_to_unused.
                (rtl_for_decl_init): Rename calls to may_reference_to_unused.
                (convert_cfa_to_fb_loc_list): Call current_fde.
                (gen_subprogram_die): Remove flag_generate_lto and
                dwarf2_called_from_lto_p checks.
                (gen_variable_die): Remove context_die == comp_unit_die checks.
                (add_high_low_attributes): Remove
                dwarf2_called_from_lto_p check.
                (force_die_for_context): Remove.
                (containing_decl_for_block): Remove.
                (force_block_die): Remove.
                (force_decl_die): Expand call to force_die_for_context.  Remove
                context_die == comp_unit_die check.  Remove the removal of of
                DW_AT_DECLARATION.
                (force_type_die): Expand the force_die_for_context call.
                (force_field_die): Remove.
                (gen_decl_die): Remove the cgraph_global_info_ready check.
                (dwarf2out_init): Remove lto_void_type_die initialization.
                (dwarf2out_finish): Remove context assignment.
                (mark_die_used): Remove.
                (lto_init_ref): Remove.
                (lto_type_ref): Remove.
                (lto_var_ref): Remove.
                (lto_fn_ref): Remove.
                (lto_field_ref): Remove.
                (lto_typedecl_ref): Remove.
                (lto_namespacedecl_ref): Remove.
                * dwarf2out.h (dwarf2_called_from_lto_p): Remove.
                (dwarf_attr_name): Remove.
                (lto_out_ref): Remove.
                (lto_type_ref): Remove.
                (lto_var_ref): Remove.
                (lto_fn_ref): Remove.
                (lto_field_ref): Remove.
                (lto_typedecl_ref): Remove.
                (lto_namespacedecl_ref): Remove.
                * dwarf2.h (enum dwarf_type): Remove
                DW_ATE_GNU_complex_signed and
                DW_ATE_GNU_complex_unsigned.
                * lto-cgraph-in.c: Remove inclusion of
                dwarf2asm.h and dwarf2out.h.
                * lto-cgraph-out.c: Remove inclusion of
                dwarf2asm.h and dwarf2out.h.
                (lto_output_cgraph): Remove assignments to
                dwarf2_called_from_lto_p.
                * lto-function-in.c: Remove inclusion of
                dwarf2asm.h and dwarf2out.h.
                * lto-function-out.c: Remove inclusion of
                dwarf2asm.h and dwarf2out.h.
                (generate_early_dwarf_information): Remove.
                (output_function): Remove generate_early_dwarf_information
call.
                (lto_output): Remove assignments to dwarf2_called_from_lto_p.
                * lto-section-in.c: Remove inclusion of
                dwarf2asm.h and dwarf2out.h.
                * lto-section-out.c: Remove inclusion of dwarf2out.h.

        2008-06-03  Bill Maddox  <maddox@google.com>

                * lto-tree-flags.def: Add flags for LABEL_DECL.
                * lto-function-out.c (output_label_decl): New function.
                (output_tree): Make sure that we do not stream out
                well-known nodes, even for node types for which we
                would not necessarily force sharing.  Reinstate handlers
                for SWITCH_EXPR and CASE_LABEL. Add case for LABEL_DECL.
                * lto-function-in.c (input_label_decl): New function.
                (input_tree_operand): Reinstate handlers for 
                SWITCH_EXPR and CASE_LABEL. Add case for LABEL_DECL.
                * lto-section-out.c (preload_common_nodes): Verify
                that main_identifier_name is as expected by the reader.
                * lto.c (preload_common_nodes): Initialize
                main_identifier_node.

        2008-06-03  Diego Novillo  <dnovillo@google.com>

                * lto-header.h: Tidy formatting.
                * lto-section-in.c (lto_get_section_data): Fix type for
                SECTION_NAME.
                (lto_debug_in_fun): Tidy formatting.
                * lto-tags.h (enum): Tidy formatting.
                * lto-cgraph-out.c (output_fn_decl): Add comment.
                * lto-section-out.c (lto_output_decl_index):  Tidy formatting.

        2008-06-03  Diego Novillo  <dnovillo@google.com>

                * lto-function-out.c (output_tree_flags): Tidy
                formatting.
                (output_type_decl): Emit TYPE_MODE.
                (output_tree): Add comment.
                Ignore language codes.  Add pointer to proper fix.
                * lto-function-in.c (input_type_decl): Read TYPE_MODE.

        2008-06-02  Diego Novillo  <dnovillo@google.com>

                * lto-function-out.c: Do not include ctype.h.
                Tidy whitespace.
                (output_function_decl): Add comment.
                (output_type_tree): Reformat comment.
                * lto-header.h (lto_get_section_name): Fix return type.
                Tidy whitespace.
                * lto-tree-out.h: Tidy whitespace and comments.
                * lto-section-out.c (lto_get_section_name): Fix return
                type.
                (lto_get_section): Fix type of section_name.
                (lto_get_out_decl_state): Reformat comment.
                (out_state): Declare as local static to
                lto_get_out_decl_state.
                Fix wraparound problems.
                (preload_common_node): Reformat comment.
                Tidy whitespace.
                (produce_asm_for_decls): Remove extern declarations.
                Fix wraparound problems.
                (lto_debug_out_fun): Fix comment.
                * lto-section-out.h: Tidy whitesace and formatting.

        2008-05-30  Diego Novillo  <dnovillo@google.com>

                * lto-function-out.c (output_namespace_decl): Fix
                assertions for NAMESPACE_DECL.

        2008-05-30  Diego Novillo  <dnovillo@google.com>

                Backport from trunk:

                2008-05-27  Richard Guenther  <rguenther@suse.de>

                        PR tree-optimization/36245
                        * tree-ssa-address.c (add_to_parts): Deal
                        with non-pointer bases.

        2008-05-29  Bill Maddox  <maddox@google.com>

                * lto-tree-in.h, lto-tree-out.h: New files,
                accidently omitted from previous commit.

        2008-05-28  Bill Maddox  <maddox@google.com>

                Replace the DWARF reader in the LTO front-end.

                * lto-tree-flags.def: Add flags for *_DECL
                and *_TYPE for use by g lobal streamer.
                * lto-function-out.c: Include lto-tree-out.h.
                (struct output_block): Moved to lto-tree-out.h.
                (create_output_block, destroy_output_block):
                Make non-static, now exported.
                (output_tree_flags, debug_tree_flags): Add ADD_CLASS_TYPE,
                ADD_TYPE_FLAG, ADD_FUN_FLAG macros.  Fix bug where stream
                debugging info was sometimes omitted.
                (lto_static_init): Adjust lto_flags_needed_for and
                lto_types_needed_for for node types now newly handled by
                the global streamer.
                (output_tree, output_type_tree, output_global_record_start,
                output_field_decl, output_function_decl, output_var_decl,
                output_parm_decl, output_result_decl, output_type_decl,
                output_namespace_decl, output_translation_unit_decl,
                output_binfo, output_type, output_global_constructor)
                New functions.
                * lto_function-in.c: Include lto-tree-in.h.
                (struct data_in): Moved to lto-tree-in.h.
                (input_string_internal): Initialize input_block before
                reading string table size from the stream.
                (process_tree_flags): Add ADD_CLASS_TYPE_FLAG, ADD_TYPE_FLAG,
                ADD_FUN_FLAG.
                (input_local_var): Handle stream debugging information
                that was previously omitted due to a bug in the writer.
                (lto_static_init_local): Make non-static, now exported.
                Add ADD_CLASS_TYPE_FLAG, ADD_TYPE_FLAG, ADD_FUN_FLAG.
                (input_tree, input_type_tree, input_tree_operand,
                global_vector_enter, global_vector_fixup, input_field_decl,
                input_function_decl, input_var_decl, input_parm_decl,
                input_result_decl, input_type_decl, input_namespace_decl,
                input_translation_unit_decl, input_binfo, input_type):
                New functions.
                * lto-section.h (struct lto_decl_header): Add fields for
                sizes of globals stream and its associated debug and string
                table streams.
                * lto-tree-tags.def: MAP_EXPR_TAG and SET_NAME macro calls
                for newly-handled tree codes for global decls and types.
                * lto-section-in.c (dump_debug_stream): Fix typo
                in error message.
                * lto-section-in.h (lto_input_function_body,
                lto_input_constructors_and_inits): Moved to lto-tree-in.h.
                * lto-tags.h (enum LTO_tags): Added literals LTO_tree_vec,
                LTO_translation_unit_decl, LTO_*_type, LTO_tree_binfo,
                LTO_pickle_reference.

lto/ChangeLog

2008-06-11  Diego Novillo  <dnovillo@google.com>

        Merge from lto-streamber sub-branch.

        2008-06-04  Ollie Wild  <aaw@google.com>

                * lto.c: Remove inclusion of dwarf2.h and dwarf2out.h.
                * Make-lang.in (lto.o): Remove dependency on dwarf2.h.

        2008-05-28  Bill Maddox  <maddox@google.com>

                Replace the DWARF reader in the LTO front-end.

                * lto.c: Include lto-tree-in.h, lto-tags.h.
                (enum DWARF2_class, DW_cl_constant, struct
                DWARF2_form_data, struct lto_context,
                lto_fd_init, lto_info_fd_init,
                lto_abbrev_fd_init, lto_info_fd_close,
                lto_file_init, lto_file_close,
                lto_file_corrupt_error, lto_abi_mismatch_error,
                LTO_CHECK_INT_VAL, LTO_READ_TYPE,
                lto_read_uleb128, lto_read_sleb128,
                lto_read_initial_length, lto_abbrev_read_attrs,
                lto_abbrev_read, lto_abbrev_read_lookup,
                lto_read_section_offset,
                lto_read_comp_unit_header, find_cu_for_offset,
                lto_get_file_name,
                lto_resolve_reference,lto_read_form,
                attribute_value_as_int,
                make_signed_host_wide_int,
                attribute_value_as_constant, lto_cache_hash,
                lto_cache_eq, lto_cache_store_DIE,
                lto_cache_lookup_DIE, lto_find_integral_type,
                lto_find_integral_type_1,
                LTO_BEGIN_READ_ATTRS_UNCHECKED,
                LTO_BEGIN_READ_ATTRS, LTO_END_READ_ATTRS,
                lto_unsupported_attr_error, lto_get_identifier,
                lto_read_referenced_type_DIE,
                lto_read_compile_unit_DIE,
                lto_read_array_type_DIE,
                lto_read_structure_union_class_type_DIE,
                lto_read_enumerator_DIE,
                lto_read_enumeration_type_DIE,
                lto_read_only_for_child_DIEs,
                lto_read_only_for_child_DIEs,
                lto_read_member_DIE, lto_read_abbrev,
                lto_read_variable_formal_parameter_constant_DIE,
                lto_get_body): Removed.
                (preload_common_nodes): New function.
                (lto_read_decls): Convert for new global streamer.
                (lto_materialze_file_data,
                lto_read_subroutine_type_subprogram_die,
                lto_read_unspecified_parameters_DIE,
                lto_read_typedef_DIE,
                lto_read_pointer_reference_type_DIE,
                lto_read_subrange_type_DIE,
                lto_read_base_type_DIE,
                lto_read_const_volatile_restrict_type_DIE,
                lto_read_namespace_DIE,
                lto_read_unspecified_type_DIE, lto_read_DIE,
                lto_read_child_DIEs, lto_collect_child_DIEs):
                Removed.
                (lto_info_read, lto_set_cu_context): Removed.
                (lto_file_read): Convert for new global streamer.
                (lto_resolve_type_ref, lto_read_DIE_at_ptr,
                lto_resolve_var_ref, lto_resolve_fn_ref,
                lto_resolve_field_ref, lto_resolve_typedecl_ref,
                lto_resolve_namespacedecl_ref): Removed.
                (lto_file_init, lto_file_close): Moved to lto-elf.c.
                * lto-tree.h (lto_symtab_merge_var,
                lto_symtab_mergee_fun): Declare here.
                * lto-elf.c (lto_file_init, lto_file_close): Moved from lto.c.
                (lto_elf_file_open): Removed code to read DWARF debug sections.
                * lto.h (lto_context, DWARF2_attr, DWARF2_abbrev,
                DWARF2_CompUnit, lto_die_ptr,
                lto_die_cache_entry, lto_fd, lto_info_fd,
                lto_abbrev_fd): Removed.
                (lto_file): Removed debug_info and debug_abbrev fields.
                (lto_ref): Removed.
                (lto_file_init, lto_file_close,
                lto_resolve_type_ref, lto_resolve_var_ref,
                lto_resolve_fn_ref, lto_resolve_field_ref,
                lto_resolve_typedecl_ref,
                lto_resolve_namespacedecl_ref,
                lto_get_file_name): Removed declarations.
                (lto_symtab_merge_var, lto_symtab_merge_fn):
                Declarations moved to lto-tree.h.
                * lto-symtab.c (lto_compatible_attributes_p):
                Lobotomize this, as it barfs on "Hello, world!".
                * lto-section-out.c: Include lto-tree-out.h.
                (lto_hash_global_slot_node,
                lto_eq_global_slot_node, preload_common_nodes,
                write_global_stream, write_global_references):
                New functions.
                (produce_asm_for_decls): Convert for new global streamer.
                * lto-section-out.h (lto_hash_global_slot_node,
                lto_eq_global_slot_node): Declare.



Added:
    branches/lto/gcc/lto-tree-in.h
      - copied unchanged from r136662, branches/lto-streamer/gcc/lto-tree-in.h
    branches/lto/gcc/lto-tree-out.h
      - copied unchanged from r136662, branches/lto-streamer/gcc/lto-tree-out.h
Modified:
    branches/lto/gcc/ChangeLog.lto
    branches/lto/gcc/dwarf2.h
    branches/lto/gcc/dwarf2out.c
    branches/lto/gcc/dwarf2out.h
    branches/lto/gcc/lto-function-in.c
    branches/lto/gcc/lto-function-out.c
    branches/lto/gcc/lto-header.h
    branches/lto/gcc/lto-section-in.c
    branches/lto/gcc/lto-section-out.c
    branches/lto/gcc/lto-section-out.h
    branches/lto/gcc/lto-section.h
    branches/lto/gcc/lto-tags.h
    branches/lto/gcc/lto-tree-flags.def
    branches/lto/gcc/lto-tree-tags.def
    branches/lto/gcc/lto/ChangeLog
    branches/lto/gcc/lto/Make-lang.in
    branches/lto/gcc/lto/lto-elf.c
    branches/lto/gcc/lto/lto-symtab.c
    branches/lto/gcc/lto/lto-tree.h
    branches/lto/gcc/lto/lto.c
    branches/lto/gcc/lto/lto.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36245


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]