mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 12:21:15 +08:00
* gcc.c-torture/execute/20000113-1.c: New test.
From-SVN: r31382
This commit is contained in:
parent
efb8436e0c
commit
ca4cd7abfd
@ -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.
|
||||
|
23
gcc/testsuite/gcc.c-torture/execute/20000113-1.c
Normal file
23
gcc/testsuite/gcc.c-torture/execute/20000113-1.c
Normal 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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user