2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / aru-2.c
blob054223c151b23d9d1d9dbeda6d122e8fdfc4810c
1 /* { dg-do run } */
2 /* { dg-require-profiling "-pg" } */
3 /* { dg-options "-O2 -pg" } */
5 static int __attribute__((noinline))
6 bar (int x)
8 return x + 3;
11 int __attribute__((noinline))
12 foo (int y0, int y1, int y2, int y3, int y4) {
13 int r = 0;
14 r += bar (r + y4);
15 r += bar (r + y3);
16 r += bar (r + y2);
17 r += bar (r + y1);
18 r += bar (r + y0);
19 return r;
22 int
23 main (void)
25 int z = foo (0, 1, 2, 3, 4);
26 return !(z == 191);
29 /* { dg-final { cleanup-profile-file } } */