diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-08-20 20:49:46 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-08-20 20:49:46 +0200 |
commit | 994fc9abdde826d0b843b48e8ef1627295c3ae25 (patch) | |
tree | 641b172aeb3419f87090129ab841a2d5ae3ff2ef /gcc/builtins.c | |
parent | 6c33409079616051a31b9c7546d22dc59a44f24e (diff) | |
download | gcc-994fc9abdde826d0b843b48e8ef1627295c3ae25.zip gcc-994fc9abdde826d0b843b48e8ef1627295c3ae25.tar.gz gcc-994fc9abdde826d0b843b48e8ef1627295c3ae25.tar.bz2 |
re PR middle-end/44974 (Function with attribute noreturn omits a call to another function with noreturn)
PR middle-end/44974
* builtins.c (expand_builtin): Don't optimize away
calls to DECL_LOOPING_CONST_OR_PURE_P builtins.
* gcc.dg/pr44974.c: New test.
From-SVN: r163415
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 9a79adb..e8974e1 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5770,7 +5770,8 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, none of its arguments are volatile, we can avoid expanding the built-in call and just evaluate the arguments for side-effects. */ if (target == const0_rtx - && (DECL_PURE_P (fndecl) || TREE_READONLY (fndecl))) + && (DECL_PURE_P (fndecl) || TREE_READONLY (fndecl)) + && !DECL_LOOPING_CONST_OR_PURE_P (fndecl)) { bool volatilep = false; tree arg; |