2014-08-04 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / profile-generate-1.c
blobed49df9213b47d80d80ef05cba3bc5e3837ddf36
1 /* Bug 16325. */
2 /* { dg-require-profiling "-fprofile-generate" } */
3 /* { dg-options "-O -fprofile-generate" } */
5 extern void abort (void);
7 int *p1;
8 int *p2;
9 int *p3;
11 int ga = 100;
13 int
14 sub (int i, int j)
16 int k;
17 int l;
18 int m;
19 int n;
20 p1 = &k;
21 p2 = &l;
22 p3 = &m;
23 k = 20;
24 l = 30;
25 m = 40;
26 n = i / j;
27 return n + ga;
30 int
31 main(void)
33 if (sub (99, 33) != 103)
34 abort ();
35 return 0;
38 /* { dg-final { cleanup-coverage-files } } */