diff options
author | Jeff Law <law@redhat.com> | 2016-06-02 23:20:16 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2016-06-02 23:20:16 -0600 |
commit | 47b8392308f4122cb327d351e0f2f34e1b4960bc (patch) | |
tree | 552b67807d742a98724357b02a30d29d4fd9703d /gcc/tree-ssa-threadupdate.c | |
parent | e96e5f4611803e2c67410f0ad99a9b1261704720 (diff) | |
download | gcc-47b8392308f4122cb327d351e0f2f34e1b4960bc.zip gcc-47b8392308f4122cb327d351e0f2f34e1b4960bc.tar.gz gcc-47b8392308f4122cb327d351e0f2f34e1b4960bc.tar.bz2 |
re PR tree-optimization/71328 (ice in verify_jump_thread)
PR tree-optimization/71328
* tree-ssa-threadupdate.c (duplicate_thread_path): Fix off-by-one
error when checking for a jump back onto the copied path. */
PR tree-optimization/71328
* gcc.c-torture/compile/pr71328.c: New test.
From-SVN: r237052
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 620948c..1ff007a 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -2298,11 +2298,11 @@ duplicate_thread_path (edge entry, edge exit, } /* Special case the last block on the path: make sure that it does not - jump back on the copied path. */ + jump back on the copied path, including back to itself. */ if (i + 1 == n_region) { FOR_EACH_EDGE (e, ei, bb->succs) - if (bb_in_bbs (e->dest, region_copy, n_region - 1)) + if (bb_in_bbs (e->dest, region_copy, n_region)) { basic_block orig = get_bb_original (e->dest); if (orig) |