Debian Codegraph @

gcc/testsuite/gcc.target/m68k/crash1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Os -fomit-frame-pointer" } */
3
4 /* Caused an ICE because of forgotten auto increment. */
5
6 register void *current __asm__("%a2");
7
8 struct kernel_stat
9 {
10 long long user;
11 long long nice;
12 long long system;
13 long long idle;
14 long long steal;
15 unsigned irqs[256];
16 };
17 extern struct kernel_stat per_cpu__kstat;
18 void seq_printf (...);
19
20 void show_stat(void)
21 {
22 int i;
23 long long user, nice, system, idle, steal;
24 long long sum = 0;
25
26 user = nice = system = idle = steal = 0;
27 for (i = 0; i < 1; i++)
28 {
29 int j;
30 user = user + per_cpu__kstat.user;
31 nice = nice + per_cpu__kstat.nice;
32 system = system + per_cpu__kstat.system;
33 idle = idle + per_cpu__kstat.idle;
34 steal = steal + per_cpu__kstat.steal;
35
36 for (j = 0 ; j < 256 ; j++)
37 sum += per_cpu__kstat.irqs[j];
38 }
39 seq_printf(user, nice, system, idle, steal);
40 seq_printf(sum);
41 for (i = 0; i < 256; i++)
42 seq_printf (i);
43 }