diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-08-19 07:34:40 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-08-19 07:34:40 +0000 |
commit | 912f9e817e0492ddc2a1c6ee4f41a427b43cf440 (patch) | |
tree | 335fa7ed68bccaabc938e142eabc167ac296372e /gcc/testsuite/gcc.c-torture/execute/931102-2.c | |
parent | d3739bcdc296c9e9dbebea8ef89de4479bdfb4ad (diff) | |
download | gcc-912f9e817e0492ddc2a1c6ee4f41a427b43cf440.tar.gz |
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14840 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/931102-2.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/931102-2.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/931102-2.c b/gcc/testsuite/gcc.c-torture/execute/931102-2.c new file mode 100644 index 00000000000..6fc735c8bc1 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/931102-2.c @@ -0,0 +1,31 @@ +typedef union +{ + long align; + struct + { + short h, l; + } b; +} T; + +f (x) + int x; +{ + int num = 0; + T reg; + + reg.b.l = x; + while ((reg.b.l & 1) == 0) + { + num++; + reg.b.l >>= 1; + } + return num; +} + +main () +{ + if (f (2) != 1) + abort (); + exit (0); +} + |