Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20000113-1.c

raw
1 void abort (void);
2 void exit (int);
3
4 struct x {
5 unsigned x1:1;
6 unsigned x2:2;
7 unsigned x3:3;
8 };
9
10 void
11 foobar (int x, int y, int z)
12 {
13 struct x a = {x, y, z};
14 struct x b = {x, y, z};
15 struct x *c = &b;
16
17 c->x3 += (a.x2 - a.x1) * c->x2;
18 if (a.x1 != 1 || c->x3 != 5)
19 abort ();
20 exit (0);
21 }
22
23 int
24 main(void)
25 {
26 foobar (1, 2, 3);
27 }
28