This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix always-inline3.c "regression"
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 14 Jan 2007 19:22:13 +0100
- Subject: Fix always-inline3.c "regression"
Hi,
always_inline3.c testcase now incorrectly fail, because we tail optimize
it. For some reasons this didn't show up in the original early
optimization testing (where adding do_something_evil call was enough).
I've commited the following update as obvoius.
Honza
Index: gcc.dg/always_inline3.c
===================================================================
--- gcc.dg/always_inline3.c (revision 120770)
+++ gcc.dg/always_inline3.c (working copy)
@@ -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. */
}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 120770)
+++ ChangeLog (working copy)
@@ -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 Uros Bizjak <ubizjak@gmail.com>
PR target/30413