summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-sra-5.c
blob: 2fe4ee741a367a7dd07f75eae9536e069d722efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details" } */

static int *
__attribute__((noinline,used))
  ox (int *i, int *j)
{
  return i;
}

int a;

int *caller (void)
{
  int b = 10;

  return ox (&a, &b);
}
/* { dg-final { scan-tree-dump-times "base: j, remove_param" 0 "eipa_sra"  } } */
/* { dg-final { cleanup-tree-dump "eipa_sra" } } */