* cfganal.c (flow_call_edges_add): Don't crash on noreturn call.

From-SVN: r61007
This commit is contained in:
Richard Henderson 2003-01-07 12:14:51 -08:00 committed by Richard Henderson
parent b47ffb8f08
commit 94c040bd69
3 changed files with 15 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2003-01-07 Richard Henderson <rth@redhat.com>
* cfganal.c (flow_call_edges_add): Don't crash on noreturn call.
2003-01-07 Daniel Berlin <dberlin@dberlin.org>
* cfg.c: Include alloc-pool.h

View File

@ -1,6 +1,6 @@
/* Control flow graph analysis code for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001 Free Software Foundation, Inc.
1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@ -322,10 +322,11 @@ flow_call_edges_add (blocks)
for (e = bb->succ; e; e = e->succ_next)
if (e->dest == EXIT_BLOCK_PTR)
break;
insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
commit_edge_insertions ();
{
insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
commit_edge_insertions ();
break;
}
}
}

View File

@ -0,0 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fprofile-arcs" } */
extern void bar(void) __attribute__((noreturn));
int foo (void) { bar(); }