diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-03 09:49:16 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-03 09:49:16 +0000 |
commit | 48b6dfd8e0861adcdab4e3489f6d3675455c2cb0 (patch) | |
tree | 7b8b7d7ad30b46e210beddd0a1730b34001839c7 /gcc/cfgloopmanip.c | |
parent | 25630dc79a217ae6e7ccac9ef62c93b88490d036 (diff) | |
download | gcc-48b6dfd8e0861adcdab4e3489f6d3675455c2cb0.tar.gz |
PR tree-optimization/46107
* cfgloopmanip.c (loop_version): Set irred_flag back into entry->flags
if cfg_hook_duplicate_loop_to_header_edge failed.
* gcc.c-torture/compile/pr46107.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166234 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloopmanip.c')
-rw-r--r-- | gcc/cfgloopmanip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 4363cc51f64..aa9ab66454e 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1,6 +1,6 @@ /* Loop manipulation code for GNU compiler. - Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009 Free Software - Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. This file is part of GCC. @@ -1538,7 +1538,10 @@ loop_version (struct loop *loop, /* Duplicate loop. */ if (!cfg_hook_duplicate_loop_to_header_edge (loop, entry, 1, NULL, NULL, NULL, 0)) - return NULL; + { + entry->flags |= irred_flag; + return NULL; + } /* After duplication entry edge now points to new loop head block. Note down new head as second_head. */ |