From c5f25038f02c973e2eede3ff028a37f145088811 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 22 Oct 2008 14:18:13 +0000 Subject: 2008-10-22 Rafael Espindola * ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the newly created statements. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@141293 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/ipa-struct-reorg.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f95f4e4afc9..80418272324 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-10-22 Rafael Espindola + + * ipa-struct-reorg.c (create_new_alloc_sites): Properly insert the + newly created statements. + 2008-10-22 Kaz Kojima PR target/37633 diff --git a/gcc/ipa-struct-reorg.c b/gcc/ipa-struct-reorg.c index d6bca8ab722..d1d7b1ca969 100644 --- a/gcc/ipa-struct-reorg.c +++ b/gcc/ipa-struct-reorg.c @@ -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. */ -- cgit v1.2.3