summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr79255.c
blob: bcccec0eec65b475343e96b5b6f55ac405893e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR bootstrap/79255 */
/* { dg-do compile } */
/* { dg-options "-O2 -g -fno-toplevel-reorder -Wno-attributes" } */

static inline __attribute__((always_inline)) int foo (int x);

int
baz (void)
{
  return foo (3) + foo (6) + foo (9);
}

static inline __attribute__((always_inline)) int
foo (int x)
{
  auto inline int __attribute__((noinline)) bar (int x)
  {
    return x + 3;
  }
  return bar (x) + bar (x + 2);
}