diff options
author | Richard Guenther <rguenther@suse.de> | 2009-02-06 09:06:39 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-02-06 09:06:39 +0000 |
commit | 3cfa762bf031f655442405487b7e206fbe5f6ddc (patch) | |
tree | f9119bc45046954f797ebdafe32aa82c0bf709dc /gcc/tree-cfg.c | |
parent | 8506528ca214784d301c162a4ff0c4543d7ad979 (diff) | |
download | gcc-3cfa762bf031f655442405487b7e206fbe5f6ddc.zip gcc-3cfa762bf031f655442405487b7e206fbe5f6ddc.tar.gz gcc-3cfa762bf031f655442405487b7e206fbe5f6ddc.tar.bz2 |
re PR tree-optimization/38977 (bash no longer builds with profile-feedback)
2009-02-06 Richard Guenther <rguenther@suse.de>
PR middle-end/38977
* tree-cfg.c (need_fake_edge_p): Force a fake edge for
fork because we may expand it as __gcov_fork.
From-SVN: r143982
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 875d123..cb00581 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6444,9 +6444,14 @@ need_fake_edge_p (gimple t) && fndecl && DECL_BUILT_IN (fndecl) && (call_flags & ECF_NOTHROW) - && !(call_flags & ECF_NORETURN) - && !(call_flags & ECF_RETURNS_TWICE)) - return false; + && !(call_flags & ECF_RETURNS_TWICE) + /* fork() doesn't really return twice, but the effect of + wrapping it in __gcov_fork() which calls __gcov_flush() + and clears the counters before forking has the same + effect as returning twice. Force a fake edge. */ + && !(DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL + && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_FORK)) + return false; if (is_gimple_call (t) && !(call_flags & ECF_NORETURN)) |