summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c
new file mode 100644
index 000000000..e7983da31
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/tailcall-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-tailc-details" } */
+/* PR tree-opt/37024 */
+
+double doubleValue();
+
+long
+longValue ()
+{
+ return (long) doubleValue ();
+}
+
+/* We should not tail call doubleValue in longValue as the mode changes. */
+/* { dg-final { scan-tree-dump-times "Found tail call" 0 "tailc"} } */
+/* { dg-final { cleanup-tree-dump "tailc" } } */
+