summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr44290-2.c
blob: 1951a519dfc04ecfaef5a6c0a1e79090afd3b66d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

static unsigned long __attribute__((naked))
foo (unsigned long base)
{
  asm volatile ("dummy");
}
unsigned long
bar (void)
{
  static int start, set;

  if (!set)
    {
      set = 1;
      start = foo (0);
    }

  return foo (start);
}

/* { dg-final { scan-tree-dump "foo \\\(long unsigned int base\\\)" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */