]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
always_inline3.c: Update for pre-inline tail recursion elimination.
authorJan Hubicka <jh@suse.cz>
Sun, 14 Jan 2007 18:23:31 +0000 (19:23 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 14 Jan 2007 18:23:31 +0000 (18:23 +0000)
* gcc.dg/always_inline3.c: Update for pre-inline tail recursion
elimination.

From-SVN: r120777

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/always_inline3.c

index 8402f29665c4f8d3ea70f2980076efda53bb4e67..ed3350da1b2ed2b7f68e07319c9304902bb9a668 100644 (file)
@@ -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
index e1a337c2864bac3c9cb194c91f6d5ea9c2b3d0c7..7b575d7ad48a480b314a543b684c326e61e12564 100644 (file)
@@ -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.  */
 }