From 036c8da450c67f8c5210bb40d0f0962025dee9b7 Mon Sep 17 00:00:00 2001
From: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun, 14 Jan 2007 18:23:31 +0000
Subject: [PATCH] 	* gcc.dg/always_inline3.c: Update for pre-inline tail
 recursion 	elimination.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120777 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog               | 5 +++++
 gcc/testsuite/gcc.dg/always_inline3.c | 7 ++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8402f29665c4..ed3350da1b2e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-14  Jan Hubicka  <jh@suse.cz>
+
+	* gcc.dg/always_inline3.c: Update for pre-inline tail recursion
+	elimination.
+
 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
 
 	PR fortran/30410
diff --git a/gcc/testsuite/gcc.dg/always_inline3.c b/gcc/testsuite/gcc.dg/always_inline3.c
index e1a337c2864b..7b575d7ad48a 100644
--- a/gcc/testsuite/gcc.dg/always_inline3.c
+++ b/gcc/testsuite/gcc.dg/always_inline3.c
@@ -1,10 +1,11 @@
 /* { dg-do compile } */
 /* { dg-options "-Winline -O2" } */
-void do_something_evil (void);
+int do_something_evil (void);
 inline __attribute__ ((always_inline)) void
 q2(void)
 { 				/* { dg-error "recursive" "" } */
-  do_something_evil ();
-  q2(); 			/* { dg-error "called from here" "" } */
+  if (do_something_evil ())
+    return;
   q2(); 			/* { dg-error "called from here" "" } */
+  q2(); /* With -O2 we don't warn here, it is eliminated by tail recursion.  */
 }
-- 
GitLab