diff options
Diffstat (limited to 'tests/basics/int_small.py')
-rw-r--r-- | tests/basics/int_small.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/basics/int_small.py b/tests/basics/int_small.py index 102dac8ae7..1b2c983e23 100644 --- a/tests/basics/int_small.py +++ b/tests/basics/int_small.py @@ -48,3 +48,17 @@ a -= 1 print(a) # This would overflow #a -= 1 + + +# Shifts to big amounts are undefined behavior in C and is CPU-specific + +# These are compile-time constexprs +print(1 >> 32) +print(1 >> 64) +print(1 >> 128) + +# These are runtime calcs +a = 1 +print(a >> 32) +print(a >> 64) +print(a >> 128) |