summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-pta-2.c
blob: 0cf2adfddd0ce884f09626b9a5878953dfb3b9af (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 } */
/* { dg-options "-O -fipa-pta -fdump-ipa-pta2-details" } */

int (*fn)(int *);

static int __attribute__((noinline,noclone))
foo (int *p)
{
  return *p;
}

extern void bar (void);

int main()
{
  fn = foo;
  bar ();
  return 0;
}

/* Make sure that when a local function escapes its argument points-to sets
   are properly adjusted.  */

/* { dg-final { scan-ipa-dump "foo.arg0 = { ESCAPED NONLOCAL }" "pta2" } } */