diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/xopt.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/xopt.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/xopt.c b/gcc/testsuite/gcc.c-torture/compile/xopt.c new file mode 100644 index 0000000..b1a50f8 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/xopt.c @@ -0,0 +1,35 @@ +proc1 (a) + unsigned a; +{ + return (a >> 20) & 0x010fffff; +} + +proc2 (a) + unsigned a; +{ + return (a << 17) & 0xfffff001; +} + +proc3 (a) + unsigned a; +{ + return (a & 0xff00000a) >> 25; +} + +proc4 (a) + unsigned a; +{ + return (a & 0x100000ff) << 25; +} + +proc5 (a) + unsigned a; +{ + return (unsigned char) (a >> 24); +} + +proc6 (a) + unsigned a; +{ + return ((unsigned char) a) << 30; +} |