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 middle-end/30443] [4.3 Regression] 4.3 internal compiler error: verify_cgraph_node failed



------- Comment #3 from hubicka at gcc dot gnu dot org  2007-01-12 01:43 -------
Patch in testing.  It is related to function cloning update needed by Razya's
IPCP code.

Honza

Index: tree-inline.c
===================================================================
*** tree-inline.c       (revision 120681)
--- tree-inline.c       (working copy)
*************** tree_function_versioning (tree old_decl,
*** 3209,3224 ****
    DECL_ARTIFICIAL (new_decl) = 1;
    DECL_ABSTRACT_ORIGIN (new_decl) = DECL_ORIGIN (old_decl);

    /* Generate a new name for the new version. */
    if (!update_clones)
      {
        DECL_NAME (new_decl) =  create_tmp_var_name (NULL);
        SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
        SET_DECL_RTL (new_decl, NULL_RTX);
      }
- 
-   /* Prepare the data structures for the tree copy.  */
-   memset (&id, 0, sizeof (id));

    id.decl_map = splay_tree_new (splay_tree_compare_pointers, NULL, NULL);
    id.src_fn = old_decl;
--- 3209,3225 ----
    DECL_ARTIFICIAL (new_decl) = 1;
    DECL_ABSTRACT_ORIGIN (new_decl) = DECL_ORIGIN (old_decl);

+   /* Prepare the data structures for the tree copy.  */
+   memset (&id, 0, sizeof (id));
+ 
    /* Generate a new name for the new version. */
    if (!update_clones)
      {
        DECL_NAME (new_decl) =  create_tmp_var_name (NULL);
        SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
        SET_DECL_RTL (new_decl, NULL_RTX);
+       id.statements_to_fold = pointer_set_create ();
      }

    id.decl_map = splay_tree_new (splay_tree_compare_pointers, NULL, NULL);
    id.src_fn = old_decl;
*************** tree_function_versioning (tree old_decl,
*** 3233,3239 ****
    id.transform_new_cfg = true;
    id.transform_return_to_modify = false;
    id.transform_lang_insert_block = false;
-   id.statements_to_fold = pointer_set_create ();

    current_function_decl = new_decl;
    old_entry_block = ENTRY_BLOCK_PTR_FOR_FUNCTION
--- 3234,3239 ----
*************** tree_function_versioning (tree old_decl,
*** 3299,3316 ****

    /* Clean up.  */
    splay_tree_delete (id.decl_map);
!   fold_marked_statements (0, id.statements_to_fold);
!   pointer_set_destroy (id.statements_to_fold);
!   fold_cond_expr_cond ();
    if (gimple_in_ssa_p (cfun))
      {
        free_dominance_info (CDI_DOMINATORS);
        free_dominance_info (CDI_POST_DOMINATORS);
!       delete_unreachable_blocks ();
        update_ssa (TODO_update_ssa);
!       fold_cond_expr_cond ();
!       if (need_ssa_update_p ())
!         update_ssa (TODO_update_ssa);
      }
    free_dominance_info (CDI_DOMINATORS);
    free_dominance_info (CDI_POST_DOMINATORS);
--- 3299,3323 ----

    /* Clean up.  */
    splay_tree_delete (id.decl_map);
!   if (!update_clones)
!     {
!       fold_marked_statements (0, id.statements_to_fold);
!       pointer_set_destroy (id.statements_to_fold);
!       fold_cond_expr_cond ();
!     }
    if (gimple_in_ssa_p (cfun))
      {
        free_dominance_info (CDI_DOMINATORS);
        free_dominance_info (CDI_POST_DOMINATORS);
!       if (!update_clones)
!         delete_unreachable_blocks ();
        update_ssa (TODO_update_ssa);
!       if (!update_clones)
!       {
!         fold_cond_expr_cond ();
!         if (need_ssa_update_p ())
!           update_ssa (TODO_update_ssa);
!       }
      }
    free_dominance_info (CDI_DOMINATORS);
    free_dominance_info (CDI_POST_DOMINATORS);


-- 

hubicka at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-01-11 22:34:30         |2007-01-12 01:43:16
               date|                            |


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


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