Debian Codegraph @

gcc/testsuite/gcc.dg/torture/no-callee-saved-run-1b.c

raw
1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2
3 extern void foo (void);
4 extern void bad (void);
5 extern int bar (int);
6
7 void
8 __attribute__ ((no_callee_saved_registers))
9 bar0 (int i0, int i1, int i2, int i3, int i4, int i5, int i6,
10 int i7, int i8)
11 {
12 if (i0 != 0)
13 bad ();
14
15 if (i1 != 1)
16 bad ();
17
18 if (i2 != 2)
19 bad ();
20
21 if (i3 != 3)
22 bad ();
23
24 if (i4 != 4)
25 bad ();
26
27 if (i5 != 5)
28 bad ();
29
30 if (i6 != 6)
31 bad ();
32
33 if (i7 != 7)
34 bad ();
35
36 if (i8 != 8)
37 bad ();
38
39 int a,b,c,d,e,f,i;
40 a = bar (5);
41 b = bar (a);
42 c = bar (b);
43 d = bar (c);
44 e = bar (d);
45 f = bar (e);
46 for (i = 1; i < 10; i++)
47 {
48 a += bar (a + i) + bar (b + i) +
49 bar (c + i) + bar (d + i) +
50 bar (e + i) + bar (f + i);
51 }
52 }
53
54 int
55 main ()
56 {
57 foo ();
58 return 0;
59 }