diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-13 09:30:08 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-13 09:30:08 +0000 |
commit | 0bb51635854f422fafd9414b1f7f985746661494 (patch) | |
tree | 88678c5c50f5e10690f805b2b75042ab0260ab06 /gcc/testsuite/gcc.c-torture/execute/20000113-1.c | |
parent | 8e830053a634bbaccdaa7ccddf6106dc38419636 (diff) | |
download | gcc-0bb51635854f422fafd9414b1f7f985746661494.tar.gz |
* gcc.c-torture/execute/20000113-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31382 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20000113-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20000113-1.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000113-1.c b/gcc/testsuite/gcc.c-torture/execute/20000113-1.c new file mode 100644 index 00000000000..8b61dbb2109 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20000113-1.c @@ -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); +} + |