summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_fail/CheckBoundsReadWord8ArrayAsInt32.hs
blob: f756fb1f65d691e9d7ffeaab2523f5de66117c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE MagicHash #-}

module Main where

import GHC.Exts
import GHC.IO

main :: IO ()
main = do
    IO $ \s0 ->
      case newByteArray# 7# s0 of
        (# s1, marr #) ->
          case readWord8ArrayAsInt32# marr 4# s1 of
            (# s2, _n #) -> (# s2, () #)