* gcc.c-torture/execute/20000113-1.c: New test.

From-SVN: r31382
This commit is contained in:
Jeffrey A Law 2000-01-13 09:30:08 +00:00 committed by Jeff Law
parent efb8436e0c
commit ca4cd7abfd
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Thu Jan 13 02:29:32 2000 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/execute/20000113-1.c: New test.
Wed Jan 12 20:26:58 2000 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/execute/20000112-1.c: New test.

View File

@ -0,0 +1,23 @@
struct x {
unsigned x1:1;
unsigned x2:2;
unsigned x3:3;
};
foobar (int x, int y, int z)
{
struct x a = {x, y, z};
struct x b = {x, y, z};
struct x *c = &b;
c->x3 += (a.x2 - a.x1) * c->x2;
if (a.x1 != 1 || c->x3 != 5)
abort ();
exit (0);
}
main()
{
foobar (1, 2, 3);
}