Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / funcorder.c
blob0dec72c7d02b7a40cf40c55afaa3b7f3b921241b
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -funit-at-a-time" } */
3 /* { dg-final { scan-assembler-not "link_error" } } */
4 /* In unit-at-time the functions should be assembled in order
5 e q t main, so we realize that they are pure. */
7 static int mem;
8 static int e(void) __attribute__ ((noinline));
9 static int q(void) __attribute__ ((noinline));
10 static int t(void) __attribute__ ((noinline));
11 main()
13 return t();
15 static t()
17 int r,e;
18 if (mem)
19 t();
20 e=mem;
21 r=q();
22 if (e!=mem)
23 link_error();
24 return r;
26 static int e()
28 return 0;
30 static int q()
32 int t=mem,r;
33 r=e();
34 if (t!=mem)
35 link_error();
36 return r;