Debian Codegraph @

gcc/testsuite/gcc.dg/tree-prof/pr79587.c

raw
1 /* { dg-require-effective-target lto } */
2 /* { dg-options "-O2 -flto" } */
3
4 unsigned long global = -12345;
5
6 unsigned long
7 __attribute__((noinline))
8 test(unsigned long v, unsigned long v2)
9 {
10 unsigned long x = v % v2;
11
12 return x;
13 }
14
15 int main(int argc, char **argv)
16 {
17 unsigned long r = 0;
18
19 for (int i = 0; i < 100; i++)
20 r += test(argc, global);
21
22 if (r != 100)
23 __builtin_abort ();
24
25 return 0;
26 }