summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/always_inline3.c
blob: 1bd2b6d57fedb388e7c52ae263601f505b11ff51 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* { dg-do compile } */
/* { dg-options "-O2 -fgnu89-inline" } */
int do_something_evil (void);
inline __attribute__ ((always_inline)) void
q2(void) /* { dg-error "recursive inlining" } */
{
  if (do_something_evil ())
    return;
  q2(); 			/* { dg-message "called from here" } */
  q2(); /* With -O2 we don't warn here, it is eliminated by tail recursion.  */
}