ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the newly created statem...
authorRafael Avila de Espindola <espindola@google.com>
Wed, 22 Oct 2008 14:18:13 +0000 (14:18 +0000)
committerRafael Espindola <espindola@gcc.gnu.org>
Wed, 22 Oct 2008 14:18:13 +0000 (14:18 +0000)
2008-10-22 Rafael Espindola  <espindola@google.com>

* ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the
newly created statements.

From-SVN: r141293

gcc/ChangeLog
gcc/ipa-struct-reorg.c

index f95f4e4afc9d7c0d5cfc56b397297ec3156bb019..80418272324faefe7a3116f822292c3456ff56f7 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-22 Rafael Espindola  <espindola@google.com>
+
+       * ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the
+       newly created statements.
+
 2008-10-22  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        PR target/37633
index d6bca8ab7224ef8fe2c2a7e327784d5ac12ead3e..d1d7b1ca969d2e8cc61cb9d44cbb5994dad6e93d 100644 (file)
@@ -2114,8 +2114,9 @@ create_new_alloc_sites (fallocs_t m_data, tree context)
       num = gen_num_of_structs_in_malloc (stmt, str->decl, &new_stmts);
       if (new_stmts)
        {
-         last_stmt = gimple_seq_last_stmt (new_stmts);
+         gimple last_stmt_tmp = gimple_seq_last_stmt (new_stmts);
          insert_seq_after_stmt (last_stmt, new_stmts);
+         last_stmt = last_stmt_tmp;
        }
       
       /* Generate an allocation sites for each new structure type.  */