summaryrefslogtreecommitdiff
path: root/gcc/trans-mem.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 16:51:24 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-04 16:51:24 +0000
commitb953589d35f0e2611b1603b8faeeb2a10f83c8a0 (patch)
tree227fc61acb843d8ba0a7ed57f7251484fbfc265c /gcc/trans-mem.c
parent6198d968dbe721ee9fc231ad54e5d203c9846e5c (diff)
downloadgcc-b953589d35f0e2611b1603b8faeeb2a10f83c8a0.tar.gz
PR middle-end/47530
* trans-mem.c (expand_block_edges): Do not skip the first statement when resetting the BB. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r--gcc/trans-mem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 702682300d8..5aae8b213f1 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -2591,6 +2591,7 @@ expand_block_edges (struct tm_region *region, basic_block bb)
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); )
{
+ bool do_next = true;
gimple stmt = gsi_stmt (gsi);
/* ??? TM_COMMIT (and any other tm builtin function) in a nested
@@ -2612,6 +2613,7 @@ expand_block_edges (struct tm_region *region, basic_block bb)
make_tm_edge (stmt, bb, region);
bb = e->dest;
gsi = gsi_start_bb (bb);
+ do_next = false;
}
/* Delete any tail-call annotation that may have been added.
@@ -2620,7 +2622,8 @@ expand_block_edges (struct tm_region *region, basic_block bb)
gimple_call_set_tail (stmt, false);
}
- gsi_next (&gsi);
+ if (do_next)
+ gsi_next (&gsi);
}
}