2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20001111-1.c
blob85617c23d44c52fa4d5381d8888a15f850d4f6c8
2 static int next_buffer = 0;
3 void bar (void);
5 static int t = 1, u = 0;
7 long
8 foo (unsigned int offset)
10 unsigned i, buffer;
11 int x;
12 char *data;
14 i = u;
15 if (i)
16 return i * 0xce2f;
18 buffer = next_buffer;
19 data = buffer * 0xce2f;
20 for (i = 0; i < 2; i++)
21 bar ();
22 buffer = next_buffer;
23 return buffer * 0xce2f + offset;
27 void
28 bar (void)
32 int
33 main ()
35 if (foo (3) != 3)
36 abort ();
37 next_buffer = 1;
38 if (foo (2) != 0xce2f + 2)
39 abort ();
40 exit (0);