diff options
author | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 15:44:00 +0000 |
---|---|---|
committer | uweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-18 15:44:00 +0000 |
commit | 20498e00068a2c4e89a5bc7f39834762160e3767 (patch) | |
tree | a730c9292989135393a7c3907a0968ce58f61106 | |
parent | 0c9892849c37c416169df46ff5cb281346289c38 (diff) | |
download | gcc-20498e00068a2c4e89a5bc7f39834762160e3767.tar.gz |
2005-12-18 Andreas Krebbel <krebbel1@de.ibm.com>
* tree-cfg.c (tree_flow_call_edges_add): Check for empty basic blocks.
* gcc.dg/20051201-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108755 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20051201-1.c | 26 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 2 |
4 files changed, 35 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a5a5914ae4..6e4f1ffcb8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2005-12-18 Andreas Krebbel <krebbel1@de.ibm.com> + + * tree-cfg.c (tree_flow_call_edges_add): Check for empty basic blocks. + 2005-12-18 Steven Bosscher <stevenb@suse.de> * gcse.c (gcse_main, bypass_jumps): Fix non-GNU-isms from diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5ecdf09c40c..87e1de6186e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2005-12-18 Andreas Krebbel <krebbel1@de.ibm.com> + + * gcc.dg/20051201-1.c: New test. + 2005-12-18 Paul Thomas <pault@gcc.gnu.org> PR fortran/25018 diff --git a/gcc/testsuite/gcc.dg/20051201-1.c b/gcc/testsuite/gcc.dg/20051201-1.c new file mode 100644 index 00000000000..8e77986296e --- /dev/null +++ b/gcc/testsuite/gcc.dg/20051201-1.c @@ -0,0 +1,26 @@ +/* This failed with profiling due to a missing check in + tree_flow_call_edges_add. */ + +/* { dg-do compile } */ +/* { dg-options "-O1 -fprofile-generate" } */ + +static __attribute__ ((always_inline)) void +baz () +{ +} + +static __attribute__ ((always_inline)) int +bar () +{ + out: + baz (); + goto out; +} + +int +foo () +{ + long res; + + res = bar (); +} diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 3f925b3b012..d2e688e5afe 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -4769,7 +4769,7 @@ tree_flow_call_edges_add (sbitmap blocks) if (!bsi_end_p (bsi)) t = bsi_stmt (bsi); - if (need_fake_edge_p (t)) + if (t && need_fake_edge_p (t)) { edge e; |