summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/profile-generate-1.c
blob: fe51754bcb75464a56fe3914bdab336a8b254994 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Bug 16325.  */
/* { dg-options "-O -fprofile-generate" } */

extern void abort (void);

int *p1;
int *p2;
int *p3;

int ga = 100;

int
sub (int i, int j)
{
  int k;
  int l;
  int m;
  int n;
  p1 = &k;
  p2 = &l;
  p3 = &m;
  k = 20;
  l = 30;
  m = 40;
  n = i / j;
  return n + ga;
}

int
main(void)
{
  if (sub (99, 33) != 103)
    abort ();
  return 0;
}

/* { dg-final { cleanup-coverage-files } } */