diff options
author | Matthew Craven <5086-clyring@users.noreply.gitlab.haskell.org> | 2023-03-14 22:13:38 -0400 |
---|---|---|
committer | Matthew Craven <5086-clyring@users.noreply.gitlab.haskell.org> | 2023-04-03 20:36:15 -0400 |
commit | 65a442fccd081d9370ae4ee4e74f116139b5c2c8 (patch) | |
tree | 0bc329c8a4947262b958837e103c48dc6689ac9e /testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs | |
parent | a58c028a181106312e1a783e82a37fc657ce9cfe (diff) | |
download | haskell-65a442fccd081d9370ae4ee4e74f116139b5c2c8.tar.gz |
StgToCmm: Upgrade -fcheck-prim-bounds behaviorwip/fcheck-prim-bounds-9.6
Fixes #21054. Additionally, we can now check for range overlap
when generating Cmm for primops that use memcpy internally.
Diffstat (limited to 'testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs b/testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs new file mode 100644 index 0000000000..f5337d26c3 --- /dev/null +++ b/testsuite/tests/codeGen/should_fail/CheckBoundsReadWord64Array.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE UnboxedTuples #-} +{-# LANGUAGE MagicHash #-} + +module Main where + +import GHC.Exts +import GHC.IO + +main :: IO () +main = do + IO $ \s0 -> + case newByteArray# 23# s0 of + (# s1, marr #) -> + case readWord64Array# marr (-1#) s1 of + (# s2, _n #) -> (# s2, () #) + |