Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/ipcp-loophint-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-ipa-cp-details" } */
3
4 extern int *o, *p, *q, *r;
5
6 #define FUNCTIONS fa(), fb(), fc(), fd(), fe(), ff(), fg()
7
8 extern void FUNCTIONS;
9
10 void foo (int c)
11 {
12 FUNCTIONS;
13 FUNCTIONS;
14 for (int i = 0; i < 100; i++)
15 {
16 for (int j = 0; j < c; j++)
17 o[i] = p[i] + q[i] * r[i];
18 }
19 FUNCTIONS;
20 FUNCTIONS;
21 }
22
23 void bar()
24 {
25 foo (8);
26 p[4]++;
27 }
28
29 /* { dg-final { scan-ipa-dump {with known iterations:[1-9]} "cp" } } */