aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-04-23 00:33:48 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-04-23 00:33:48 +0200
commit63cb92c1ee60811725c0f0b2512e7edcded5c7d4 (patch)
tree6c47921f4947f086070ce6f76eeb80c06959ae83 /gcc/builtins.c
parentd7b5fa315012328dbd9b2fd6cb0e1c82942752c3 (diff)
downloadgcc-63cb92c1ee60811725c0f0b2512e7edcded5c7d4.zip
gcc-63cb92c1ee60811725c0f0b2512e7edcded5c7d4.tar.gz
gcc-63cb92c1ee60811725c0f0b2512e7edcded5c7d4.tar.bz2
re PR rtl-optimization/36017 (Miscompilation of tail call sqrt)
PR rtl-optimization/36017 * builtins.c (expand_errno_check): Clear CALL_EXPR_TAILCALL before expanding the library call. * gcc.dg/pr36017.c: New test. From-SVN: r134569
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index d5c4f92..761a658 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1804,6 +1804,9 @@ expand_errno_check (tree exp, rtx target)
}
#endif
+ /* Make sure the library call isn't expanded as a tail call. */
+ CALL_EXPR_TAILCALL (exp) = 0;
+
/* We can't set errno=EDOM directly; let the library call do it.
Pop the arguments right away in case the call gets deleted. */
NO_DEFER_POP;