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