From 71056fef3b000a8b1e4793b3aa064c033588908f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 3 Nov 2010 10:49:16 +0100 Subject: re PR tree-optimization/46107 (-ftree-loop-distribute-patterns caused verify_loop_structure problem) 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. From-SVN: r166234 --- gcc/cfgloopmanip.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/cfgloopmanip.c') diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 4363cc5..aa9ab66 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. */ -- cgit v1.1