This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix tree if-conversion crash



On Nov 12, 2004, at 3:56 PM, Diego Novillo wrote:


On Fri, 2004-11-12 at 18:51, Devang Patel wrote:

* tree-if-conv.c (clean_predicate_lists): Use loop header and latch directly.

Looks OK.

Thanks. I need to update gcc_assert check because it is possible to get loop with only one nodes. In that case, loop->header and loop->latch both points to same basic block.


-
Devang

Index: tree-if-conv.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-if-conv.c,v
retrieving revision 2.17
diff -Idpatel.pbxuser -c -3 -p -r2.17 tree-if-conv.c
*** tree-if-conv.c      14 Nov 2004 04:08:05 -0000      2.17
--- tree-if-conv.c      15 Nov 2004 23:00:10 -0000
*************** static void
*** 658,664 ****
  clean_predicate_lists (struct loop *loop)
  {
  #ifdef ENABLE_CHECKING
!   gcc_assert (loop->num_nodes == 2);
  #endif
    loop->header->aux = NULL;
    loop->latch->aux = NULL;
--- 658,664 ----
  clean_predicate_lists (struct loop *loop)
  {
  #ifdef ENABLE_CHECKING
!   gcc_assert (loop->num_nodes == 2 || loop->num_nodes == 1);
  #endif
    loop->header->aux = NULL;
    loop->latch->aux = NULL;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]