Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/profile-generate-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Bug 16325. */ | |
2 /* { dg-require-profiling "-fprofile-generate" } */ | |
3 /* { dg-options "-O -fprofile-generate" } */ | |
4 | |
5 extern void abort (void); | |
6 | |
7 int *p1; | |
8 int *p2; | |
9 int *p3; | |
10 | |
11 int ga = 100; | |
12 | |
13 int | |
14 sub (int i, int j) | |
15 { | |
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; | |
28 } | |
29 | |
30 int | |
31 main(void) | |
32 { | |
33 if (sub (99, 33) != 103) | |
34 abort (); | |
35 return 0; | |
36 } | |
37 | |
38 /* { dg-final { cleanup-coverage-files } } */ |