diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/bitshift.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/bitshift.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/bitshift.exp b/gdb/testsuite/gdb.base/bitshift.exp index d6e2521..cab82e1 100644 --- a/gdb/testsuite/gdb.base/bitshift.exp +++ b/gdb/testsuite/gdb.base/bitshift.exp @@ -363,6 +363,18 @@ proc test_shifts {} { test_rshift_tl $lang \ "print -1 >> [make_uint64 $lang 0xffffffffffffffff]" " = -1" } + + # Check if shift value isn't silently truncated to 32bit. + with_test_prefix "lower-32bit-zero" { + test_lshift_tl $lang \ + "print 1 << [make_uint64 $lang 0x100000000]" " = 0" + test_rshift_tl $lang \ + "print 1 >> [make_uint64 $lang 0x100000000]" " = 0" + test_lshift_tl $lang \ + "print -1 << [make_uint64 $lang 0x100000000]" " = 0" + test_rshift_tl $lang \ + "print -1 >> [make_uint64 $lang 0x100000000]" " = -1" + } } } |